EDU.purdue.jtb.visitor
Class TokenTableBuilder

java.lang.Object
  extended by EDU.purdue.jtb.visitor.DepthFirstVisitor
      extended by EDU.purdue.jtb.visitor.TokenTableBuilder
All Implemented Interfaces:
Visitor

public class TokenTableBuilder
extends DepthFirstVisitor

Generates a symbol lookup table of tokens which have a constant regular expression, e.g. < PLUS : "+" >, which will be used to generate a default constructor.


Constructor Summary
TokenTableBuilder()
           
 
Method Summary
 java.util.Hashtable getTokenTable()
          The returned Hashtable has the names of the tokens as the keys and the constant regular expressions as the values or "" if the regular expression is not constant.
 void visit(ComplexRegularExpression n)
          f0 -> ( ComplexRegularExpressionUnit() )*
 void visit(ComplexRegularExpressionChoices n)
          f0 -> ComplexRegularExpression() f1 -> ( ComplexRegularExpression() )*
 void visit(ComplexRegularExpressionUnit n)
          f0 -> | | CharacterList() | ComplexRegularExpressionChoices() [ | | ]
 void visit(JavaCCInput n)
          f0 ->JavaCCOptions() f1 -> f2 -> f3 -> f4 -> f5 -> CompilationUnit() f6 -> f7 -> f8 -> f9 -> f10 -> ( Production() )* f11 ->
 void visit(Production n)
          f0 -> JavaCodeProduction() | RegularExprProduction() | BNFProduction() | TokenManagerDecls()
 void visit(RegExprSpec n)
          f0 -> RegularExpression() f1 -> [ Block() ] f2 -> [ ]
 void visit(RegularExpression n)
          f0 -> | [ [ ] ] ComplexRegularExpressionChoices() | |
 void visit(RegularExprProduction n)
          f0 -> [ LexicalStateList() ] f1 -> RegExprKind() f2 -> [ ] f3 -> f4 -> f5 -> RegExprSpec() f6 -> ( RegExprSpec() )* f7 ->
 
Methods inherited from class EDU.purdue.jtb.visitor.DepthFirstVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenTableBuilder

public TokenTableBuilder()
Method Detail

getTokenTable

public java.util.Hashtable getTokenTable()
The returned Hashtable has the names of the tokens as the keys and the constant regular expressions as the values or "" if the regular expression is not constant.


visit

public void visit(JavaCCInput n)
f0 ->JavaCCOptions() f1 -> f2 -> f3 -> f4 -> f5 -> CompilationUnit() f6 -> f7 -> f8 -> f9 -> f10 -> ( Production() )* f11 ->

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(Production n)
f0 -> JavaCodeProduction() | RegularExprProduction() | BNFProduction() | TokenManagerDecls()

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(RegularExprProduction n)
f0 -> [ LexicalStateList() ] f1 -> RegExprKind() f2 -> [ ] f3 -> f4 -> f5 -> RegExprSpec() f6 -> ( RegExprSpec() )* f7 ->

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(RegExprSpec n)
f0 -> RegularExpression() f1 -> [ Block() ] f2 -> [ ]

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(RegularExpression n)
f0 -> | [ [ ] ] ComplexRegularExpressionChoices() | |

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(ComplexRegularExpressionChoices n)
f0 -> ComplexRegularExpression() f1 -> ( ComplexRegularExpression() )*

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(ComplexRegularExpression n)
f0 -> ( ComplexRegularExpressionUnit() )*

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor

visit

public void visit(ComplexRegularExpressionUnit n)
f0 -> | | CharacterList() | ComplexRegularExpressionChoices() [ | | ]

Specified by:
visit in interface Visitor
Overrides:
visit in class DepthFirstVisitor