summaryrefslogtreecommitdiff
path: root/runtime/syntax/euphoria3.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-02-24 02:51:51 +0100
committerBram Moolenaar <Bram@vim.org>2014-02-24 02:51:51 +0100
commit251835e14f6fb4134a041c2ba9d3e7b84b783e86 (patch)
tree7cde7fafc2eb2735e0491f7fc085f27320b07d6e /runtime/syntax/euphoria3.vim
parent26df092843de91ea0c5c5c130d0d0695d2d81c07 (diff)
downloadvim-251835e14f6fb4134a041c2ba9d3e7b84b783e86.zip
Update runtime files. Add Euphoria syntax files.
Diffstat (limited to 'runtime/syntax/euphoria3.vim')
-rw-r--r--runtime/syntax/euphoria3.vim129
1 files changed, 129 insertions, 0 deletions
diff --git a/runtime/syntax/euphoria3.vim b/runtime/syntax/euphoria3.vim
new file mode 100644
index 000000000..e449c511d
--- /dev/null
+++ b/runtime/syntax/euphoria3.vim
@@ -0,0 +1,129 @@
+" Vim syntax file
+" Language: Euphoria 3.1.1 - supports DOS - (http://www.RapidEuphoria.com)
+" Maintainer: Shian Lee
+" Last Change: 2014 Feb 23 (for Vim 7.4)
+" Remark: Using 'euphoria3.vim' if "$EUDIR\BIN\EX.EXE" or "$EUDIR/bin/exu"
+" file exist; else, using 'euphoria4.vim' for Euphoria 4.x.x.
+" Filetype: *.e, *.eu, *.ew, *.ex, *.exu, *.exw (also in UPPER case).
+" note: *.e|*.E are used by Eiffel; for solution see :help filetype.
+
+" Quit if a (custom) syntax file was already loaded (compatible with Vim 5.8):
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Should suffice for very long expressions:
+syn sync lines=40
+
+" Euphoria is a case-sensitive language (with only 4 builtin types):
+syntax case match
+
+" Keywords/Builtins for Debug - from $EUDIR/bin/keywords.e:
+syn keyword euphoria3Debug with without trace profile
+syn keyword euphoria3Debug profile_time warning type_check
+
+" Keywords (Statments) - from $EUDIR/bin/keywords.e:
+syn keyword euphoria3Keyword if end then procedure else for return
+syn keyword euphoria3Keyword do elsif while type constant to and or
+syn keyword euphoria3Keyword exit function global by not include
+syn keyword euphoria3Keyword xor
+
+" Builtins (Identifiers) - from $EUDIR/bin/keywords.e:
+syn keyword euphoria3Builtin length puts integer sequence position object
+syn keyword euphoria3Builtin append prepend print printf
+syn keyword euphoria3Builtin clear_screen floor getc gets get_key
+syn keyword euphoria3Builtin rand repeat atom compare find match
+syn keyword euphoria3Builtin time command_line open close getenv
+syn keyword euphoria3Builtin sqrt sin cos tan log system date remainder
+syn keyword euphoria3Builtin power machine_func machine_proc abort peek poke
+syn keyword euphoria3Builtin call sprintf arctan and_bits or_bits xor_bits
+syn keyword euphoria3Builtin not_bits pixel get_pixel mem_copy mem_set
+syn keyword euphoria3Builtin c_proc c_func routine_id call_proc call_func
+syn keyword euphoria3Builtin poke4 peek4s peek4u equal system_exec
+syn keyword euphoria3Builtin platform task_create task_schedule task_yield
+syn keyword euphoria3Builtin task_self task_suspend task_list
+syn keyword euphoria3Builtin task_status task_clock_stop task_clock_start
+syn keyword euphoria3Builtin find_from match_from
+" Builtins (Identifiers) shortcuts for length() and print():
+syn match euphoria3Builtin "\$"
+syn match euphoria3Builtin "?"
+
+" Library Identifiers (Function) - from $EUDIR/doc/library.doc:
+syn keyword euphoria3Library reverse sort custom_sort lower upper
+syn keyword euphoria3Library wildcard_match wildcard_file arcsin
+syn keyword euphoria3Library arccos PI flush lock_file unlock_file
+syn keyword euphoria3Library pretty_print sprint get_bytes prompt_string
+syn keyword euphoria3Library wait_key get prompt_number value seek where
+syn keyword euphoria3Library current_dir chdir dir walk_dir allow_break
+syn keyword euphoria3Library check_break get_mouse mouse_events mouse_pointer
+syn keyword euphoria3Library tick_rate sleep get_position graphics_mode
+syn keyword euphoria3Library video_config scroll wrap text_color bk_color
+syn keyword euphoria3Library palette all_palette get_all_palette read_bitmap
+syn keyword euphoria3Library save_bitmap get_active_page set_active_page
+syn keyword euphoria3Library get_display_page set_display_page sound
+syn keyword euphoria3Library cursor text_rows get_screen_char put_screen_char
+syn keyword euphoria3Library save_text_image display_text_image draw_line
+syn keyword euphoria3Library polygon ellipse save_screen save_image display_image
+syn keyword euphoria3Library dos_interrupt allocate free allocate_low free_low
+syn keyword euphoria3Library allocate_string register_block unregister_block
+syn keyword euphoria3Library get_vector set_vector lock_memory int_to_bytes
+syn keyword euphoria3Library bytes_to_int int_to_bits bits_to_int atom_to_float64
+syn keyword euphoria3Library atom_to_float32 float64_to_atom float32_to_atom
+syn keyword euphoria3Library set_rand use_vesa crash_file crash_message
+syn keyword euphoria3Library crash_routine open_dll define_c_proc define_c_func
+syn keyword euphoria3Library define_c_var call_back message_box free_console
+syn keyword euphoria3Library instance
+
+" Library Identifiers (Function) - from $EUDIR/doc/database.doc:
+syn keyword euphoria3Library db_create db_open db_select db_close db_create_table
+syn keyword euphoria3Library db_select_table db_rename_table db_delete_table
+syn keyword euphoria3Library db_table_list db_table_size db_find_key db_record_key
+syn keyword euphoria3Library db_record_data db_insert db_delete_record
+syn keyword euphoria3Library db_replace_data db_compress db_dump db_fatal_id
+
+" Linux shell comment (#!...):
+syn match euphoria3Comment "\%^#!.*$"
+" Comment on one line:
+syn region euphoria3Comment start=/--/ end=/$/
+
+" Delimiters and brackets:
+syn match euphoria3Delimit "[([\])]"
+syn match euphoria3Delimit "\.\."
+syn match euphoria3Operator "[{}]"
+
+" Character constant:
+syn region euphoria3Char start=/'/ skip=/\\'\|\\\\/ end=/'/ oneline
+
+" String constant:
+syn region euphoria3String start=/"/ skip=/\\"\|\\\\/ end=/"/ oneline
+
+" Hexadecimal integer:
+syn match euphoria3Number "#[0-9A-F]\+\>"
+
+" Integer/Floating point without a dot:
+syn match euphoria3Number "\<\d\+\>"
+" Floating point with dot:
+syn match euphoria3Number "\<\d\+\.\d*\>"
+" Floating point starting with a dot:
+syn match euphoria3Number "\.\d\+\>"
+" Boolean constants:
+syn keyword euphoria3Boolean true TRUE false FALSE
+
+" Define the default highlighting.
+" Only used when an item doesn't have highlighting yet:
+hi def link euphoria3Comment Comment
+hi def link euphoria3String String
+hi def link euphoria3Char Character
+hi def link euphoria3Number Number
+hi def link euphoria3Boolean Boolean
+hi def link euphoria3Builtin Identifier
+hi def link euphoria3Library Function
+hi def link euphoria3Keyword Statement
+hi def link euphoria3Operator Statement
+hi def link euphoria3Debug Debug
+hi def link euphoria3Delimit Delimiter
+
+let b:current_syntax = "euphoria3"
+