Generic Interpreter 1.2
Private API

gi
Class Grammar.Production

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

static class Grammar.Production
extends Object

This class implements a Production.

Version:
1.2
Author:
© 1999-2004 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
(package private) Grammar.Production(Grammar.Production p)
           
(package private) Grammar.Production(Object A, Object[] beta)
          Constructs a Production with a nonterminal and phrase.
 
Method Summary
 String toString()
          Returns the string representation of this Production.
 
Methods inherited from class java.lang.Object
clone, equals, 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(Grammar.Production p)

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.
Method Detail

toString

public String toString()

Returns the string representation of this Production.

Returns:
the string representation of this Production.

 

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