pj
Class PJ.Info

java.lang.Object
  extended by pj.PJ.Info
All Implemented Interfaces:
Dump.Helper, Leaf
Direct Known Subclasses:
PJ.ErrorInfo, PJ.IdInfo, PJ.LitInfo, PJ.MacInfo, PJ.SymInfo
Enclosing class:
PJ

protected abstract class PJ.Info
extends Object
implements Leaf

common information.


Field Summary
protected  String id
          identifier for jay and JLex.
protected  boolean represented
          true once a rule for JLex has been created.
protected  String type
          type to be returned by scanner, if any.
 
Constructor Summary
protected PJ.Info(String id)
           
 
Method Summary
 boolean collect()
          true if this leaf is to be collected.
 String comment()
          descriptive comment.
 void lex(PrintWriter out)
          create JLex rule: by default none.
 String name()
          name in jay or JLex.
 void setName(String id)
          only allowed if id is temporary.
 void setType(String type)
          once only.
 String type()
          type in jay actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pj.Dump.Helper
dump
 

Field Detail

id

protected String id
identifier for jay and JLex.


type

protected String type
type to be returned by scanner, if any.


represented

protected boolean represented
true once a rule for JLex has been created.

See Also:
lex(java.io.PrintWriter)
Constructor Detail

PJ.Info

protected PJ.Info(String id)
Method Detail

name

public String name()
Description copied from interface: Leaf
name in jay or JLex.

Specified by:
name in interface Leaf
See Also:
id

setName

public void setName(String id)
only allowed if id is temporary.

Parameters:
id - not null and not temporary.

type

public String type()
Description copied from interface: Leaf
type in jay actions. This is only called if Leaf.collect() is true.

Specified by:
type in interface Leaf
See Also:
type

setType

public void setType(String type)
once only.

See Also:
type

comment

public String comment()
descriptive comment.


lex

public void lex(PrintWriter out)
create JLex rule: by default none.

Specified by:
lex in interface Leaf

collect

public boolean collect()
Description copied from interface: Leaf
true if this leaf is to be collected.

Specified by:
collect in interface Leaf