there's a printPossibleTokens() which (supposedly) prints just that. However, using a left-recursive grammar, it produces:
Possible first terminal symbols for rule...
input : $input, $zahl, eight, five, four, nine, one, seven, six, three, two, zero
zahl : eight, five, four, nine, one, seven, six, three, two, zero
and for a right-recursive grammar:
Possible first terminal symbols for rule...
input : $zahl, eight, five, four, nine, one, seven, six, three, two, zero
zahl : eight, five, four, nine, one, seven, six, three, two, zero
inputNeg : $zahl, eight, five, four, nine, one, seven, six, three, two, zero
What's curious is that (a) in both cases $zahl is reported as a terminal symbol (which, of course, is wrong) and (b) only in the left-recursive case is the recurring symbol mentioned as part of the terminal symbols (note that $inputNeg is not mentioned for $input but $zahl is).
Really odd, I would be curious to know whether we need all this (at least partially broken) functionality or whether it could be removed.
there's a
printPossibleTokens()
which (supposedly) prints just that. However, using a left-recursive grammar, it produces:and for a right-recursive grammar:
What's curious is that (a) in both cases
$zahl
is reported as a terminal symbol (which, of course, is wrong) and (b) only in the left-recursive case is the recurring symbol mentioned as part of the terminal symbols (note that$inputNeg
is not mentioned for$input
but$zahl
is).Really odd, I would be curious to know whether we need all this (at least partially broken) functionality or whether it could be removed.
Any thoughts?