-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuzzgen.vim
59 lines (44 loc) · 1.98 KB
/
fuzzgen.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
" Vim syntax file
" " Language: FuzzGen Grammar Files
" " Maintainer: Nina Rinskaya
" " Latest Revision: 10 Aug 2021
"
syn clear
" Keywords
syn region fuzzgenRuleBlock matchgroup=fuzzgenBlock start="BEGIN_RULE" end="END_RULE" keepend fold transparent contains=ALL
syn region fuzzgenScope matchgroup=fuzzgenBlock start="BEGIN_SCOPE" end="END_SCOPE" keepend fold transparent contains=ALL
" syn region fuzzgenRuleBlock start="BEGIN_RULE" end="BEGIN_RULE" fold transparent contains=fuzzgenNonTerminal,fuzzgenTerminalString,fuzzgenRuleBlock,fuzzgenScope
" syn region fuzzgenScope start="BEGIN_SCOPE" end="END_SCOPE" fold transparent contained
syn match fuzzgenComment "//.*$"
syn match fuzzgenNewLine "\\n"
syn match fuzzgenCommand "#CREATE_[^[:space:]]*"
syn match fuzzgenCommand "#REUSE_[^[:space:]]*"
syn match fuzzgenCommand "#GET_[^[:space:]]*"
syn match fuzzgenNonTerminal "@[^[:space:]]*"
"syn match fuzzgenEnvVarName "[^[:space:]]*" nextgroup=fuzzgenEnvVarSetOp contained
"syn match fuzzgenEnvVarValue "[^[:space:]]*" nextgroup=fuzzgenEnvVarValue
"syn match fuzzgenEnvVarSetOp "=" nextgroup=fuzzgenEnvVarValue
" syn region fuzzgenSet start="SET" end="=" keepend
syn keyword fuzzgenInclude INCLUDE
syn keyword fuzzgenSet SET
syn keyword fuzzgenRegisterLazyIDs REGISTER_LAZY_IDS
" syn region fuzzgenTerminalString start='`' end='`' contained
syn region fuzzgenTerminalString start='`' end='`'
hi def link fuzzgenInclude Include
hi def link fuzzgenComment Comment
hi def link fuzzgenRuleBlock Repeat
hi def link fuzzgenScope Repeat
hi def link fuzzgenNonTerminal Identifier
hi def link fuzzgenTerminalString String
hi def link celDesc PreProc
hi def link celNumber Constant
hi def link fuzzgenSet Statement
hi def link fuzzgenBlock Type
hi def link fuzzgenEnvVarSetOp Operator
hi def link fuzzgenRegisterLazyIDs Statement
hi def link fuzzgenCommand Statement
hi def link fuzzgenNewLine Special
if exists("b:fuzzgen")
finish
endif
let b:current_syntax = "fuzzgen"