|
Building Parsers with Java | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--sjm.examples.minimath.MiniLeftRecursion
This class uses a problematic grammar for Minimath. For
a better grammar, see class MinimathCompute.
Here, the grammar is:
e = Num | e '-' Num;
Writing a parser directly from this grammar shows
that left recusion will hang a parser.
| Constructor Summary | |
MiniLeftRecursion()
|
|
| Method Summary | |
static void |
main(java.lang.String[] args)
Demonstrates an infinite loop. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public MiniLeftRecursion()
| Method Detail |
public static void main(java.lang.String[] args)
|
by Steve Metsker | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||