antlr3.tree.TreeParser Class Reference

Baseclass for generated tree parsers. More...

Inheritance diagram for antlr3.tree.TreeParser:

Inheritance graph
[legend]
Collaboration diagram for antlr3.tree.TreeParser:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def reset
def setTreeNodeStream
 Set the input stream.
def getTreeNodeStream
def getSourceName
def getCurrentInputSymbol
def getMissingSymbol
def matchAny
 Match '.
def mismatch
 We have DOWN/UP nodes in the stream that have no line info; override.
def getErrorHeader
 Prefix error message with the grammar name because message is always intended for the programmer because the parser built the input tree not the user.
def getErrorMessage
 Tree parsers parse nodes they usually have a token object as payload.
def traceIn
def traceOut

Public Attributes

 input


Detailed Description

Baseclass for generated tree parsers.

A parser for a stream of tree nodes. "tree grammars" result in a subclass of this. All the error reporting and recovery is shared with Parser via the BaseRecognizer superclass.

Definition at line 2130 of file tree.py.


Member Function Documentation

def antlr3.tree.TreeParser.__init__ (   self,
  input,
  state = None 
)

Definition at line 2132 of file tree.py.

def antlr3.tree.TreeParser.reset (   self  ) 

Definition at line 2139 of file tree.py.

def antlr3.tree.TreeParser.setTreeNodeStream (   self,
  input 
)

Set the input stream.

Definition at line 2147 of file tree.py.

def antlr3.tree.TreeParser.getTreeNodeStream (   self  ) 

Definition at line 2152 of file tree.py.

def antlr3.tree.TreeParser.getSourceName (   self  ) 

Definition at line 2156 of file tree.py.

def antlr3.tree.TreeParser.getCurrentInputSymbol (   self,
  input 
)

Definition at line 2160 of file tree.py.

def antlr3.tree.TreeParser.getMissingSymbol (   self,
  input,
  e,
  expectedTokenType,
  follow 
)

Definition at line 2164 of file tree.py.

def antlr3.tree.TreeParser.matchAny (   self,
  ignore 
)

Match '.

' in tree parser has special meaning. Skip node or entire tree if node has children. If children, scan until corresponding UP node.

Definition at line 2175 of file tree.py.

def antlr3.tree.TreeParser.mismatch (   self,
  input,
  ttype,
  follow 
)

We have DOWN/UP nodes in the stream that have no line info; override.

plus we want to alter the exception type. Don't try to recover from tree parser errors inline...

Definition at line 2207 of file tree.py.

def antlr3.tree.TreeParser.getErrorHeader (   self,
  e 
)

Prefix error message with the grammar name because message is always intended for the programmer because the parser built the input tree not the user.

Definition at line 2218 of file tree.py.

def antlr3.tree.TreeParser.getErrorMessage (   self,
  e,
  tokenNames 
)

Tree parsers parse nodes they usually have a token object as payload.

Set the exception token and do the default behavior.

Definition at line 2233 of file tree.py.

def antlr3.tree.TreeParser.traceIn (   self,
  ruleName,
  ruleIndex 
)

Definition at line 2247 of file tree.py.

def antlr3.tree.TreeParser.traceOut (   self,
  ruleName,
  ruleIndex 
)

Definition at line 2251 of file tree.py.


Member Data Documentation

Definition at line 2135 of file tree.py.


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

Generated on Tue May 20 18:34:07 2008 for ANTLR Python API by  doxygen 1.5.5