public class RuleBlock extends Object
Modifier and Type | Field and Description |
---|---|
protected Vector |
alternatives |
protected int |
alti |
protected int |
altj |
protected int |
analysisAlt |
protected String |
argAction |
static int |
AUTO_GEN_BANG |
static int |
AUTO_GEN_CARET |
static int |
AUTO_GEN_NONE |
protected int |
autoGenType |
protected Lookahead[] |
cache |
protected int |
column |
protected boolean |
defaultErrorHandler |
protected boolean |
doAutoGen |
protected String |
enclosingRuleName |
protected antlr.RuleEndElement |
endNode |
protected boolean |
generateAmbigWarnings |
protected Grammar |
grammar |
protected boolean |
hasAnAction |
protected boolean |
hasASynPred |
protected int |
ID |
protected String |
ignoreRule |
protected String |
initAction |
protected String |
label |
protected int |
line |
protected boolean[] |
lock |
protected static int |
nblks |
protected String |
returnAction |
protected String |
ruleName |
protected boolean |
testLiterals |
protected String |
throwsSpec |
protected boolean |
warnWhenFollowAmbig |
Constructor and Description |
---|
RuleBlock(Grammar g,
String r)
Construct a named rule.
|
RuleBlock(Grammar g,
String r,
int line,
boolean doAutoGen_)
Construct a named rule with line number information
|
Modifier and Type | Method and Description |
---|---|
void |
addAlternative(antlr.Alternative alt) |
void |
addExceptionSpec(antlr.ExceptionSpec ex) |
antlr.ExceptionSpec |
findExceptionSpec(String label) |
antlr.ExceptionSpec |
findExceptionSpec(Token label) |
void |
generate() |
antlr.Alternative |
getAlternativeAt(int i) |
Vector |
getAlternatives() |
boolean |
getAutoGen() |
int |
getAutoGenType() |
int |
getColumn() |
boolean |
getDefaultErrorHandler() |
antlr.RuleEndElement |
getEndElement() |
String |
getIgnoreRule() |
String |
getInitAction() |
String |
getLabel() |
int |
getLine() |
String |
getRuleName() |
boolean |
getTestLiterals() |
boolean |
isLexerAutoGenRule() |
Lookahead |
look(int k) |
void |
prepareForAnalysis() |
void |
removeTrackingOfRuleRefs(Grammar g)
Walk the syntactic predicate and, for a rule ref R, remove
the ref from the list of FOLLOW references for R (stored
in the symbol table.
|
void |
setAlternatives(Vector v) |
void |
setAutoGen(boolean doAutoGen_) |
void |
setAutoGenType(int a) |
void |
setDefaultErrorHandler(boolean value) |
void |
setEndElement(antlr.RuleEndElement re) |
void |
setInitAction(String initAction_) |
void |
setLabel(String label_) |
void |
setOption(Token key,
Token value) |
String |
toString() |
protected String ruleName
protected String argAction
protected String throwsSpec
protected String returnAction
protected antlr.RuleEndElement endNode
protected boolean testLiterals
protected boolean[] lock
protected Lookahead[] cache
protected boolean defaultErrorHandler
protected String ignoreRule
protected String initAction
protected Vector alternatives
protected String label
protected int alti
protected int altj
protected int analysisAlt
protected boolean hasAnAction
protected boolean hasASynPred
protected int ID
protected static int nblks
protected boolean doAutoGen
protected boolean warnWhenFollowAmbig
protected boolean generateAmbigWarnings
protected int autoGenType
protected String enclosingRuleName
public static final int AUTO_GEN_NONE
public static final int AUTO_GEN_CARET
public static final int AUTO_GEN_BANG
protected Grammar grammar
protected int line
protected int column
public void addExceptionSpec(antlr.ExceptionSpec ex)
public antlr.ExceptionSpec findExceptionSpec(Token label)
public antlr.ExceptionSpec findExceptionSpec(String label)
public void generate()
public boolean getDefaultErrorHandler()
public antlr.RuleEndElement getEndElement()
public String getIgnoreRule()
public String getRuleName()
public boolean getTestLiterals()
public boolean isLexerAutoGenRule()
public Lookahead look(int k)
public void prepareForAnalysis()
public void setDefaultErrorHandler(boolean value)
public void setEndElement(antlr.RuleEndElement re)
public String toString()
public void addAlternative(antlr.Alternative alt)
public antlr.Alternative getAlternativeAt(int i)
public Vector getAlternatives()
public boolean getAutoGen()
public String getInitAction()
public String getLabel()
public void removeTrackingOfRuleRefs(Grammar g)
public void setAlternatives(Vector v)
public void setAutoGen(boolean doAutoGen_)
public void setInitAction(String initAction_)
public void setLabel(String label_)
public int getAutoGenType()
public void setAutoGenType(int a)
public int getLine()
public int getColumn()
Copyright © 2015 JBoss by Red Hat. All rights reserved.