[antlr-interest] Check individual stmt?
Bill Steer
steerr at bellsouth.net
Tue May 5 07:51:35 PDT 2009
Hello. My grammar processes a "program," which consists of individual
"statements." Those statements are just semicolon-delimited
expressions. I'm storing all of the statements in a string and using
the corresponding string as input to ANTLR. So far, so good. But I
need to check the content of each individual statement to see if the IDs
in it are in a symbol table or not. Is it possible, from an input point
of view, to send ANTLR a series of statements, one at a time? I'm
thinking here about the ANTLRStringStream, not the rule to run. Do I
have to create a new ANTLRStringStream and corresponding lexer each time
I feed it a new statement, or can the ANTLRStringStream be reset to a
new input string?
Thanks very much for any help.
Bill
More information about the antlr-interest
mailing list