Version 0.9.10 (????-??-??)
---------------------------
+- Add -i switch to avoid generating #line information.
Version 0.9.9 (2005-07-21)
--------------------------
o << rule->code->text;
// not sure if we need this or not. oline += std::count(rule->code->text, rule->code->text + ::strlen(rule->code->text), '\n');
o << "\n";
- ++oline;
- o << "#line " << oline++ << " \"" << outputFileName << "\"\n";
- // o << "\n#line " << rule->code->line
- // << "\n\t" << rule->code->text << "\n";
+ if (!iFlag)
+ {
+ ++oline;
+ o << "#line " << oline++ << " \"" << outputFileName << "\"\n";
+ // o << "\n#line " << rule->code->line
+ // << "\n\t" << rule->code->text << "\n";
+ }
}
void doLinear(std::ostream &o, uint i, Span *s, uint n, State *from, State *next, bool &readCh)
oline = nOrgOline;
oline++;
- o << "\n#line " << oline++ << " \"" << outputFileName << "\"\n";
+ o << "\n";
+ if (!iFlag)
+ {
+ o << "#line " << oline++ << " \"" << outputFileName << "\"\n";
+ }
if ( hasFillLabels == false )
{
extern bool sFlag;
extern bool bFlag;
extern bool dFlag;
+extern bool iFlag;
extern bool bUsedYYAccept;
extern unsigned int oline;
extern uint maxFill;
bool sFlag = false;
bool bFlag = false;
bool dFlag = false;
-bool qFlag = false;
+bool iFlag = false;
bool bUsedYYAccept = false;
unsigned int oline = 1;
uint maxFill = 1;
mbo_opt_struct('e', 0, "ecb"),
mbo_opt_struct('f', 0, "storable-state"),
mbo_opt_struct('h', 0, "help"),
+ mbo_opt_struct('i', 0, "debug-info"),
mbo_opt_struct('o', 1, "output"),
mbo_opt_struct('s', 0, "nested-ifs"),
mbo_opt_struct('v', 0, "version"),
" about the current position and in which state the\n"
" parser is.\n"
"\n"
+ "-i --no-debug-info Do not generate '#line' info (usefull for versioning).\n"
+ "\n"
"-v --version Show version information.\n"
"-V --vernum Show version as one number.\n"
;
vFillIndexes = 0;
break;
+ case 'i':
+ iFlag = true;
+ break;
+
case 'o':
outputFileName = opt_arg;
break;
char * fnamebuf;
char * token;
+ if (iFlag)
+ {
+ return;
+ }
o << "#line " << line << " \"";
if( fileName != NULL ) {
fnamebuf = strdup( fileName );
.ds rx regular expression
.ds lx \fIl\fP-expression
\"$Log$
+\"Revision 1.23 2005/07/21 16:25:24 helly
+\"- Add -i switch to avoid generating #line information.
+\"
\"Revision 1.22 2005/07/10 14:16:26 helly
\"- Update
\"
\fIvoid YYDEBUG(int state, char current)\fP. The first parameter receives the
state or -1 and the second parameter receives the input at the current cursor.
.TP
+\fB-d\fP
+Do not output #line information. This is usefull when you want use a CMS tool
+with the re2c output which you might want if you do not require your users to
+have re2c themselves when building from your source.
+.TP
\fB-h\fP
\fB-?\fP
Invoke a short help.