antlr.preprocessor
Class Rule
java.lang.Object
|
+--antlr.preprocessor.Rule
- class Rule
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
block
protected java.lang.String block
args
protected java.lang.String args
returnValue
protected java.lang.String returnValue
throwsSpec
protected java.lang.String throwsSpec
initAction
protected java.lang.String initAction
options
protected IndexedVector options
visibility
protected java.lang.String visibility
enclosingGrammar
protected Grammar enclosingGrammar
bang
protected boolean bang
Rule
public Rule(java.lang.String n,
java.lang.String b,
IndexedVector options,
Grammar gr)
getArgs
public java.lang.String getArgs()
getBang
public boolean getBang()
getName
public java.lang.String getName()
getReturnValue
public java.lang.String getReturnValue()
getVisibility
public java.lang.String getVisibility()
narrowerVisibility
public boolean narrowerVisibility(Rule rule)
- If 'rule' narrows the visible of 'this', return true;
For example, 'this' is public and 'rule' is private,
true is returned. You cannot narrow the vis. of
a rule.
sameSignature
public boolean sameSignature(Rule rule)
- Two rules have the same signature if they have:
same name
same return value
same args
I do a simple string compare now, but later
the type could be pulled out so it is insensitive
to names of args etc...
setArgs
public void setArgs(java.lang.String a)
setBang
public void setBang()
setEnclosingGrammar
public void setEnclosingGrammar(Grammar g)
setInitAction
public void setInitAction(java.lang.String a)
setOptions
public void setOptions(IndexedVector options)
setReturnValue
public void setReturnValue(java.lang.String ret)
setThrowsSpec
public void setThrowsSpec(java.lang.String t)
setVisibility
public void setVisibility(java.lang.String v)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object