antlr3.ParserRuleReturnScope Class Reference

Rules that return more than a single value must return an object containing all the values. More...

Inheritance diagram for antlr3.ParserRuleReturnScope:

Inheritance graph
[legend]
Collaboration diagram for antlr3.ParserRuleReturnScope:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getStart
 Return the start token or tree.
def getStop
 Return the stop token or tree.

Public Attributes

 start
 stop


Detailed Description

Rules that return more than a single value must return an object containing all the values.

Besides the properties defined in RuleLabelScope.predefinedRulePropertiesScope there may be user-defined return values. This class simply defines the minimum properties that are always defined and methods to access the others that might be available depending on output option such as template and tree.

Note text is not an actual property of the return value, it is computed from start and stop using the input stream's toString() method. I could add a ctor to this so that we can pass in and store the input stream, but I'm not sure we want to do that. It would seem to be undefined to get the .text property anyway if the rule matches tokens from multiple input streams.

I do not use getters for fields of objects that are used simply to group values such as this aggregate. The getters/setters are there to satisfy the superclass interface.

Definition at line 3928 of file antlr3.py.


Member Function Documentation

def antlr3.ParserRuleReturnScope.__init__ (   self  ) 

Definition at line 3930 of file antlr3.py.

def antlr3.ParserRuleReturnScope.getStart (   self  ) 

Return the start token or tree.

Reimplemented from antlr3.RuleReturnScope.

Definition at line 3935 of file antlr3.py.

def antlr3.ParserRuleReturnScope.getStop (   self  ) 

Return the stop token or tree.

Reimplemented from antlr3.RuleReturnScope.

Definition at line 3939 of file antlr3.py.


Member Data Documentation

Definition at line 3931 of file antlr3.py.

Definition at line 3932 of file antlr3.py.


The documentation for this class was generated from the following file:

Generated on Mon Nov 29 17:24:28 2010 for ANTLR Python API by  doxygen 1.5.5