[antlr-interest] referencing the lexer context from the parser
Jerry Dy
jerrydy at sbcglobal.net
Thu Mar 11 14:34:43 PST 2004
I'm experimenting with using context sensitive state in my lexer like
so (got this from the documentation):
BEGIN_TABLE
: '[' {this.inTable=true;} // enter table context
;
ROW_SEP
: {this.inTable}? "----"
;
As you can see, I'm using the inTable variable to check the current
context of the lexer.
Does it make sense to access this inTable variable from my parser? If
so, how is it done? Thanks!
-Jerry
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list