Skip to content

Commit 4d9be97

Browse files
author
Adrian Thurston
committed
Patch from Ismael Luceno adds builtin machines as constants.
1 parent 1ea4a9e commit 4d9be97

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

CREDITS

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ missed.
4040
Kenny MacDermid, MenTaLguY, Manoj Rajagopalan, Tim Chklovski,
4141
Mikkel Fahnøe Jørgensen, Andrei Polushin, Evan Phoenix, David Balmain,
4242
Ross Thomas, Mitchell Foral, John D. Mitchell, Diego 'Flameeyes' Pettenò,
43-
Jose Quinteiro, William Morgan, _why, Iñaki Baz Castillo, Attila Sztupák
43+
Jose Quinteiro, William Morgan, _why, Iñaki Baz Castillo, Attila Sztupák,
44+
Ismael Luceno

ragel-d.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*"
5454
syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack
5555
syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak
5656

57-
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords
57+
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords,rlBuiltIns
5858

5959
syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems
6060
syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems
@@ -92,6 +92,9 @@ syntax match rlOtherOps "<:" contained
9292
syntax keyword rlKeywords machine action context include import export prepush postpop contained
9393
syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
9494

95+
" Built-in rules
96+
syntax keyword rlBuiltIns any ascii extend alpha digit alnum lower upper xdigit cntrl graph print punct space zlen empty contained
97+
9598
" Case Labels
9699
syntax keyword caseLabelKeyword case contained
97100
syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword
@@ -152,5 +155,6 @@ hi link fsmKeyword Keyword
152155
hi link anyLabel Label
153156
hi link caseLabelKeyword Keyword
154157
hi link beginRL Type
158+
hi link rlBuiltIns Constant
155159

156160
let b:current_syntax = "ragel"

ragel-java.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*"
4949
syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack
5050
syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak
5151

52-
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords
52+
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords,rlBuiltIns
5353

5454
syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems
5555
syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems
@@ -87,6 +87,9 @@ syntax match rlOtherOps "<:" contained
8787
syntax keyword rlKeywords machine action context include import export prepush postpop contained
8888
syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
8989

90+
" Built-in rules
91+
syntax keyword rlBuiltIns any ascii extend alpha digit alnum lower upper xdigit cntrl graph print punct space zlen empty contained
92+
9093
" Case Labels
9194
syntax keyword caseLabelKeyword case contained
9295
syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword
@@ -147,5 +150,6 @@ hi link fsmKeyword Keyword
147150
hi link anyLabel Label
148151
hi link caseLabelKeyword Keyword
149152
hi link beginRL Type
153+
hi link rlBuiltIns Constant
150154

151155
let b:current_syntax = "ragel"

ragel-m.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*"
5252
syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack
5353
syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak
5454

55-
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords
55+
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords,rlBuiltIns
5656

5757
syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems
5858
syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems
@@ -90,6 +90,9 @@ syntax match rlOtherOps "<:" contained
9090
syntax keyword rlKeywords machine action context include import export prepush postpop contained
9191
syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
9292

93+
" Built-in rules
94+
syntax keyword rlBuiltIns any ascii extend alpha digit alnum lower upper xdigit cntrl graph print punct space zlen empty contained
95+
9396
" Case Labels
9497
syntax keyword caseLabelKeyword case contained
9598
syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword
@@ -150,5 +153,6 @@ hi link fsmKeyword Keyword
150153
hi link anyLabel Label
151154
hi link caseLabelKeyword Keyword
152155
hi link beginRL Type
156+
hi link rlBuiltIns Constant
153157

154158
let b:current_syntax = "ragel"

ragel.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*"
4747
syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack
4848
syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak
4949

50-
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords
50+
syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords,rlBuiltIns
5151

5252
syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems
5353
syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems
@@ -85,6 +85,9 @@ syntax match rlOtherOps "<:" contained
8585
syntax keyword rlKeywords machine action context include import export prepush postpop contained
8686
syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained
8787

88+
" Built-in rules
89+
syntax keyword rlBuiltIns any ascii extend alpha digit alnum lower upper xdigit cntrl graph print punct space zlen empty contained
90+
8891
" Case Labels
8992
syntax keyword caseLabelKeyword case contained
9093
syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword
@@ -145,5 +148,6 @@ hi link fsmKeyword Keyword
145148
hi link anyLabel Label
146149
hi link caseLabelKeyword Keyword
147150
hi link beginRL Type
151+
hi link rlBuiltIns Constant
148152

149153
let b:current_syntax = "ragel"

0 commit comments

Comments
 (0)