antlr
Class GrammarElement

java.lang.Object
  |
  +--antlr.GrammarElement
Direct Known Subclasses:
AlternativeElement

abstract class GrammarElement
extends java.lang.Object

A GrammarElement is a generic node in our data structure that holds a grammar in memory. This data structure can be used for static analysis or for dynamic analysis (during parsing). Every node must know which grammar owns it, how to generate code, and how to do analysis.


Field Summary
static int AUTO_GEN_BANG
           
static int AUTO_GEN_CARET
           
static int AUTO_GEN_NONE
           
protected  Grammar grammar
           
protected  int line
           
 
Constructor Summary
GrammarElement(Grammar g)
           
 
Method Summary
 void generate()
           
 int getLine()
           
 Lookahead look(int k)
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTO_GEN_NONE

public static final int AUTO_GEN_NONE
See Also:
Constant Field Values

AUTO_GEN_CARET

public static final int AUTO_GEN_CARET
See Also:
Constant Field Values

AUTO_GEN_BANG

public static final int AUTO_GEN_BANG
See Also:
Constant Field Values

grammar

protected Grammar grammar

line

protected int line
Constructor Detail

GrammarElement

public GrammarElement(Grammar g)
Method Detail

generate

public void generate()

getLine

public int getLine()

look

public Lookahead look(int k)

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object