Rechercher une page de manuel
antlr3treeparser.c
Langue: en
Version: 373846 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
- NAME
- SYNOPSIS
- Detailed Description
- Function Documentation
- ANTLR3_API void antlr3MTNExceptionNew (pANTLR3_BASE_RECOGNIZER recognizer)
- 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]
- static void mismatch (pANTLR3_BASE_RECOGNIZER recognizer, ANTLR3_UINT32 ttype, pANTLR3_BITSET_LIST follow) [static]
- static void setTreeNodeStream (pANTLR3_TREE_PARSER parser, pANTLR3_COMMON_TREE_NODE_STREAM input) [static]
- Author
NAME
src/antlr3treeparser.c -Implementation of the tree parser and overrides for the base recognizer.
SYNOPSIS
#include <antlr3treeparser.h>
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
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 antlr3RecognitionExceptionNew(), ANTLR3_RECOGNIZER_SHARED_STATE_struct::exception, ANTLR3_EXCEPTION_struct::name, ANTLR3_BASE_RECOGNIZER_struct::state, and ANTLR3_EXCEPTION_struct::type.
ANTLR3_API pANTLR3_TREE_PARSER antlr3TreeParserNewStream (ANTLR3_UINT32 sizeHint, pANTLR3_COMMON_TREE_NODE_STREAM ctnstream, pANTLR3_RECOGNIZER_SHARED_STATE state)
Allocate tree parser memory
References ANTLR3_MALLOC, ANTLR3_TYPE_PARSER, antlr3BaseRecognizerNew(), ANTLR3_BASE_RECOGNIZER_struct::exConstruct, ANTLR3_TREE_PARSER_struct::free, ANTLR3_BASE_RECOGNIZER_struct::getCurrentInputSymbol, ANTLR3_BASE_RECOGNIZER_struct::getMissingSymbol, ANTLR3_TREE_PARSER_struct::getTreeNodeStream, ANTLR3_BASE_RECOGNIZER_struct::mismatch, ANTLR3_TREE_PARSER_struct::rec, ANTLR3_TREE_PARSER_struct::setTreeNodeStream, ANTLR3_BASE_RECOGNIZER_struct::super, and ANTLR3_BASE_RECOGNIZER_struct::type.
static void freeParser (pANTLR3_TREE_PARSER parser) [static]
References ANTLR3_FREE, ANTLR3_RECOGNIZER_SHARED_STATE_struct::following, ANTLR3_BASE_RECOGNIZER_struct::free, ANTLR3_STACK_struct::free, ANTLR3_TREE_PARSER_struct::rec, and ANTLR3_BASE_RECOGNIZER_struct::state.
static void * getCurrentInputSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream) [static]
References ANTLR3_TREE_NODE_STREAM_struct::_LT, ANTLR3_TREE_NODE_STREAM_struct::ctns, and ANTLR3_INT_STREAM_struct::super.
static void * getMissingSymbol (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM istream, pANTLR3_EXCEPTION e, ANTLR3_UINT32 expectedTokenType, pANTLR3_BITSET_LIST follow) [static]
References ANTLR3_TREE_NODE_STREAM_struct::_LT, ANTLR3_STRING_struct::append8, ANTLR3_COMMON_TREE_struct::baseTree, ANTLR3_TREE_NODE_STREAM_struct::ctns, ANTLR3_BASE_TREE_struct::dupNode, ANTLR3_COMMON_TREE_NODE_STREAM_struct::EOF_NODE, ANTLR3_COMMON_TOKEN_struct::getText, ANTLR3_BASE_TREE_struct::getToken, ANTLR3_COMMON_TOKEN_struct::setText8, ANTLR3_BASE_RECOGNIZER_struct::state, ANTLR3_BASE_TREE_struct::super, ANTLR3_INT_STREAM_struct::super, and ANTLR3_RECOGNIZER_SHARED_STATE_struct::tokenNames.
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.
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.
Author
Generated automatically by Doxygen for ANTLR3C from the source code.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre