[antlr-interest] $FIRST $FOLLOW
Terence Parr
parrt at cs.usfca.edu
Tue Feb 7 10:32:09 PST 2006
On Feb 7, 2006, at 6:10 AM, Ulrich Frank wrote:
> So how can I realize this?? I know I have to access $FIRST and
> $FOLLOW respectively which is accessible in the grammar file. But I
> firstly need this information in the main java class where i create
> a parser object and my gui and secondly I do not need the BitSet (=
> $FIRST,$FOLLOW) but the names of the Tokens (Symbols), ATTR_ID f.e.
> When I'm right, i can get the last thing by matching it with the
> entries in the ...TokenTypes.txt file but isn't there a better/
> faster way?
I think there might be a toString() method for bitset that takes a
token names table, which is in every generated parser.
Ter
More information about the antlr-interest
mailing list