Generic Interpreter 1.3
Protected API

gi
Class LL1_Grammar

java.lang.Object
  extended by gi.Lexicon
      extended by gi.Grammar
          extended by 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:
1.3
Author:
© 1999-2009 Craig A. Rich <carich@csupomona.edu>

Nested Class Summary
 
Nested classes/interfaces inherited from class gi.Grammar
Grammar.ParseTree, Grammar.Semantics
 
Nested classes/interfaces inherited from class gi.Lexicon
Lexicon.Alphabet, Lexicon.Concatenation, Lexicon.Exception, Lexicon.Expression, Lexicon.Match, Lexicon.NonMatch, Lexicon.PosixClass, Lexicon.Range, Lexicon.Repetition, Lexicon.Singleton, Lexicon.UnicodeCategory, Lexicon.Union
 
Field Summary
 
Fields inherited from class gi.Grammar
CONFLICT, FIRST_FOLLOW, PARSE_TREE, SYNTAX
 
Fields inherited from class gi.Lexicon
$, debug, LEXICAL, TERMINALS, VERBOSE
 
Constructor Summary
protected LL1_Grammar()
          Constructs an LL(1) parser around a new empty Grammar.
protected LL1_Grammar(Grammar G)
          Constructs an LL(1) parser around an existing Grammar.
 
Method Summary
 
Methods inherited from class gi.Grammar
grab, interpret, put, put
 
Methods inherited from class gi.Lexicon
expression, interpret, interpret, interpret, interpret, interpret, interpret, put, word
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LL1_Grammar

protected LL1_Grammar()

Constructs an LL(1) parser around a new empty Grammar.


LL1_Grammar

protected LL1_Grammar(Grammar G)

Constructs an LL(1) parser around an existing Grammar.

Parameters:
G - the Grammar around which the parser is constructed.

 

© 1999-2009 Craig A. Rich <carich@csupomona.edu>