annotate runtime/syntax/bc.vim @ 3920:c53344bacabf

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Thu, 15 Nov 2012 21:28:22 +0100
parents 9cb3a75a20b9
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: bc - An arbitrary precision calculator language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Vladimir Scholtz <vlado@gjh.sk>
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last change: 2012 Jun 01
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " (Dominique Pelle added @Spell)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Available on: www.gjh.sk/~vlado/bc.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword bcKeyword if else while for break continue return limits halt quit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword bcKeyword define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword bcKeyword length read sqrt print
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword bcType auto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword bcConstant scale ibase obase last
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword bcConstant BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX BC_STRING_MAX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Any other stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match bcIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " String
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
35 syn match bcString "\"[^"]*\"" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match bcNumber "[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Comment
3557
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
41 syn match bcComment "\#.*" contains=@Spell
9cb3a75a20b9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
42 syn region bcComment start="/\*" end="\*/" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Parent ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region bcList matchgroup=Delimiter start="\[" skip="|.\{-}|" matchgroup=Delimiter end="\]" contains=@bcAll
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match bcParenError "]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match bcParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version >= 508 || !exists("did_bc_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 let did_bc_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink bcKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink bcType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink bcConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink bcNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink bcComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink bcString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink bcSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink bcParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let b:current_syntax = "bc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " vim: ts=8