[antlr-interest] Lexer documentation, problem with context-sensitive lexers in C++
Anthony Brenelière
abreneliere at telys.com
Fri May 23 06:02:04 PDT 2003
In the documentioion, there is the following exemple, to show how the
context-sentsitive lexer can be implemented :
BEGIN_TABLE
: '[' {this.inTable=true;} // enter table context
;
ROW_SEP
: {this.inTable}? "----"
;
END_TABLE
: ']' {this.inTable=false;} // exit table context
;
.. but in C++ how can the inTable boolean be initialized ? I should
have to change the lexer constructor, but its part of the generated
code.
Anyone has an idea ?
Cordially,
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030523/2475bda3/attachment.html
More information about the antlr-interest
mailing list