gi
Class LL1_Grammar
java.lang.Object
|
+--gi.Lexicon
|
+--gi.Grammar
|
+--gi.LL1_Grammar
- public class LL1_Grammar
- extends Grammar
This class implements an LL(1) parser around a Grammar
. The parser adapts to changes in the underlying Grammar
. Semantics
in a phrase are evaluated during a top-down left-to-right recursive descent parse, when they are first visited. Attributes above or to the left of the Semantics
are available during evaluation. A Grammar
with left-recursive productions can cause infinite recursion, unless productions that terminate recursion have priority over productions that recurse.
- Version:
- 0.9
- Author:
- © 1999-2000 Craig A. Rich <carich@acm.org>
- See Also:
- Source code
Constructor Summary |
protected |
LL1_Grammar()
Constructs an LL(1) parser around a new empty Grammar . |
protected |
LL1_Grammar(Grammar grammar)
Constructs an LL(1) parser around an existing Grammar . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LL1_Grammar
protected LL1_Grammar()
Constructs an LL(1) parser around a new empty Grammar
.
LL1_Grammar
protected LL1_Grammar(Grammar grammar)
Constructs an LL(1) parser around an existing Grammar
.
- Parameters:
grammar
- the Grammar
around which the parser is constructed.
© 1999-2000 Craig A. Rich <carich@acm.org>