Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / voscm.vim
blob7d6bea754339e217804fc1a513e88ab3b9984f00
1 " Vim syntax file
2 " Language:     VOS CM macro
3 " Maintainer:   Andrew McGill andrewm at lunch.za.net
4 " Last Change:  Apr 06, 2007
5 " Version:      1
6 " URL:  http://lunch.za.net/
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
11 if exists("b:current_syntax")
12   finish
13 endif
15 syn case match
16 " set iskeyword=48-57,_,a-z,A-Z
18 syn match   voscmStatement     "^!"
19 syn match voscmStatement        "&\(label\|begin_parameters\|end_parameters\|goto\|attach_input\|break\|continue\|control\|detach_input\|display_line\|display_line_partial\|echo\|eof\|eval\|if\|mode\|return\|while\|set\|set_string\|then\|else\|do\|done\|end\)\>"
20 syn match  voscmJump            "\(&label\|&goto\)  *"  nextgroup=voscmLabelId
21 syn match   voscmLabelId        contained "\<[A-Za-z][A-Z_a-z0-9]* *$"
22 syn match  voscmSetvar          "\(&set_string\|&set\)  *"  nextgroup=voscmVariable
23 syn match voscmError            "\(&set_string\|&set\)  *&" 
24 syn match   voscmVariable       contained "\<[A-Za-z][A-Z_a-z0-9]\+\>"
25 syn keyword voscmParamKeyword   contained number req string switch allow byte disable_input hidden length longword max min no_abbrev output_path req required req_for_form word 
26 syn region  voscmParamList      matchgroup=voscmParam start="&begin_parameters" end="&end_parameters" contains=voscmParamKeyword,voscmString,voscmParamName,voscmParamId
27 syn match   voscmParamName      contained "\(^\s*[A-Za-z_0-9]\+\s\+\)\@<=\k\+"
28 syn match   voscmParamId        contained "\(^\s*\)\@<=\k\+"
29 syn region par1 matchgroup=par1 start=/(/ end=/)/ contains=voscmFunction,voscmIdentifier,voscmString transparent
30 " FIXME: functions should only be allowed after a bracket ... ie  (ask ...):
31 syn keyword voscmFunction     contained abs access after ask before break byte calc ceil command_status concat
32 syn keyword voscmFunction     contained contents path_name copy count current_dir current_module date date_time
33 syn keyword voscmFunction     contained decimal directory_name end_of_file exists file_info floor given group_name
34 syn keyword voscmFunction     contained has_access hexadecimal home_dir index iso_date iso_date_time language_name
35 syn keyword voscmFunction     contained length lock_type locked ltrim master_disk max message min mod module_info
36 syn keyword voscmFunction     contained module_name object_name online path_name person_name process_dir process_info
37 syn keyword voscmFunction     contained process_type quote rank referencing_dir reverse rtrim search
38 syn keyword voscmFunction     contained software_purchased string substitute substr system_name terminal_info
39 syn keyword voscmFunction     contained terminal_name time translate trunc unique_string unquote user_name verify
40 syn keyword voscmFunction     contained where_path
41 syn keyword voscmTodo contained TODO FIXME XXX DEBUG NOTE
42 syn match voscmTab              "\t\+"
44 syn keyword voscmCommand        add_entry_names add_library_path add_profile analyze_pc_samples attach_default_output attach_port batch bind break_process c c_preprocess call_thru cancel_batch_requests cancel_device_reservation cancel_print_requests cc change_current_dir check_posix cobol comment_on_manual compare_dirs compare_files convert_text_file copy_dir copy_file copy_tape cpp create_data_object create_deleted_record_index create_dir create_file create_index create_record_index create_tape_volumes cvt_fixed_to_stream cvt_stream_to_fixed debug delete_dir delete_file delete_index delete_library_path detach_default_output detach_port dismount_tape display display_access display_access_list display_batch_status display_current_dir display_current_module display_date_time display_default_access_list display_device_info display_dir_status display_disk_info display_disk_usage display_error display_file display_file_status display_line display_notices display_object_module_info display_print_defaults display_print_status display_program_module display_system_usage display_tape_params display_terminal_parameters dump_file dump_record dump_tape edit edit_form emacs enforce_region_locks fortran get_external_variable give_access give_default_access handle_sig_dfl harvest_pc_samples help kill line_edit link link_dirs list list_batch_requests list_devices list_gateways list_library_paths list_modules list_port_attachments list_print_requests list_process_cmd_limits list_save_tape list_systems list_tape list_terminal_types list_users locate_files locate_large_files login logout mount_tape move_device_reservation move_dir move_file mp_debug nls_edit_form pascal pl1 position_tape preprocess_file print profile propagate_access read_tape ready remove_access remove_default_access rename reserve_device restore_object save_object send_message set set_cpu_time_limit set_expiration_date set_external_variable set_file_allocation set_implicit_locking set_index_flags set_language set_library_paths set_line_wrap_width set_log_protected_file set_owner_access set_pipe_file set_priority set_ready set_safety_switch set_second_tape set_tape_drive_params set_tape_file_params set_tape_mount_params set_terminal_parameters set_text_file set_time_zone sleep sort start_logging start_process stop_logging stop_process tail_file text_data_merge translate_links truncate_file unlink update_batch_requests update_print_requests update_process_cmd_limits use_abbreviations use_message_file vcc verify_posix_access verify_save verify_system_access walk_dir where_command where_path who_locked write_tape 
46 syn match voscmIdentifier       "&[A-Za-z][a-z0-9_A-Z]*&"
48 syn match voscmString           "'[^']*'"
50 " Number formats
51 syn match voscmNumber           "\<\d\+\>"
52 "Floating point number part only
53 syn match voscmDecimalNumber    "\.\d\+\([eE][-+]\=\d\)\=\>"
55 "syn region voscmComment        start="^[       ]*&[    ]+"     end="$"
56 "syn match voscmComment         "^[     ]*&[    ].*$"
57 "syn match voscmComment         "^&$"
58 syn region voscmComment         start="^[       ]*&[    ]" end="$" contains=voscmTodo
59 syn match voscmComment          "^&$"
60 syn match voscmContinuation     "&+$"
62 "syn match  voscmIdentifier     "[A-Za-z0-9&._-]\+"
64 "Synchronization with Statement terminator $
65 " syn sync maxlines=100
67 hi def link voscmConditional    Conditional
68 hi def link voscmStatement      Statement
69 hi def link voscmSetvar         Statement
70 hi def link voscmNumber         Number
71 hi def link voscmDecimalNumber  Float
72 hi def link voscmString         String
73 hi def link voscmIdentifier     Identifier
74 hi def link voscmVariable       Identifier
75 hi def link voscmComment        Comment
76 hi def link voscmJump           Statement
77 hi def link voscmContinuation   Macro
78 hi def link voscmLabelId        String
79 hi def link voscmParamList      NONE
80 hi def link voscmParamId        Identifier
81 hi def link voscmParamName      String
82 hi def link voscmParam          Statement
83 hi def link voscmParamKeyword   Statement
84 hi def link voscmFunction       Function
85 hi def link voscmCommand        Structure
86 "hi def link voscmIdentifier    NONE
87 "hi def link voscmSpecial       Special   " not used 
88 hi def link voscmTodo           Todo
89 hi def link voscmTab            Error
90 hi def link voscmError          Error
92 let b:current_syntax = "voscm"
94 " vim: ts=8