Last change
on this file since 14498 was
9674,
checked in by gkronber, 11 years ago
|
#2026: Worked on integration of ICSharpCode.AvalonEdit control for GPDL syntax-highlighting and error reporting.
|
File size:
4.0 KB
|
Line | |
---|
1 | <!-- Syntax definition of GPDL for AvalonEdit syntax highlighting -->
|
---|
2 | <SyntaxDefinition name="GPDL"
|
---|
3 | xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
---|
4 | <Color name="Comment" foreground="Green" />
|
---|
5 | <Color name="SourceCode" foreground="SlateGray" />
|
---|
6 |
|
---|
7 | <!-- This is the main ruleset. -->
|
---|
8 | <RuleSet ignoreCase="true">
|
---|
9 | <Span color="Comment" multiline="true" begin="/\*" end="\*/" />
|
---|
10 | <Span color="SourceCode" multiline="true" begin="<<" end=">>">
|
---|
11 | <RuleSet>
|
---|
12 | <Span color="Comment" multiline="true" begin="/\*" end="\*/" />
|
---|
13 | <Span color="Comment" multiline="false" begin="//" />
|
---|
14 | <Keywords fontWeight="bold" foreground="Blue">
|
---|
15 | <!-- reduced set of allowed C# keywords -->
|
---|
16 | <Word>abstract</Word>
|
---|
17 | <Word>as</Word>
|
---|
18 | <Word>base</Word>
|
---|
19 | <Word>bool</Word>
|
---|
20 | <Word>break</Word>
|
---|
21 | <Word>byte</Word>
|
---|
22 | <Word>case</Word>
|
---|
23 | <Word>catch</Word>
|
---|
24 | <Word>char</Word>
|
---|
25 | <Word>checked</Word>
|
---|
26 | <Word>class</Word>
|
---|
27 | <Word>const</Word>
|
---|
28 | <Word>continue</Word>
|
---|
29 | <Word>decimal</Word>
|
---|
30 | <Word>default</Word>
|
---|
31 | <Word>delegate</Word>
|
---|
32 | <Word>do</Word>
|
---|
33 | <Word>double</Word>
|
---|
34 | <Word>else</Word>
|
---|
35 | <Word>enum</Word>
|
---|
36 | <Word>event</Word>
|
---|
37 | <Word>explicit</Word>
|
---|
38 | <Word>extern</Word>
|
---|
39 | <Word>false</Word>
|
---|
40 | <Word>finally</Word>
|
---|
41 | <Word>fixed</Word>
|
---|
42 | <Word>float</Word>
|
---|
43 | <Word>for</Word>
|
---|
44 | <Word>foreach</Word>
|
---|
45 | <Word>goto</Word>
|
---|
46 | <Word>if</Word>
|
---|
47 | <Word>implicit</Word>
|
---|
48 | <Word>in</Word>
|
---|
49 | <Word>int</Word>
|
---|
50 | <Word>interface</Word>
|
---|
51 | <Word>internal</Word>
|
---|
52 | <Word>is</Word>
|
---|
53 | <Word>lock</Word>
|
---|
54 | <Word>long</Word>
|
---|
55 | <Word>new</Word>
|
---|
56 | <Word>null</Word>
|
---|
57 | <Word>object</Word>
|
---|
58 | <Word>operator</Word>
|
---|
59 | <Word>out</Word>
|
---|
60 | <Word>override</Word>
|
---|
61 | <Word>params</Word>
|
---|
62 | <Word>private</Word>
|
---|
63 | <Word>protected</Word>
|
---|
64 | <Word>public</Word>
|
---|
65 | <Word>readonly</Word>
|
---|
66 | <Word>ref</Word>
|
---|
67 | <Word>return</Word>
|
---|
68 | <Word>sbyte</Word>
|
---|
69 | <Word>sealed</Word>
|
---|
70 | <Word>short</Word>
|
---|
71 | <Word>sizeof</Word>
|
---|
72 | <Word>stackalloc</Word>
|
---|
73 | <Word>static</Word>
|
---|
74 | <Word>string</Word>
|
---|
75 | <Word>struct</Word>
|
---|
76 | <Word>switch</Word>
|
---|
77 | <Word>this</Word>
|
---|
78 | <Word>throw</Word>
|
---|
79 | <Word>true</Word>
|
---|
80 | <Word>try</Word>
|
---|
81 | <Word>typeof</Word>
|
---|
82 | <Word>uint</Word>
|
---|
83 | <Word>ulong</Word>
|
---|
84 | <Word>unchecked</Word>
|
---|
85 | <Word>unsafe</Word>
|
---|
86 | <Word>ushort</Word>
|
---|
87 | <Word>using</Word>
|
---|
88 | <Word>virtual</Word>
|
---|
89 | <Word>volatile</Word>
|
---|
90 | <Word>void</Word>
|
---|
91 | <Word>while</Word>
|
---|
92 | <!-- GPDL beginning/end of C# source -->
|
---|
93 | <Word><<</Word>
|
---|
94 | <Word>>></Word>
|
---|
95 | </Keywords>
|
---|
96 | </RuleSet>
|
---|
97 | </Span>
|
---|
98 | <Keywords fontWeight="bold" foreground="Blue" >
|
---|
99 | <Word>PROBLEM</Word>
|
---|
100 | <Word>END</Word>
|
---|
101 | <Word>EPS</Word>
|
---|
102 | <Word>LOCAL</Word>
|
---|
103 | <Word>NONTERMINALS</Word>
|
---|
104 | <Word>RULES</Word>
|
---|
105 | <Word>SEM</Word>
|
---|
106 | <Word>MAXIMIZE</Word>
|
---|
107 | <Word>MINIMIZE</Word>
|
---|
108 | <Word>TERMINALS</Word>
|
---|
109 | <Word>CONSTRAINTS</Word>
|
---|
110 | <Word>INIT</Word>
|
---|
111 | <Word>CODE</Word>
|
---|
112 | <Word>IN</Word>
|
---|
113 | <Word>SET</Word>
|
---|
114 | <Word>RANGE</Word>
|
---|
115 | <Word>.</Word>
|
---|
116 | </Keywords>
|
---|
117 |
|
---|
118 | <!-- Digits -->
|
---|
119 | <!--
|
---|
120 | <Rule foreground="DarkBlue">
|
---|
121 | \b0[xX][0-9a-fA-F]+ # hex number
|
---|
122 | | \b
|
---|
123 | ( \d+(\.[0-9]+)? #number with optional floating point
|
---|
124 | | \.[0-9]+ #or just starting with floating point
|
---|
125 | )
|
---|
126 | ([eE][+-]?[0-9]+)? # optional exponent
|
---|
127 | </Rule>
|
---|
128 | -->
|
---|
129 | </RuleSet>
|
---|
130 | </SyntaxDefinition> |
---|
Note: See
TracBrowser
for help on using the repository browser.