Generic Interpreter 1.3
Private API

gi
Class Grammar.Production

java.lang.Object
  extended by gi.Grammar.Production
Direct Known Subclasses:
LR0_Grammar.Context
Enclosing class:
Grammar

static class Grammar.Production
extends Object

This class implements a Production.

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

Field Summary
(package private)  Object A
          The nonterminal on the left side of this Production.
(package private)  Object[] beta
          The phrase on the right side of this Production.
(package private)  int serial
          The serial number of this Production.
 
Constructor Summary
Grammar.Production(Grammar.Production p)
          Constructs a Production that is a copy of an existing Production.
Grammar.Production(Object A, Object[] beta)
          Constructs a Production with a nonterminal and phrase.
 
Method Summary
 boolean equals(Object o)
           
 String toString()
          Returns the string representation of this Production.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A

Object A

The nonterminal on the left side of this Production.


beta

Object[] beta

The phrase on the right side of this Production.


serial

int serial

The serial number of this Production. It is the priority of this Production when resolving parse conflicts.

Constructor Detail

Grammar.Production

Grammar.Production(Object A,
                   Object[] beta)

Constructs a Production with a nonterminal and phrase.

Parameters:
A - the nonterminal on the left side of this Production.
beta - the phrase on the right side of this Production.

Grammar.Production

Grammar.Production(Grammar.Production p)

Constructs a Production that is a copy of an existing Production.

Parameters:
p - the Production copied.
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()

Returns the string representation of this Production.

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

 

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