Mercurial > vim
comparison runtime/syntax/reva.vim @ 3371:8dcf3ea92b63
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 22 Feb 2012 17:30:19 +0100 |
parents | 73fe8baea242 |
children | 43efa4f5a8ea |
comparison
equal
deleted
inserted
replaced
3370:56d11b2b77eb | 3371:8dcf3ea92b63 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Reva Forth | 2 " Language: Reva Forth |
3 " Version: 7.1 | 3 " Version: 2011.2 |
4 " Last Change: 2008/01/11 | 4 " Last Change: 2012/02/13 |
5 " Maintainer: Ron Aaron <ron@ronware.org> | 5 " Maintainer: Ron Aaron <ron@ronware.org> |
6 " URL: http://ronware.org/reva/ | 6 " URL: http://ronware.org/reva/ |
7 " Filetypes: *.rf *.frt | 7 " Filetypes: *.rf *.frt |
8 " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' | 8 " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' |
9 | 9 |
10 " For version 5.x: Clear all syntax items and don't load | 10 " For version 5.x: Clear all syntax items and don't load |
11 " For version 6.x: Quit when a syntax file was already loaded | 11 " For version 6.x: Quit when a syntax file was already loaded |
12 if version < 600 | 12 if version < 600 |
15 finish | 15 finish |
16 elseif exists("b:current_syntax") | 16 elseif exists("b:current_syntax") |
17 finish | 17 finish |
18 endif | 18 endif |
19 | 19 |
20 let s:cpo_save = &cpo | |
21 set cpo&vim | |
22 | |
20 syn clear | 23 syn clear |
21 | 24 |
22 " Synchronization method | 25 " Synchronization method |
23 syn sync ccomment | 26 syn sync ccomment |
24 syn sync maxlines=100 | 27 syn sync maxlines=100 |
25 | 28 |
26 | 29 |
27 syn case ignore | 30 syn case ignore |
28 " Some special, non-FORTH keywords | 31 " Some special, non-FORTH keywords |
37 | 40 |
38 | 41 |
39 syn case match | 42 syn case match |
40 " basic mathematical and logical operators | 43 " basic mathematical and logical operators |
41 syn keyword revaoperators + - * / mod /mod negate abs min max umin umax | 44 syn keyword revaoperators + - * / mod /mod negate abs min max umin umax |
42 syn keyword revaoperators and or xor not invert 1+ 1- | 45 syn keyword revaoperators and or xor not invert 1+ 1- |
43 syn keyword revaoperators m+ */ */mod m* um* m*/ um/mod fm/mod sm/rem | 46 syn keyword revaoperators m+ */ */mod m* um* m*/ um/mod fm/mod sm/rem |
44 syn keyword revaoperators d+ d- dnegate dabs dmin dmax > < = >> << u< <> | 47 syn keyword revaoperators d+ d- dnegate dabs dmin dmax > < = >> << u< <> |
45 | 48 |
46 | 49 |
47 " stack manipulations | 50 " stack manipulations |
51 " syn keyword revastack sp@ sp! rp@ rp! | 54 " syn keyword revastack sp@ sp! rp@ rp! |
52 | 55 |
53 " address operations | 56 " address operations |
54 syn keyword revamemory @ ! +! c@ c! 2@ 2! align aligned allot allocate here free resize | 57 syn keyword revamemory @ ! +! c@ c! 2@ 2! align aligned allot allocate here free resize |
55 syn keyword revaadrarith chars char+ cells cell+ cell cell- 2cell+ 2cell- 3cell+ 4cell+ | 58 syn keyword revaadrarith chars char+ cells cell+ cell cell- 2cell+ 2cell- 3cell+ 4cell+ |
56 syn keyword revamemblks move fill | 59 syn keyword revamemblks move fill |
57 | 60 |
58 " conditionals | 61 " conditionals |
59 syn keyword revacond if else then =if >if <if <>if if0 ;; catch throw | 62 syn keyword revacond if else then =if >if <if <>if if0 ;; catch throw |
60 | 63 |
61 " iterations | 64 " iterations |
62 syn keyword revaloop while repeat until again | 65 syn keyword revaloop while repeat until again |
63 syn keyword revaloop do loop i j leave unloop skip more | 66 syn keyword revaloop do loop i j leave unloop skip more |
64 | 67 |
65 " new words | 68 " new words |
66 syn match revaColonDef '\<noname:\|\<:\s+' contains=revaComment | 69 syn match revaColonDef '\<noname:\|\<:\s+' contains=revaComment |
67 syn keyword revaEndOfColonDef ; ;inline | 70 syn keyword revaEndOfColonDef ; ;inline |
68 syn keyword revadefine constant constant, variable create variable, | 71 syn keyword revadefine constant constant, variable create variable, |
69 syn keyword revadefine user value to +to defer! defer@ defer is does> immediate | 72 syn keyword revadefine user value to +to defer! defer@ defer is does> immediate |
70 syn keyword revadefine compile literal ' ['] | 73 syn keyword revadefine compile literal ' ['] |
71 | 74 |
72 " Built in words | 75 " Built in words |
73 com! -nargs=+ Builtin syn keyword revaBuiltin <args> | 76 com! -nargs=+ Builtin syn keyword revaBuiltin <args> |
74 Builtin execute ahead interp bye >body here pad words make | 77 Builtin execute ahead interp bye >body here pad words make |
75 Builtin accept close cr creat delete ekey emit fsize ioerr key? | 78 Builtin accept close cr creat delete ekey emit fsize ioerr key? |
76 Builtin mtime open/r open/rw read rename seek space spaces stat | 79 Builtin mtime open/r open/rw read rename seek space spaces stat |
77 Builtin tell type type_ write (seek) (argv) (save) 0; 0drop; | 80 Builtin tell type type_ write (seek) (argv) (save) 0; 0drop; |
78 Builtin >class >lz >name >xt alias alias: appname argc asciiz, asciizl, | 81 Builtin >class >lz >name >xt alias alias: appname argc asciiz, asciizl, |
79 Builtin body> clamp depth disassemble findprev fnvhash getenv here, | 82 Builtin body> clamp depth disassemble findprev fnvhash getenv here, |
80 Builtin iterate last! last@ later link lz> lzmax os parse/ peek | 83 Builtin iterate last! last@ later link lz> lzmax os parse/ peek |
81 Builtin peek-n pop prior push put rp@ rpick save setenv slurp | 84 Builtin peek-n pop prior push put rp@ rpick save setenv slurp |
82 Builtin stack-empty? stack-iterate stack-size stack: THROW_BADFUNC | 85 Builtin stack-empty? stack-iterate stack-size stack: THROW_BADFUNC |
83 Builtin THROW_BADLIB THROW_GENERIC used xt>size z, | 86 Builtin THROW_BADLIB THROW_GENERIC used xt>size z, |
84 Builtin +lplace +place -chop /char /string bounds c+lplace c+place | 87 Builtin +lplace +place -chop /char /string bounds c+lplace c+place |
85 Builtin chop cmp cmpi count lc lcount lplace place quote rsplit search split | 88 Builtin chop cmp cmpi count lc lcount lplace place quote rsplit search split |
86 Builtin zcount zt \\char | 89 Builtin zcount zt \\char |
87 Builtin chdir g32 k32 u32 getcwd getpid hinst osname stdin stdout | 90 Builtin chdir g32 k32 u32 getcwd getpid hinst osname stdin stdout |
88 Builtin (-lib) (bye) (call) (else) (find) (func) (here) (if (lib) (s0) (s^) | 91 Builtin (-lib) (bye) (call) (else) (find) (func) (here) (if (lib) (s0) (s^) |
89 Builtin (to~) (while) >in >rel ?literal appstart cold compiling? context? d0 default_class | 92 Builtin (to~) (while) >in >rel ?literal appstart cold compiling? context? d0 default_class |
90 Builtin defer? dict dolstr dostr find-word h0 if) interp isa onexit | 93 Builtin defer? dict dolstr dostr find-word h0 if) interp isa onexit |
91 Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib | 94 Builtin onstartup pdoes pop>ebx prompt rel> rp0 s0 src srcstr state str0 then,> then> tib |
92 Builtin tp vector vector! word? xt? .ver revaver revaver# && '' 'constant 'context | 95 Builtin tp vector vector! word? xt? .ver revaver revaver# && '' 'constant 'context |
93 Builtin 'create 'defer 'does 'forth 'inline 'macro 'macront 'notail 'value 'variable | 96 Builtin 'create 'defer 'does 'forth 'inline 'macro 'macront 'notail 'value 'variable |
94 Builtin (.r) (context) (create) (header) (hide) (inline) (p.r) (words~) (xfind) | 97 Builtin (.r) (context) (create) (header) (hide) (inline) (p.r) (words~) (xfind) |
95 Builtin ++ -- , -2drop -2nip -link -swap . .2x .classes .contexts .funcs .libs .needs .r | 98 Builtin ++ -- , -2drop -2nip -link -swap . .2x .classes .contexts .funcs .libs .needs .r |
96 Builtin .rs .x 00; 0do 0if 1, 2, 3, 2* 2/ 2constant 2variable 3dup 4dup ;then >base >defer | 99 Builtin .rs .x 00; 0do 0if 1, 2, 3, 2* 2/ 2constant 2variable 3dup 4dup ;then >base >defer |
97 Builtin >rr ? ?do @execute @rem appdir argv as back base base! between chain cleanup-libs | 100 Builtin >rr ? ?do @execute @rem appdir argv as back base base! between chain cleanup-libs |
98 Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave | 101 Builtin cmove> context?? ctrl-c ctx>name data: defer: defer@def dictgone do_cr eleave |
99 Builtin endcase endof eval exception exec false find func: header heapgone help help/ | 102 Builtin endcase endof eval exception exec false find func: header heapgone help help/ |
100 Builtin hex# hide inline{ last lastxt lib libdir literal, makeexename mnotail ms ms@ | 103 Builtin hex# hide inline{ last lastxt lib libdir literal, makeexename mnotail ms ms@ |
101 Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln | 104 Builtin newclass noop nosavedict notail nul of off on p: padchar parse parseln |
102 Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp | 105 Builtin parsews rangeof rdepth remains reset reva revaused rol8 rr> scratch setclass sp |
103 Builtin strof super> temp time&date true turnkey? undo vfunc: w! w@ | 106 Builtin strof super> temp time&date true turnkey? undo vfunc: w! w@ |
104 Builtin xchg xchg2 xfind xt>name xwords { {{ }} } _+ _1+ _1- pathsep case \|| | 107 Builtin xchg xchg2 xfind xt>name xwords { {{ }} } _+ _1+ _1- pathsep case \|| |
105 " p[ [''] [ ['] | 108 " p[ [''] [ ['] |
106 | 109 |
107 | 110 |
108 " debugging | 111 " debugging |
109 syn keyword revadebug .s dump see | 112 syn keyword revadebug .s dump see |
110 | 113 |
114 " syn match revaCharOps '\<char\s\S\s' | 117 " syn match revaCharOps '\<char\s\S\s' |
115 " syn match revaCharOps '\<\[char\]\s\S\s' | 118 " syn match revaCharOps '\<\[char\]\s\S\s' |
116 " syn region revaCharOps start=+."\s+ skip=+\\"+ end=+"+ | 119 " syn region revaCharOps start=+."\s+ skip=+\\"+ end=+"+ |
117 | 120 |
118 " char-number conversion | 121 " char-number conversion |
119 syn keyword revaconversion s>d >digit digit> >single >double >number >float | 122 syn keyword revaconversion s>d >digit digit> >single >double >number >float |
120 | 123 |
121 " contexts | 124 " contexts |
122 syn keyword revavocs forth macro inline | 125 syn keyword revavocs forth macro inline |
123 syn keyword revavocs context: | 126 syn keyword revavocs context: |
124 syn match revavocs /\<\~[^~ ]*/ | 127 syn match revavocs /\<\~[^~ ]*/ |
125 syn match revavocs /[^~ ]*\~\>/ | 128 syn match revavocs /[^~ ]*\~\>/ |
126 | 129 |
127 " numbers | 130 " numbers |
128 syn keyword revamath decimal hex base binary octal | 131 syn keyword revamath decimal hex base binary octal |
133 syn match revainteger '\<%[0-1]*[0-1]\+\>' | 136 syn match revainteger '\<%[0-1]*[0-1]\+\>' |
134 syn match revainteger "\<'.\>" | 137 syn match revainteger "\<'.\>" |
135 | 138 |
136 " Strings | 139 " Strings |
137 " syn region revaString start=+\.\?\"+ end=+"+ end=+$+ | 140 " syn region revaString start=+\.\?\"+ end=+"+ end=+$+ |
138 syn region revaString start=/"/ skip=/\\"/ end=/"/ | 141 syn region revaString start=/"/ skip=/\\"/ end=/"/ |
139 | 142 |
140 " Comments | 143 " Comments |
141 syn region revaComment start='\\S\s' end='.*' contains=revaTodo | 144 syn region revaComment start='\\S\s' end='.*' contains=revaTodo |
142 syn match revaComment '\.(\s[^)]\{-})' contains=revaTodo | 145 syn match revaComment '\.(\s[^)]\{-})' contains=revaTodo |
143 syn region revaComment start='(\s' skip='\\)' end=')' contains=revaTodo | 146 syn region revaComment start='(\s' skip='\\)' end=')' contains=revaTodo |
185 hi def link revaInclude Include | 188 hi def link revaInclude Include |
186 hi def link revaBuiltin Keyword | 189 hi def link revaBuiltin Keyword |
187 endif | 190 endif |
188 | 191 |
189 let b:current_syntax = "reva" | 192 let b:current_syntax = "reva" |
193 let &cpo = s:cpo_save | |
194 unlet s:cpo_save | |
190 | 195 |
191 " vim: ts=8:sw=4:nocindent:smartindent: | 196 " vim: ts=8:sw=4:nocindent:smartindent: |