antlr3treeparser.c File Reference


Detailed Description

Implementation of the tree parser and overrides for the base recognizer.

#include <antlr3treeparser.h>

Include dependency graph for antlr3treeparser.c:


Functions

ANTLR3_API void antlr3MTNExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)
 Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.
ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
static void freeParser (pANTLR3_TREE_PARSER parser)
static void * getCurrentInputSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream)
static void * getMissingSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow)
static
pANTLR3_COMMON_TREE_NODE_STREAM 
getTreeNodeStream (pANTLR3_TREE_PARSER parser)
 Return a pointer to the input stream.
static void mismatch (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow)
 Override for standard base recognizer mismatch function as we have DOWN/UP nodes in the stream that have no line info, plus we want to alter the exception type.
static void setTreeNodeStream (pANTLR3_TREE_PARSER parser, pANTLR3_COMMON_TREE_NODE_STREAM input)
 Set the input stream and reset the parser.

Function Documentation

ANTLR3_API void antlr3MTNExceptionNew ( pANTLR3_BASE_RECOGNIZER  recognizer  ) 

Creates a new Mismatched Tree Nde Exception and inserts in the recognizer exception stack.

Parameters:
recognizer Context pointer for this recognizer

References ANTLR3_MISMATCHED_TREE_NODE_EXCEPTION, ANTLR3_MISMATCHED_TREE_NODE_NAME, antlr3RecognitionExceptionNew(), ANTLR3_RECOGNIZER_SHARED_STATE_struct::exception, ANTLR3_EXCEPTION_struct::name, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_EXCEPTION_struct::type.

Referenced by antlr3TreeParserNewStream().

Here is the call graph for this function:

Here is the caller graph for this function:

ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream ( ANTLR3_UINT32  sizeHint,
pANTLR3_COMMON_TREE_NODE_STREAM  ctnstream,
pANTLR3_RECOGNIZER_SHARED_STATE  state 
)

static void freeParser ( pANTLR3_TREE_PARSER  parser  )  [static]

static void * getCurrentInputSymbol ( pANTLR3_BASE_RECOGNIZER  recognizer,
pANTLR3_INT_STREAM  istream 
) [static]

static void * getMissingSymbol ( pANTLR3_BASE_RECOGNIZER  recognizer,
pANTLR3_INT_STREAM  istream,
pANTLR3_EXCEPTION  e,
ANTLR3_UINT32  expectedTokenType,
pANTLR3_BITSET_LIST  follow 
) [static]

static pANTLR3_COMMON_TREE_NODE_STREAM getTreeNodeStream ( pANTLR3_TREE_PARSER  parser  )  [static]

Return a pointer to the input stream.

References ANTLR3_TREE_PARSER_struct::ctnstream.

Referenced by antlr3TreeParserNewStream().

Here is the caller graph for this function:

static void mismatch ( pANTLR3_BASE_RECOGNIZER  recognizer,
ANTLR3_UINT32  ttype,
pANTLR3_BITSET_LIST  follow 
) [static]

Override for standard base recognizer mismatch function as we have DOWN/UP nodes in the stream that have no line info, plus we want to alter the exception type.

References ANTLR3_BASE_RECOGNIZER_struct::exConstruct, and ANTLR3_BASE_RECOGNIZER_struct::recoverFromMismatchedToken.

static void setTreeNodeStream ( pANTLR3_TREE_PARSER  parser,
pANTLR3_COMMON_TREE_NODE_STREAM  input 
) [static]

Set the input stream and reset the parser.

References ANTLR3_TREE_PARSER_struct::ctnstream, ANTLR3_TREE_PARSER_struct::rec, ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset, and ANTLR3_BASE_RECOGNIZER_struct::reset.

Referenced by antlr3TreeParserNewStream().

Here is the caller graph for this function:


Generated on Mon Nov 29 17:23:56 2010 for ANTLR3C by  doxygen 1.5.5