Lines Matching refs:parser
38 static void setDebugListener (pANTLR3_PARSER parser, pANTLR3_DEBUG_EVENT_LISTENER dbg);
39 static void setTokenStream (pANTLR3_PARSER parser, pANTLR3_TOKEN_STREAM);
40 static pANTLR3_TOKEN_STREAM getTokenStream (pANTLR3_PARSER parser);
41 static void freeParser (pANTLR3_PARSER parser);
46 pANTLR3_PARSER parser; in antlr3ParserNewStreamDbg() local
48 parser = antlr3ParserNewStream(sizeHint, tstream, state); in antlr3ParserNewStreamDbg()
50 if (parser == NULL) in antlr3ParserNewStreamDbg()
55 parser->setDebugListener(parser, dbg); in antlr3ParserNewStreamDbg()
57 return parser; in antlr3ParserNewStreamDbg()
63 pANTLR3_PARSER parser; in antlr3ParserNew() local
67 parser = (pANTLR3_PARSER) ANTLR3_MALLOC(sizeof(ANTLR3_PARSER)); in antlr3ParserNew()
69 if (parser == NULL) in antlr3ParserNew()
76 parser->rec = antlr3BaseRecognizerNew(ANTLR3_TYPE_PARSER, sizeHint, state); in antlr3ParserNew()
78 if (parser->rec == NULL) in antlr3ParserNew()
80 parser->free(parser); in antlr3ParserNew()
84 parser->rec->super = parser; in antlr3ParserNew()
88 parser->rec->exConstruct = antlr3MTExceptionNew; in antlr3ParserNew()
92 parser->setDebugListener = setDebugListener; in antlr3ParserNew()
93 parser->setTokenStream = setTokenStream; in antlr3ParserNew()
94 parser->getTokenStream = getTokenStream; in antlr3ParserNew()
96 parser->free = freeParser; in antlr3ParserNew()
98 return parser; in antlr3ParserNew()
104 pANTLR3_PARSER parser; in antlr3ParserNewStream() local
106 parser = antlr3ParserNew(sizeHint, state); in antlr3ParserNewStream()
108 if (parser == NULL) in antlr3ParserNewStream()
116 parser->setTokenStream(parser, tstream); in antlr3ParserNewStream()
118 return parser; in antlr3ParserNewStream()
122 freeParser (pANTLR3_PARSER parser) in freeParser() argument
124 if (parser->rec != NULL) in freeParser()
130 if (parser->rec->state != NULL) in freeParser()
132 if (parser->rec->state->following != NULL) in freeParser()
134 parser->rec->state->following->free(parser->rec->state->following); in freeParser()
135 parser->rec->state->following = NULL; in freeParser()
138 parser->rec->free(parser->rec); in freeParser()
139 parser->rec = NULL; in freeParser()
142 ANTLR3_FREE(parser); in freeParser()
146 setDebugListener (pANTLR3_PARSER parser, pANTLR3_DEBUG_EVENT_LISTENER dbg) in setDebugListener() argument
157 parser->rec->debugger = dbg; in setDebugListener()
162 if (parser->tstream != NULL) in setDebugListener()
164 parser->tstream->setDebugListener(parser->tstream, dbg); in setDebugListener()
169 setTokenStream (pANTLR3_PARSER parser, pANTLR3_TOKEN_STREAM tstream) in setTokenStream() argument
171 parser->tstream = tstream; in setTokenStream()
172 parser->rec->reset(parser->rec); in setTokenStream()
176 getTokenStream (pANTLR3_PARSER parser) in getTokenStream() argument
178 return parser->tstream; in getTokenStream()