annotate runtime/syntax/bc.vim @ 284:e697bd3c3876 v7.0075

updated for version 7.0075
author vimboss
date Sun, 22 May 2005 22:12:58 +0000
parents 3fc0f57ecb91
children 9cb3a75a20b9
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>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 2001 Sep 02
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Available on: www.gjh.sk/~vlado/bc.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword bcKeyword if else while for break continue return limits halt quit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword bcKeyword define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword bcKeyword length read sqrt print
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword bcType auto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword bcConstant scale ibase obase last
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 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
28 syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Any other stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match bcIdentifier "[a-z_][a-z0-9_]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match bcString "\"[^"]*\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match bcNumber "[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match bcComment "\#.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region bcComment start="/\*" end="\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Parent ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll
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 match bcParenError "]"
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
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 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " 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
57 if version >= 508 || !exists("did_bc_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let did_bc_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink bcKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink bcType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink bcConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink bcNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink bcComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink bcString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink bcSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink bcParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 let b:current_syntax = "bc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " vim: ts=8