57 lines
1.4 KiB
Plaintext
57 lines
1.4 KiB
Plaintext
<SyntaxDefinition name="YACC" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
|
<Color name="Comment" foreground="#7A987A" />
|
|
<Color name="String" foreground="#C0BF86" />
|
|
<Color name="Digits" foreground="#6196BE" />
|
|
<Color name="Keyword" foreground="#66C2CF" />
|
|
|
|
<RuleSet name="Common">
|
|
<Span color="Comment" begin="//" />
|
|
<Span color="Comment" multiline="true" begin="/\*" end="\*/" />
|
|
|
|
<Span color="String">
|
|
<Begin>"</Begin>
|
|
<End>"</End>
|
|
<RuleSet>
|
|
<!-- escape-sequences -->
|
|
<Span begin="\\" end="." />
|
|
</RuleSet>
|
|
</Span>
|
|
|
|
<!-- Digits -->
|
|
<Rule color="Digits">
|
|
\b0[xX][0-9a-fA-F]+ # hex number
|
|
| \b
|
|
( \d+(\.[0-9]+)? #number with optional floating point
|
|
| \.[0-9]+ #or just starting with floating point
|
|
)
|
|
([eE][+-]?[0-9]+)? # optional exponent
|
|
</Rule>
|
|
</RuleSet>
|
|
|
|
<RuleSet>
|
|
<Import ruleSet="Common"/>
|
|
|
|
<Rule fontWeight="bold" color="Keyword">
|
|
^%\S+
|
|
</Rule>
|
|
|
|
<Span multiline="true">
|
|
<Begin>%%</Begin>
|
|
<End>%%</End>
|
|
|
|
<RuleSet>
|
|
<Import ruleSet="Common"/>
|
|
|
|
<!-- In-code links -->
|
|
<Rule fontWeight="bold" foreground="#DDDDDD">
|
|
\$\$|\$\d+|@\d+|@\$
|
|
</Rule>
|
|
|
|
<!-- Rule nonterminal -->
|
|
<Rule fontWeight="bold" foreground="#DBAB8B">
|
|
^[a-zA-Z_][a-zA-Z_0-9]*
|
|
</Rule>
|
|
</RuleSet>
|
|
</Span>
|
|
</RuleSet>
|
|
</SyntaxDefinition> |