euphoria3.vim (6103B)
1 " Vim syntax file 2 " Language: Euphoria 3.1.1 - supports DOS - (http://www.rapideuphoria.com/) 3 " Maintainer: Shian Lee 4 " Last Change: 2014 Feb 24 (for Vim 7.4) 5 " Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim; 6 " For details see :help ft-euphoria-syntax 7 8 " quit when a syntax file was already loaded 9 if exists("b:current_syntax") 10 finish 11 endif 12 13 " Reset compatible-options to Vim default value, just in case: 14 let s:save_cpo = &cpo 15 set cpo&vim 16 17 " Should suffice for very long expressions: 18 syn sync lines=40 19 20 " Euphoria is a case-sensitive language (with only 4 builtin types): 21 syntax case match 22 23 " Keywords/Builtins for Debug - from $EUDIR/bin/keywords.e: 24 syn keyword euphoria3Debug with without trace profile 25 syn keyword euphoria3Debug profile_time warning type_check 26 27 " Keywords (Statments) - from $EUDIR/bin/keywords.e: 28 syn keyword euphoria3Keyword if end then procedure else for return 29 syn keyword euphoria3Keyword do elsif while type constant to and or 30 syn keyword euphoria3Keyword exit function global by not include 31 syn keyword euphoria3Keyword xor 32 33 " Builtins (Identifiers) - from $EUDIR/bin/keywords.e: 34 syn keyword euphoria3Builtin length puts integer sequence position object 35 syn keyword euphoria3Builtin append prepend print printf 36 syn keyword euphoria3Builtin clear_screen floor getc gets get_key 37 syn keyword euphoria3Builtin rand repeat atom compare find match 38 syn keyword euphoria3Builtin time command_line open close getenv 39 syn keyword euphoria3Builtin sqrt sin cos tan log system date remainder 40 syn keyword euphoria3Builtin power machine_func machine_proc abort peek poke 41 syn keyword euphoria3Builtin call sprintf arctan and_bits or_bits xor_bits 42 syn keyword euphoria3Builtin not_bits pixel get_pixel mem_copy mem_set 43 syn keyword euphoria3Builtin c_proc c_func routine_id call_proc call_func 44 syn keyword euphoria3Builtin poke4 peek4s peek4u equal system_exec 45 syn keyword euphoria3Builtin platform task_create task_schedule task_yield 46 syn keyword euphoria3Builtin task_self task_suspend task_list 47 syn keyword euphoria3Builtin task_status task_clock_stop task_clock_start 48 syn keyword euphoria3Builtin find_from match_from 49 " Builtins (Identifiers) shortcuts for length() and print(): 50 syn match euphoria3Builtin "\$" 51 syn match euphoria3Builtin "?" 52 53 " Library Identifiers (Function) - from $EUDIR/doc/library.doc: 54 syn keyword euphoria3Library reverse sort custom_sort lower upper 55 syn keyword euphoria3Library wildcard_match wildcard_file arcsin 56 syn keyword euphoria3Library arccos PI flush lock_file unlock_file 57 syn keyword euphoria3Library pretty_print sprint get_bytes prompt_string 58 syn keyword euphoria3Library wait_key get prompt_number value seek where 59 syn keyword euphoria3Library current_dir chdir dir walk_dir allow_break 60 syn keyword euphoria3Library check_break get_mouse mouse_events mouse_pointer 61 syn keyword euphoria3Library tick_rate sleep get_position graphics_mode 62 syn keyword euphoria3Library video_config scroll wrap text_color bk_color 63 syn keyword euphoria3Library palette all_palette get_all_palette read_bitmap 64 syn keyword euphoria3Library save_bitmap get_active_page set_active_page 65 syn keyword euphoria3Library get_display_page set_display_page sound 66 syn keyword euphoria3Library cursor text_rows get_screen_char put_screen_char 67 syn keyword euphoria3Library save_text_image display_text_image draw_line 68 syn keyword euphoria3Library polygon ellipse save_screen save_image display_image 69 syn keyword euphoria3Library dos_interrupt allocate free allocate_low free_low 70 syn keyword euphoria3Library allocate_string register_block unregister_block 71 syn keyword euphoria3Library get_vector set_vector lock_memory int_to_bytes 72 syn keyword euphoria3Library bytes_to_int int_to_bits bits_to_int atom_to_float64 73 syn keyword euphoria3Library atom_to_float32 float64_to_atom float32_to_atom 74 syn keyword euphoria3Library set_rand use_vesa crash_file crash_message 75 syn keyword euphoria3Library crash_routine open_dll define_c_proc define_c_func 76 syn keyword euphoria3Library define_c_var call_back message_box free_console 77 syn keyword euphoria3Library instance 78 79 " Library Identifiers (Function) - from $EUDIR/doc/database.doc: 80 syn keyword euphoria3Library db_create db_open db_select db_close db_create_table 81 syn keyword euphoria3Library db_select_table db_rename_table db_delete_table 82 syn keyword euphoria3Library db_table_list db_table_size db_find_key db_record_key 83 syn keyword euphoria3Library db_record_data db_insert db_delete_record 84 syn keyword euphoria3Library db_replace_data db_compress db_dump db_fatal_id 85 86 " Linux shell comment (#!...): 87 syn match euphoria3Comment "\%^#!.*$" 88 " Comment on one line: 89 syn region euphoria3Comment start=/--/ end=/$/ 90 91 " Delimiters and brackets: 92 syn match euphoria3Delimit "[([\])]" 93 syn match euphoria3Delimit "\.\." 94 syn match euphoria3Operator "[{}]" 95 96 " Character constant: 97 syn region euphoria3Char start=/'/ skip=/\\'\|\\\\/ end=/'/ oneline 98 99 " String constant: 100 syn region euphoria3String start=/"/ skip=/\\"\|\\\\/ end=/"/ oneline 101 102 " Hexadecimal integer: 103 syn match euphoria3Number "#[0-9A-F]\+\>" 104 105 " Integer/Floating point without a dot: 106 syn match euphoria3Number "\<\d\+\>" 107 " Floating point with dot: 108 syn match euphoria3Number "\<\d\+\.\d*\>" 109 " Floating point starting with a dot: 110 syn match euphoria3Number "\.\d\+\>" 111 " Boolean constants: 112 syn keyword euphoria3Boolean true TRUE false FALSE 113 114 " Define the default highlighting. 115 " Only used when an item doesn't have highlighting yet: 116 hi def link euphoria3Comment Comment 117 hi def link euphoria3String String 118 hi def link euphoria3Char Character 119 hi def link euphoria3Number Number 120 hi def link euphoria3Boolean Boolean 121 hi def link euphoria3Builtin Identifier 122 hi def link euphoria3Library Function 123 hi def link euphoria3Keyword Statement 124 hi def link euphoria3Operator Statement 125 hi def link euphoria3Debug Debug 126 hi def link euphoria3Delimit Delimiter 127 128 let b:current_syntax = "euphoria3" 129 130 " Restore current compatible-options: 131 let &cpo = s:save_cpo 132 unlet s:save_cpo