Generic Interpreter 1.3
Private API

gi
Class LR1_Grammar.Context

java.lang.Object
  extended by gi.Grammar.Production
      extended by gi.LR0_Grammar.Context
          extended by gi.LR1_Grammar.Context
Enclosing class:
LR1_Grammar

static class LR1_Grammar.Context
extends LR0_Grammar.Context

This class implements an LR(1) Context.

Version:
1.3
Author:
© 1999-2009 Craig A. Rich <carich@csupomona.edu>

Field Summary
(package private)  Lexicon.Set<Object> follow
          The follow Set in this LR(1) Context.
private  int frontier
          The frontier beyond which reflexive transitive closure has not been pursued.
 
Fields inherited from class gi.LR0_Grammar.Context
lookahead
 
Fields inherited from class gi.Grammar.Production
A, beta, serial
 
Constructor Summary
LR1_Grammar.Context(Grammar.Production p, int lookahead, Lexicon.Set<Object> follow)
          Constructs an LR(1) Context.
 
Method Summary
 String toString()
          Returns the string representation of this LR(1) Context.
 
Methods inherited from class gi.LR0_Grammar.Context
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

follow

final Lexicon.Set<Object> follow

The follow Set in this LR(1) Context.


frontier

private int frontier

The frontier beyond which reflexive transitive closure has not been pursued.

Constructor Detail

LR1_Grammar.Context

LR1_Grammar.Context(Grammar.Production p,
                    int lookahead,
                    Lexicon.Set<Object> follow)

Constructs an LR(1) Context.

Parameters:
p - the Production in this Context.
lookahead - the lookahead position in this Context.
follow - the follow set in this Context.
Method Detail

toString

public String toString()

Returns the string representation of this LR(1) Context.

Overrides:
toString in class LR0_Grammar.Context
Returns:
the string representation of this Context.

 

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