comparison runtime/syntax/forth.vim @ 3557:9cb3a75a20b9

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Fri, 01 Jun 2012 22:38:45 +0200
parents ba708ee8d69d
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
3556:1110869e267a 3557:9cb3a75a20b9
1 " Vim syntax file 1 " Vim syntax file
2 " Language: FORTH 2 " Language: FORTH
3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> 3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
4 " Last Change: Sa 07 Jan 2012 21:30:55 CET 4 " Last Change: So 27 Mai 2012 15:56:28 CEST
5 " Filenames: *.fs,*.ft 5 " Filenames: *.fs,*.ft
6 " URL: http://www.cvjb.de/comp/vim/forth.vim 6 " URL: http://www.cvjb.de/comp/vim/forth.vim
7 7
8 " $Id: forth.vim,v 1.13 2012/01/07 21:31:31 bruessow Exp $ 8 " $Id: forth.vim,v 1.14 2012/05/27 15:57:22 bruessow Exp $
9 9
10 " The list of keywords is incomplete, compared with the offical ANS 10 " The list of keywords is incomplete, compared with the official ANS
11 " wordlist. If you use this language, please improve it, and send me 11 " wordlist. If you use this language, please improve it, and send me
12 " the patches. 12 " the patches.
13 " 13 "
14 " Before sending me patches, please download the newest version of this file 14 " Before sending me patches, please download the newest version of this file
15 " from http://www.cvjb.de/comp/vim/forth.vim or http://www.vim.org/ (search 15 " from http://www.cvjb.de/comp/vim/forth.vim or http://www.vim.org/ (search
16 " for forth.vim). 16 " for forth.vim).
17 17
18 " Many Thanks to... 18 " Many Thanks to...
19 "
20 " 2012-05-13:
21 " Dominique Pellé <dominique dot pelle at gmail dot com> for sending the
22 " patch to allow spellchecking of strings, comments, ...
19 " 23 "
20 " 2012-01-07: 24 " 2012-01-07:
21 " Thilo Six <T.Six at gmx dot de> send a patch for cpoptions. 25 " Thilo Six <T.Six at gmx dot de> send a patch for cpoptions.
22 " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 26 " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151
23 " 27 "
42 " 46 "
43 " 2006-05-25: 47 " 2006-05-25:
44 " Bill McCarthy <WJMc@...> and Ilya Sher <ilya-vim@...> 48 " Bill McCarthy <WJMc@...> and Ilya Sher <ilya-vim@...>
45 " Who found a bug in the ccomment line in 2004!!! 49 " Who found a bug in the ccomment line in 2004!!!
46 " I'm really very sorry, that it has taken two years to fix that 50 " I'm really very sorry, that it has taken two years to fix that
47 " in the offical version of this file. Shame on me. 51 " in the official version of this file. Shame on me.
48 " I think my face will be red the next ten years... 52 " I think my face will be red the next ten years...
49 " 53 "
50 " 2006-05-21: 54 " 2006-05-21:
51 " Thomas E. Vaughan <tevaugha at ball dot com> send me a patch 55 " Thomas E. Vaughan <tevaugha at ball dot com> send me a patch
52 " for the parenthesis comment word, so words with a trailing 56 " for the parenthesis comment word, so words with a trailing
254 syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order! 258 syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order!
255 syn match forthInteger '\<%[0-1]*[0-1]\+\>' 259 syn match forthInteger '\<%[0-1]*[0-1]\+\>'
256 syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>' 260 syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>'
257 syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>' 261 syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>'
258 262
259 " XXX If you find this overkill you can remove it. this has to come after the 263 " XXX If you find this overkill you can remove it. This has to come after the
260 " highlighting for numbers otherwise it has no effect. 264 " highlighting for numbers otherwise it has no effect.
261 syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo 265 syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo
262 266
263 " Strings 267 " Strings
264 syn region forthString start=+\.*\"+ end=+"+ end=+$+ 268 syn region forthString start=+\.*\"+ end=+"+ end=+$+ contains=@Spell
265 " XXX 269 " XXX
266 syn region forthString start=+s\"+ end=+"+ end=+$+ 270 syn region forthString start=+s\"+ end=+"+ end=+$+ contains=@Spell
267 syn region forthString start=+c\"+ end=+"+ end=+$+ 271 syn region forthString start=+c\"+ end=+"+ end=+$+ contains=@Spell
268 272
269 " Comments 273 " Comments
270 syn match forthComment '\\\s.*$' contains=forthTodo,forthSpaceError 274 syn match forthComment '\\\s.*$' contains=@Spell,forthTodo,forthSpaceError
271 syn region forthComment start='\\S\s' end='.*' contains=forthTodo,forthSpaceError 275 syn region forthComment start='\\S\s' end='.*' contains=@Spell,forthTodo,forthSpaceError
272 syn match forthComment '\.(\s[^)]*)' contains=forthTodo,forthSpaceError 276 syn match forthComment '\.(\s[^)]*)' contains=@Spell,forthTodo,forthSpaceError
273 syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=forthTodo,forthSpaceError 277 syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=@Spell,forthTodo,forthSpaceError
274 syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError 278 syn region forthComment start='/\*' end='\*/' contains=@Spell,forthTodo,forthSpaceError
275 279
276 " Include files 280 " Include files
277 syn match forthInclude '^INCLUDE\s\+\k\+' 281 syn match forthInclude '^INCLUDE\s\+\k\+'
278 syn match forthInclude '^require\s\+\k\+' 282 syn match forthInclude '^require\s\+\k\+'
279 syn match forthInclude '^fload\s\+' 283 syn match forthInclude '^fload\s\+'
293 command -nargs=+ HiLink hi link <args> 297 command -nargs=+ HiLink hi link <args>
294 else 298 else
295 command -nargs=+ HiLink hi def link <args> 299 command -nargs=+ HiLink hi def link <args>
296 endif 300 endif
297 301
298 " The default methods for highlighting. Can be overriden later. 302 " The default methods for highlighting. Can be overridden later.
299 HiLink forthTodo Todo 303 HiLink forthTodo Todo
300 HiLink forthOperators Operator 304 HiLink forthOperators Operator
301 HiLink forthMath Number 305 HiLink forthMath Number
302 HiLink forthInteger Number 306 HiLink forthInteger Number
303 HiLink forthFloat Float 307 HiLink forthFloat Float