pj
Class PJ.Rule

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by pj.PJ.Rule
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, Dump.Helper
Enclosing class:
PJ

protected class PJ.Rule
extends ArrayList
implements Dump.Helper

List<PJ.Rhs> represents a rule, flattens content.

See Also:
Serialized Form

Field Summary
protected  PJ.IdInfo i
          nonterminal defined by this rule.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected PJ.Rule(PJ.IdInfo i, ArrayList rhss)
           
 
Method Summary
 void dump(Dump sender, Class c, Object o)
           
 boolean factory(PrintWriter out, boolean flatten)
          implement tree factory: delegate to PJ.Rhs.
 void lex(PrintWriter out)
          delegate to PJ.Rhs.
 void prolog(PrintWriter out)
          delegate to PJ.Rhs.
 void rules(PrintWriter out, boolean recover)
          create rule: defer to PJ.Rhs, create iterative rules, if any.
 String type()
          delegate to i.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

i

protected final PJ.IdInfo i
nonterminal defined by this rule.

Constructor Detail

PJ.Rule

protected PJ.Rule(PJ.IdInfo i,
                  ArrayList rhss)
Method Detail

type

public String type()
delegate to i.


lex

public void lex(PrintWriter out)
delegate to PJ.Rhs.


factory

public boolean factory(PrintWriter out,
                       boolean flatten)
implement tree factory: delegate to PJ.Rhs.

Returns:
true if all actions could be generated.

prolog

public void prolog(PrintWriter out)
delegate to PJ.Rhs.


rules

public void rules(PrintWriter out,
                  boolean recover)
create rule: defer to PJ.Rhs, create iterative rules, if any.


dump

public void dump(Dump sender,
                 Class c,
                 Object o)
Specified by:
dump in interface Dump.Helper