ANTLR3C 3.3.1
antlr3treeparser.c File Reference

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

#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.

Detailed Description

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

Function Documentation

◆ antlr3MTNExceptionNew()

ANTLR3_API void antlr3MTNExceptionNew ( pANTLR3_BASE_RECOGNIZER recognizer)

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

Parameters
recognizerContext 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:

◆ antlr3TreeParserNewStream()

◆ freeParser()

◆ getCurrentInputSymbol()

◆ getMissingSymbol()

◆ getTreeNodeStream()

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:

◆ mismatch()

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.

◆ setTreeNodeStream()

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_BASE_RECOGNIZER_struct::reset, and ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset.

Referenced by antlr3TreeParserNewStream().

Here is the caller graph for this function: