-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlexBison.rules
246 lines (246 loc) · 8.85 KB
/
FlexBison.rules
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<?xml version="1.0" encoding="utf-8"?>
<!--
* FlexBison.rules
*
* Copyright 2006(c) Microsoft Corporation. All rights reserved.
*
-->
<VisualStudioToolFile
Name="Flex and Bison Tools"
Version="8.00"
>
<Rules>
<CustomBuildRule
Name="FlexGenerator"
DisplayName="Flex Generator"
CommandLine="flex.exe [AllOptions] [AdditionalOptions] [Inputs]"
Outputs="$(InputName).yy.cpp"
FileExtensions="*.l"
ExecutionDescription="Generating lexical analyser..."
>
<Properties>
<BooleanProperty
Name="BackingUpInfo"
DisplayName="Generate backing-up information"
Category="Debug information"
Description="Generates the file 'lex.backup' that contains a list of scanner states which require backing up and the input characters on which they do so."
Switch="-b"
/>
<BooleanProperty
Name="DebuggerOn"
DisplayName="Run in debug mode"
Category="Debug information"
Description="Turn on debug mode in generated scanner"
Switch="-d"
/>
<BooleanProperty
Name="GenFast"
DisplayName="Generate fast large scanner"
PropertyPageName="Performance"
Description="Generate fast, large scanner"
Switch="-f"
/>
<BooleanProperty
Name="CaseInsensitive"
DisplayName="Case insensitive scanner"
Description="The case of letters given in the flex input patterns will be ignored, and tokens in the input will be matched regardless of case"
Switch="-i"
/>
<BooleanProperty
Name="CompatibilityOn"
DisplayName="Maximum compatibility with lex"
Description="Turns on maximum compatibility with the original AT&T lex implementation. Note that this does not mean full compatibility."
Switch="-l"
/>
<BooleanProperty
Name="PerformanceReport"
DisplayName="Generate performance report"
PropertyPageName="Performance"
Description="Generates a performance report to stderr. The report consists of comments regarding features of the flex input file which will cause a serious loss of performance in the resulting scanner."
Switch="-p"
/>
<BooleanProperty
Name="SuppressDefault"
DisplayName="Suppress the default rule"
Description="Causes the default rule (that unmatched scanner input is echoed to stdout) to be suppressed. If the scanner encounters input that does not match any of its rules, it aborts with an error."
Switch="-s"
/>
<BooleanProperty
Name="SuppressWarnings"
DisplayName="Suppress warning messages"
Description="Suppress warning messages."
Switch="-w"
/>
<BooleanProperty
Name="BatchScanner"
DisplayName="Generate Batch Scanner"
PropertyPageName="Performance"
Description="Instructs flex to generate a batch scanner. In general, you use '-B' when you are certain that your scanner will never be used interactively, and you want to squeeze a little more performance out of it."
Switch="-B"
/>
<BooleanProperty
Name="FastScanner"
DisplayName="Use fast scanner table representation"
PropertyPageName="Performance"
Description="Specifies that the fast scanner table representation should be used (and stdio bypassed). This representation is about as fast as the full table representation '(-f)', and for some sets of patterns will be considerably smaller (and for others, larger)."
Switch="-F"
/>
<BooleanProperty
Name="InteractiveScanner"
DisplayName="Generate an interactive scanner"
PropertyPageName="Performance"
Description="Instructs flex to generate an interactive scanner. An interactive scanner is one that only looks ahead to decide what token has been matched if it absolutely must."
Switch="-I"
/>
<BooleanProperty
Name="NoGenLineDirectives"
DisplayName="Don't generate #line directives"
Category="Debug information"
Description="Instructs flex not to generate '#line' directives. Without this option, flex peppers the generated scanner with #line directives so error messages in the actions will be correctly located with respect to either the original flex input file."
Switch="-L"
/>
<BooleanProperty
Name="TraceMode"
DisplayName="Trace mode"
Category="Debug information"
Description="Makes flex run in trace mode. It will generate a lot of messages to stderr concerning the form of the input and the resultant non-deterministic and deterministic finite automata."
Switch="-T"
/>
<StringProperty
Name="OutputFile"
DisplayName="Output File"
Description="The output file containing the implementation of the analyser"
Switch="-o[value]"
DefaultValue="$(InputName).yy.cpp"
/>
<StringProperty
Name="ScannerPrefix"
DisplayName="Scanner Prefix"
Description="Specify scanner prefix other than yy"
Switch="-P[value]"
/>
<EnumProperty
Name="TableCompression"
DisplayName="Table Compression"
PropertyPageName="Performance"
Description="Controls the degree of table compression and, more generally, trade-offs between small scanners and fast scanners."
>
<Values>
<EnumValue
Value="0"
Switch="-Cem"
DisplayName="Equivalence classes and meta-equivalence classes (slowest & smallest)"
/>
<EnumValue
Value="1"
Switch="-Cm"
DisplayName="Meta-equivalence classes"
/>
<EnumValue
Value="2"
Switch="-Ce"
DisplayName="Equivalence classes"
/>
<EnumValue
Value="3"
Switch="-C"
DisplayName="Compress scanner tables"
/>
<EnumValue
Value="4"
Switch="-Cfe"
DisplayName="Full scanner tables and equivalence classes"
/>
<EnumValue
Value="5"
Switch="-CFe"
DisplayName="Alternate fast scanner representation and equivalence classes"
/>
<EnumValue
Value="6"
Switch="-Cf"
DisplayName="Full scanner tables"
/>
<EnumValue
Value="7"
Switch="-CF"
DisplayName="Alternate fast scanner representation"
/>
<EnumValue
Value="8"
Switch="-Cfa"
DisplayName="Align data in full scanner tables (fastest & largest)"
/>
<EnumValue
Value="9"
Switch="-CFa"
DisplayName="Align data in the alternate fast scanner representation (fastest & largest)"
/>
</Values>
</EnumProperty>
<StringProperty
Name="SkeletonFile"
DisplayName="Use custom skeleton"
Description="Overrides the default skeleton file from which flex constructs its scanners"
Switch="-S[value]"
/>
</Properties>
</CustomBuildRule>
<CustomBuildRule
Name="BisonParser"
DisplayName="Bison Parser"
CommandLine="bison.exe [AllOptions] [AdditionalOptions] [Inputs]"
Outputs="$(InputName).tab.cpp"
FileExtensions="*.y"
ExecutionDescription="Generating parser based on grammar..."
>
<Properties>
<StringProperty
Name="FilePrefix"
DisplayName="File Prefix"
Description="Specify a prefix to use for all Bison output file names"
Switch="-b [value]"
DefaultValue="$(InputName)"
/>
<BooleanProperty
Name="Defines"
DisplayName="Use defines"
Description="Write an extra output file containing macro definitions for the token type names defined in the grammar and the semantic value type YYSTYPE, as well as a few extern variable declarations"
Switch="-d"
DefaultValue="true"
/>
<BooleanProperty
Name="NoGenLineDirectives"
DisplayName="Don't generate '#line' directives"
Description="Don't put any #line preprocessor commands in the parser file. Ordinarily Bison puts them in the parser file so that the C compiler and debuggers will associate errors with your source file, the grammar file."
Switch="-l"
/>
<StringProperty
Name="OutputFile"
DisplayName="Output file name"
Description="Specify the name outfile for the parser file"
Switch="-o [value]"
DefaultValue="$(InputName).tab.cpp"
/>
<StringProperty
Name="RenameExternalSymbols"
DisplayName="Rename External Symbols"
Description="Rename the external symbols used in the parser so that they start with prefix instead of `yy'."
Switch="-p [value]"
/>
<BooleanProperty
Name="DebuggerOn"
DisplayName="Compile debugging facilities"
Description="Output a definition of the macro YYDEBUG into the parser file, so that the debugging facilities are compiled"
Switch="-t"
/>
<BooleanProperty
Name="Verbose"
DisplayName="Output parser states"
Description="Write an extra output file containing verbose descriptions of the parser states and what is done for each type of look-ahead token in that state"
Switch="-v"
/>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>