Lines Matching refs:parser
42 static void setTreeNodeStream (pANTLR3_TREE_PARSER parser, pANTLR3_COMMON_TREE_NODE_STREAM in…
44 getTreeNodeStream (pANTLR3_TREE_PARSER parser);
45 static void freeParser (pANTLR3_TREE_PARSER parser);
54 pANTLR3_TREE_PARSER parser; in antlr3TreeParserNewStream() local
58 parser =(pANTLR3_TREE_PARSER) ANTLR3_MALLOC(sizeof(ANTLR3_TREE_PARSER)); in antlr3TreeParserNewStream()
60 if (parser == NULL) in antlr3TreeParserNewStream()
67 parser->rec = antlr3BaseRecognizerNew(ANTLR3_TYPE_PARSER, sizeHint, state); in antlr3TreeParserNewStream()
69 if (parser->rec == NULL) in antlr3TreeParserNewStream()
71 parser->free(parser); in antlr3TreeParserNewStream()
78 parser->rec->super = parser; in antlr3TreeParserNewStream()
79 parser->rec->type = ANTLR3_TYPE_TREE_PARSER; in antlr3TreeParserNewStream()
83 parser->rec->mismatch = mismatch; in antlr3TreeParserNewStream()
84 parser->rec->exConstruct = antlr3MTNExceptionNew; in antlr3TreeParserNewStream()
85 parser->rec->getCurrentInputSymbol = getCurrentInputSymbol; in antlr3TreeParserNewStream()
86 parser->rec->getMissingSymbol = getMissingSymbol; in antlr3TreeParserNewStream()
90 parser->getTreeNodeStream = getTreeNodeStream; in antlr3TreeParserNewStream()
91 parser->setTreeNodeStream = setTreeNodeStream; in antlr3TreeParserNewStream()
92 parser->free = freeParser; in antlr3TreeParserNewStream()
96 parser->setTreeNodeStream(parser, ctnstream); in antlr3TreeParserNewStream()
98 return parser; in antlr3TreeParserNewStream()
127 freeParser (pANTLR3_TREE_PARSER parser) in freeParser() argument
129 if (parser->rec != NULL) in freeParser()
135 if (parser->rec->state != NULL) in freeParser()
137 if (parser->rec->state->following != NULL) in freeParser()
139 parser->rec->state->following->free(parser->rec->state->following); in freeParser()
140 parser->rec->state->following = NULL; in freeParser()
143 parser->rec->free(parser->rec); in freeParser()
144 parser->rec = NULL; in freeParser()
147 ANTLR3_FREE(parser); in freeParser()
153 setTreeNodeStream (pANTLR3_TREE_PARSER parser, pANTLR3_COMMON_TREE_NODE_STREAM input) in setTreeNodeStream() argument
155 parser->ctnstream = input; in setTreeNodeStream()
156 parser->rec->reset (parser->rec); in setTreeNodeStream()
157 parser->ctnstream->reset (parser->ctnstream); in setTreeNodeStream()
163 getTreeNodeStream (pANTLR3_TREE_PARSER parser) in getTreeNodeStream() argument
165 return parser->ctnstream; in getTreeNodeStream()