Generic Interpreter 0.9
Private API

gi
Class LR0_Grammar.Context

java.lang.Object
  |
  +--gi.LR0_Grammar.Context
Enclosing class:
LR0_Grammar

static class LR0_Grammar.Context
extends Object

This class implements a shift/reduce Context.

Version:
0.9
Author:
© 1999-2000 Craig A. Rich <carich@acm.org>

Field Summary
(package private)  Lexicon.Set follow
          The follow Set in this Context.
private  int frontier
          The frontier beyond which null-closure has not been pursued.
(package private)  int position
          The progress position in this Context.
(package private)  Grammar.Production production
          The Production in this Context.
 
Constructor Summary
(package private) LR0_Grammar.Context(Grammar.Production production, int position)
          Constructs a shift/reduce Context.
 
Method Summary
 String toString()
          Returns a string representation of this Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

follow

Lexicon.Set follow

The follow Set in this Context. If null, this Context is an LR(0) Context; otherwise it is an LR(1) Context.


frontier

private int frontier

The frontier beyond which null-closure has not been pursued.


position

int position

The progress position in this Context.


production

Grammar.Production production

The Production in this Context.

Constructor Detail

LR0_Grammar.Context

LR0_Grammar.Context(Grammar.Production production,
                    int position)

Constructs a shift/reduce Context.

Parameters:
production - the Production in this Context.
position - the progress position in this Context.
Method Detail

toString

public String toString()

Returns a string representation of this Context.

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

 

© 1999-2000 Craig A. Rich <carich@acm.org>