antlr.preprocessor
Class Rule

java.lang.Object
  |
  +--antlr.preprocessor.Rule

class Rule
extends java.lang.Object


Field Summary
protected  java.lang.String args
           
protected  boolean bang
           
protected  java.lang.String block
           
protected  Grammar enclosingGrammar
           
protected  java.lang.String initAction
           
protected  java.lang.String name
           
protected  IndexedVector options
           
protected  java.lang.String returnValue
           
protected  java.lang.String throwsSpec
           
protected  java.lang.String visibility
           
 
Constructor Summary
Rule(java.lang.String n, java.lang.String b, IndexedVector options, Grammar gr)
           
 
Method Summary
 java.lang.String getArgs()
           
 boolean getBang()
           
 java.lang.String getName()
           
 java.lang.String getReturnValue()
           
 java.lang.String getVisibility()
           
 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.
 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...
 void setArgs(java.lang.String a)
           
 void setBang()
           
 void setEnclosingGrammar(Grammar g)
           
 void setInitAction(java.lang.String a)
           
 void setOptions(IndexedVector options)
           
 void setReturnValue(java.lang.String ret)
           
 void setThrowsSpec(java.lang.String t)
           
 void setVisibility(java.lang.String v)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

Rule

public Rule(java.lang.String n,
            java.lang.String b,
            IndexedVector options,
            Grammar gr)
Method Detail

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