Bug Summary

File:OMEdit/OMEditLIB/Debugger/Parser/GDBMIOutputParser.c
Warning:line 2017, column 17
Potential leak of memory pointed to by 'modelica_tuple22'

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1/** \file
2 * This C source file was generated by $ANTLR version 3.2 Sep 23, 2009 12:02:23
3 *
4 * - From the grammar source file : GDBMIOutput.g
5 * - On : 2020-04-28 16:41:28
6 * - for the parser : GDBMIOutputParserParser *
7 * Editing it, at least manually, is not wise.
8 *
9 * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
10 *
11 *
12*/
13// [The "BSD licence"]
14// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
15// http://www.temporal-wave.com
16// http://www.linkedin.com/in/jimidle
17//
18// All rights reserved.
19//
20// Redistribution and use in source and binary forms, with or without
21// modification, are permitted provided that the following conditions
22// are met:
23// 1. Redistributions of source code must retain the above copyright
24// notice, this list of conditions and the following disclaimer.
25// 2. Redistributions in binary form must reproduce the above copyright
26// notice, this list of conditions and the following disclaimer in the
27// documentation and/or other materials provided with the distribution.
28// 3. The name of the author may not be used to endorse or promote products
29// derived from this software without specific prior written permission.
30//
31// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
32// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
33// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
35// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
40// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41
42/* -----------------------------------------
43 * Include the ANTLR3 generated header file.
44 */
45#include "GDBMIOutputParser.h"
46/* ----------------------------------------- */
47
48
49
50
51
52/* MACROS that hide the C interface implementations from the
53 * generated code, which makes it a little more understandable to the human eye.
54 * I am very much against using C pre-processor macros for function calls and bits
55 * of code as you cannot see what is happening when single stepping in debuggers
56 * and so on. The exception (in my book at least) is for generated code, where you are
57 * not maintaining it, but may wish to read and understand it. If you single step it, you know that input()
58 * hides some indirect calls, but is always referring to the input stream. This is
59 * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig
60 * the runtime interfaces without changing the generated code too often, without
61 * confusing the reader of the generated output, who may not wish to know the gory
62 * details of the interface inheritance.
63 */
64
65#define CTXctx ctx
66
67/* Aids in accessing scopes for grammar programmers
68 */
69#undef SCOPE_TYPE
70#undef SCOPE_STACK
71#undef SCOPE_TOP
72#define SCOPE_TYPE(scope)pGDBMIOutputParser_scope_SCOPE pGDBMIOutputParser_##scope##_SCOPE
73#define SCOPE_STACK(scope)pGDBMIOutputParser_scopeStack pGDBMIOutputParser_##scope##Stack
74#define SCOPE_TOP(scope)ctx->pGDBMIOutputParser_scopeTop ctx->pGDBMIOutputParser_##scope##Top
75#define SCOPE_SIZE(scope)ctx->pGDBMIOutputParser_scopeStack_limit ctx->pGDBMIOutputParser_##scope##Stack_limit
76#define SCOPE_INSTANCE(scope, i)(ctx->pGDBMIOutputParser_scopeStack->get(ctx->pGDBMIOutputParser_scopeStack
,i))
(ctx->SCOPE_STACK(scope)pGDBMIOutputParser_scopeStack->get(ctx->SCOPE_STACK(scope)pGDBMIOutputParser_scopeStack,i))
77
78/* Macros for accessing things in the parser
79 */
80
81#undef PARSERctx->pParser
82#undef RECOGNIZERctx->pParser->rec
83#undef HAVEPARSEDRULE
84#undef MEMOIZE
85#undef INPUTctx->pParser->tstream
86#undef STRSTREAMctx->pParser->tstream
87#undef HASEXCEPTION
88#undef EXCEPTIONctx->pParser->rec->state->exception
89#undef MATCHT
90#undef MATCHANYT
91#undef FOLLOWSTACKctx->pParser->rec->state->following
92#undef FOLLOWPUSH
93#undef FOLLOWPOP
94#undef PRECOVER
95#undef PREPORTERROR
96#undef LA
97#undef LT
98#undef CONSTRUCTEX
99#undef CONSUME
100#undef MARK
101#undef REWIND
102#undef REWINDLAST
103#undef PERRORRECOVERYctx->pParser->rec->state->errorRecovery
104#undef HASFAILED
105#undef FAILEDFLAGctx->pParser->rec->state->failed
106#undef RECOVERFROMMISMATCHEDSET
107#undef RECOVERFROMMISMATCHEDELEMENT
108#undef INDEX
109#undef ADAPTORctx->adaptor
110#undef SEEK
111#undef RULEMEMOctx->pParser->rec->state->ruleMemo
112#undef DBGctx->pParser->rec->debugger
113
114#define PARSERctx->pParser ctx->pParser
115#define RECOGNIZERctx->pParser->rec PARSERctx->pParser->rec
116#define PSRSTATEctx->pParser->rec->state RECOGNIZERctx->pParser->rec->state
117#define HAVEPARSEDRULE(r)ctx->pParser->rec->alreadyParsedRule(ctx->pParser
->rec, r)
RECOGNIZERctx->pParser->rec->alreadyParsedRule(RECOGNIZERctx->pParser->rec, r)
118#define MEMOIZE(ri,si)ctx->pParser->rec->memoize(ctx->pParser->rec, ri
, si)
RECOGNIZERctx->pParser->rec->memoize(RECOGNIZERctx->pParser->rec, ri, si)
119#define INPUTctx->pParser->tstream PARSERctx->pParser->tstream
120#define STRSTREAMctx->pParser->tstream INPUTctx->pParser->tstream
121#define ISTREAMctx->pParser->tstream->istream INPUTctx->pParser->tstream->istream
122#define INDEX()ctx->pParser->tstream->istream->index(ctx->pParser
->tstream->istream)
ISTREAMctx->pParser->tstream->istream->index(INPUTctx->pParser->tstream->istream)
123#define HASEXCEPTION()(ctx->pParser->rec->state->error == 1) (PSRSTATEctx->pParser->rec->state->error == ANTLR3_TRUE1)
124#define EXCEPTIONctx->pParser->rec->state->exception PSRSTATEctx->pParser->rec->state->exception
125#define MATCHT(t, fs)ctx->pParser->rec->match(ctx->pParser->rec, t,
fs)
RECOGNIZERctx->pParser->rec->match(RECOGNIZERctx->pParser->rec, t, fs)
126#define MATCHANYT()ctx->pParser->rec->matchAny(ctx->pParser->rec) RECOGNIZERctx->pParser->rec->matchAny(RECOGNIZERctx->pParser->rec)
127#define FOLLOWSTACKctx->pParser->rec->state->following PSRSTATEctx->pParser->rec->state->following
128#define FOLLOWPUSH(x)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(x)))
, __null)
FOLLOWSTACKctx->pParser->rec->state->following->push(FOLLOWSTACKctx->pParser->rec->state->following, ((void *)(&(x))), NULL__null)
129#define FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
FOLLOWSTACKctx->pParser->rec->state->following->pop(FOLLOWSTACKctx->pParser->rec->state->following)
130#define PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec) RECOGNIZERctx->pParser->rec->recover(RECOGNIZERctx->pParser->rec)
131#define PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
RECOGNIZERctx->pParser->rec->reportError(RECOGNIZERctx->pParser->rec)
132#define LA(n)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, n)
INPUTctx->pParser->tstream->istream->_LA(ISTREAMctx->pParser->tstream->istream, n)
133#define LT(n)ctx->pParser->tstream->_LT(ctx->pParser->tstream
, n)
INPUTctx->pParser->tstream->_LT(INPUTctx->pParser->tstream, n)
134#define CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
RECOGNIZERctx->pParser->rec->exConstruct(RECOGNIZERctx->pParser->rec)
135#define CONSUME()ctx->pParser->tstream->istream->consume(ctx->pParser
->tstream->istream)
ISTREAMctx->pParser->tstream->istream->consume(ISTREAMctx->pParser->tstream->istream)
136#define MARK()ctx->pParser->tstream->istream->mark(ctx->pParser
->tstream->istream)
ISTREAMctx->pParser->tstream->istream->mark(ISTREAMctx->pParser->tstream->istream)
137#define REWIND(m)ctx->pParser->tstream->istream->rewind(ctx->pParser
->tstream->istream, m)
ISTREAMctx->pParser->tstream->istream->rewind(ISTREAMctx->pParser->tstream->istream, m)
138#define REWINDLAST()ctx->pParser->tstream->istream->rewindLast(ctx->
pParser->tstream->istream)
ISTREAMctx->pParser->tstream->istream->rewindLast(ISTREAMctx->pParser->tstream->istream)
139#define SEEK(n)ctx->pParser->tstream->istream->seek(ctx->pParser
->tstream->istream, n)
ISTREAMctx->pParser->tstream->istream->seek(ISTREAMctx->pParser->tstream->istream, n)
140#define PERRORRECOVERYctx->pParser->rec->state->errorRecovery PSRSTATEctx->pParser->rec->state->errorRecovery
141#define FAILEDFLAGctx->pParser->rec->state->failed PSRSTATEctx->pParser->rec->state->failed
142#define HASFAILED()(ctx->pParser->rec->state->failed == 1) (FAILEDFLAGctx->pParser->rec->state->failed == ANTLR3_TRUE1)
143#define BACKTRACKINGctx->pParser->rec->state->backtracking PSRSTATEctx->pParser->rec->state->backtracking
144#define RECOVERFROMMISMATCHEDSET(s)ctx->pParser->rec->recoverFromMismatchedSet(ctx->
pParser->rec, s)
RECOGNIZERctx->pParser->rec->recoverFromMismatchedSet(RECOGNIZERctx->pParser->rec, s)
145#define RECOVERFROMMISMATCHEDELEMENT(e)ctx->pParser->rec->recoverFromMismatchedElement(ctx->
pParser->rec, s)
RECOGNIZERctx->pParser->rec->recoverFromMismatchedElement(RECOGNIZERctx->pParser->rec, s)
146#define ADAPTORctx->adaptor ctx->adaptor
147#define RULEMEMOctx->pParser->rec->state->ruleMemo PSRSTATEctx->pParser->rec->state->ruleMemo
148#define DBGctx->pParser->rec->debugger RECOGNIZERctx->pParser->rec->debugger
149
150#define TOKTEXT(tok, txt)tok, (pANTLR3_UINT8)txt tok, (pANTLR3_UINT8)txt
151
152/* The 4 tokens defined below may well clash with your own #defines or token types. If so
153 * then for the present you must use different names for your defines as these are hard coded
154 * in the code generator. It would be better not to use such names internally, and maybe
155 * we can change this in a forthcoming release. I deliberately do not #undef these
156 * here as this will at least give you a redefined error somewhere if they clash.
157 */
158#define UP3 ANTLR3_TOKEN_UP3
159#define DOWN2 ANTLR3_TOKEN_DOWN2
160#define EORANTLR3_TOKEN_EOR ANTLR3_TOKEN_EOR
161#define INVALID0 ANTLR3_TOKEN_INVALID0
162
163
164/* =============================================================================
165 * Functions to create and destroy scopes. First come the rule scopes, followed
166 * by the global declared scopes.
167 */
168
169
170
171/* ============================================================================= */
172
173/* =============================================================================
174 * Start of recognizer
175 */
176
177
178
179/** \brief Table of all token names in symbolic order, mainly used for
180 * error reporting.
181 */
182pANTLR3_UINT8 GDBMIOutputParserTokenNames[21+4]
183 = {
184 (pANTLR3_UINT8) "<invalid>", /* String to print to indicate an invalid token */
185 (pANTLR3_UINT8) "<EOR>",
186 (pANTLR3_UINT8) "<DOWN>",
187 (pANTLR3_UINT8) "<UP>",
188 (pANTLR3_UINT8) "TOKEN",
189 (pANTLR3_UINT8) "RESULT",
190 (pANTLR3_UINT8) "RESULT_CLASS",
191 (pANTLR3_UINT8) "COMMA",
192 (pANTLR3_UINT8) "WS",
193 (pANTLR3_UINT8) "NL",
194 (pANTLR3_UINT8) "EXEC",
195 (pANTLR3_UINT8) "STATUS",
196 (pANTLR3_UINT8) "NOTIFY",
197 (pANTLR3_UINT8) "STRING",
198 (pANTLR3_UINT8) "C_STRING",
199 (pANTLR3_UINT8) "CONSOLE",
200 (pANTLR3_UINT8) "TARGET",
201 (pANTLR3_UINT8) "LOG",
202 (pANTLR3_UINT8) "EOM",
203 (pANTLR3_UINT8) "'{}'",
204 (pANTLR3_UINT8) "'{'",
205 (pANTLR3_UINT8) "'}'",
206 (pANTLR3_UINT8) "'[]'",
207 (pANTLR3_UINT8) "'['",
208 (pANTLR3_UINT8) "']'"
209 };
210
211
212
213// Forward declare the locally static matching functions we have generated.
214//
215static GDBMIResultRecord* result_record (pGDBMIOutputParser ctx);
216static GDBMIResponse* output (pGDBMIOutputParser ctx);
217static GDBMIOutOfBandRecord* out_of_band_record (pGDBMIOutputParser ctx);
218static GDBMIResultRecord* async_record (pGDBMIOutputParser ctx);
219static GDBMIResultRecord* exec_async_output (pGDBMIOutputParser ctx);
220static GDBMIResultRecord* status_async_output (pGDBMIOutputParser ctx);
221static GDBMIResultRecord* notify_async_output (pGDBMIOutputParser ctx);
222static GDBMIResultRecord* async_output (pGDBMIOutputParser ctx);
223static GDBMIOutputParser_var_return var (pGDBMIOutputParser ctx);
224static GDBMIOutputParser_constant_return constant (pGDBMIOutputParser ctx);
225static GDBMIValue* value (pGDBMIOutputParser ctx);
226static GDBMIResult* result (pGDBMIOutputParser ctx);
227static GDBMITuple* modelica_tuple (pGDBMIOutputParser ctx);
228static GDBMIStreamRecord * stream_record (pGDBMIOutputParser ctx);
229static GDBMIList* lista (pGDBMIOutputParser ctx);
230static char* console_stream_output (pGDBMIOutputParser ctx);
231static char* target_stream_output (pGDBMIOutputParser ctx);
232static char* log_stream_output (pGDBMIOutputParser ctx);
233static void GDBMIOutputParserFree(pGDBMIOutputParser ctx);
234/* For use in tree output where we are accumulating rule labels via label += ruleRef
235 * we need a function that knows how to free a return scope when the list is destroyed.
236 * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro.
237 */
238static void ANTLR3_CDECL freeScope(void * scope)
239{
240 ANTLR3_FREE(scope)free ((void *)(scope));
241}
242
243/** \brief Name of the grammar file that generated this code
244 */
245static const char fileName[] = "GDBMIOutput.g";
246
247/** \brief Return the name of the grammar file that generated this code.
248 */
249static const char * getGrammarFileName()
250{
251 return fileName;
252}
253/** \brief Create a new GDBMIOutputParser parser and return a context for it.
254 *
255 * \param[in] instream Pointer to an input stream interface.
256 *
257 * \return Pointer to new parser context upon success.
258 */
259ANTLR3_API pGDBMIOutputParser
260GDBMIOutputParserNew (pANTLR3_COMMON_TOKEN_STREAM instream)
261{
262 // See if we can create a new parser with the standard constructor
263 //
264 return GDBMIOutputParserNewSSD(instream, NULL__null);
265}
266
267/** \brief Create a new GDBMIOutputParser parser and return a context for it.
268 *
269 * \param[in] instream Pointer to an input stream interface.
270 *
271 * \return Pointer to new parser context upon success.
272 */
273ANTLR3_API pGDBMIOutputParser
274GDBMIOutputParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state)
275{
276 pGDBMIOutputParser ctx; /* Context structure we will build and return */
277
278 ctx = (pGDBMIOutputParser) ANTLR3_CALLOC(1, sizeof(GDBMIOutputParser))calloc (1, (size_t)(sizeof(GDBMIOutputParser)));;
279
280 if (ctx == NULL__null)
281 {
282 // Failed to allocate memory for parser context
283 //
284 return NULL__null;
285 }
286
287 /* -------------------------------------------------------------------
288 * Memory for basic structure is allocated, now to fill in
289 * the base ANTLR3 structures. We initialize the function pointers
290 * for the standard ANTLR3 parser function set, but upon return
291 * from here, the programmer may set the pointers to provide custom
292 * implementations of each function.
293 *
294 * We don't use the macros defined in GDBMIOutputParser.h here, in order that you can get a sense
295 * of what goes where.
296 */
297
298 /* Create a base parser/recognizer, using the supplied token stream
299 */
300 ctx->pParser = antlr3ParserNewStream(ANTLR3_SIZE_HINT2049, instream->tstream, state);
301 /* Install the implementation of our GDBMIOutputParser interface
302 */
303 ctx->result_record = result_record;
304 ctx->output = output;
305 ctx->out_of_band_record = out_of_band_record;
306 ctx->async_record = async_record;
307 ctx->exec_async_output = exec_async_output;
308 ctx->status_async_output = status_async_output;
309 ctx->notify_async_output = notify_async_output;
310 ctx->async_output = async_output;
311 ctx->var = var;
312 ctx->constant = constant;
313 ctx->value = value;
314 ctx->result = result;
315 ctx->modelica_tuple = modelica_tuple;
316 ctx->stream_record = stream_record;
317 ctx->lista = lista;
318 ctx->console_stream_output = console_stream_output;
319 ctx->target_stream_output = target_stream_output;
320 ctx->log_stream_output = log_stream_output;
321 ctx->free = GDBMIOutputParserFree;
322 ctx->getGrammarFileName = getGrammarFileName;
323
324 /* Install the scope pushing methods.
325 */
326
327
328
329
330
331 /* Install the token table
332 */
333 PSRSTATEctx->pParser->rec->state->tokenNames = GDBMIOutputParserTokenNames;
334
335
336 /* Return the newly built parser to the caller
337 */
338 return ctx;
339}
340
341/** Free the parser resources
342 */
343 static void
344 GDBMIOutputParserFree(pGDBMIOutputParser ctx)
345 {
346 /* Free any scope memory
347 */
348
349
350 // Free this parser
351 //
352 ctx->pParser->free(ctx->pParser);
353 ANTLR3_FREE(ctx)free ((void *)(ctx));
354
355 /* Everything is released, so we can return
356 */
357 return;
358 }
359
360/** Return token names used by this parser
361 *
362 * The returned pointer is used as an index into the token names table (using the token
363 * number as the index).
364 *
365 * \return Pointer to first char * in the table.
366 */
367static pANTLR3_UINT8 *getTokenNames()
368{
369 return GDBMIOutputParserTokenNames;
370}
371
372
373/* Declare the bitsets
374 */
375
376/** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_in_result_record60 */
377static ANTLR3_BITWORD FOLLOW_TOKEN_in_result_record60_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000020)0x0000000000000020ULL };
378static ANTLR3_BITSET_LIST FOLLOW_TOKEN_in_result_record60 = { FOLLOW_TOKEN_in_result_record60_bits, 1 };
379/** Bitset defining follow set for error recovery in rule state: FOLLOW_RESULT_in_result_record66 */
380static ANTLR3_BITWORD FOLLOW_RESULT_in_result_record66_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000040)0x0000000000000040ULL };
381static ANTLR3_BITSET_LIST FOLLOW_RESULT_in_result_record66 = { FOLLOW_RESULT_in_result_record66_bits, 1 };
382/** Bitset defining follow set for error recovery in rule state: FOLLOW_RESULT_CLASS_in_result_record72 */
383static ANTLR3_BITWORD FOLLOW_RESULT_CLASS_in_result_record72_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000382)0x0000000000000382ULL };
384static ANTLR3_BITSET_LIST FOLLOW_RESULT_CLASS_in_result_record72 = { FOLLOW_RESULT_CLASS_in_result_record72_bits, 1 };
385/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMMA_in_result_record81 */
386static ANTLR3_BITWORD FOLLOW_COMMA_in_result_record81_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
387static ANTLR3_BITSET_LIST FOLLOW_COMMA_in_result_record81 = { FOLLOW_COMMA_in_result_record81_bits, 1 };
388/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_result_record83 */
389static ANTLR3_BITWORD FOLLOW_result_in_result_record83_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000382)0x0000000000000382ULL };
390static ANTLR3_BITSET_LIST FOLLOW_result_in_result_record83 = { FOLLOW_result_in_result_record83_bits, 1 };
391/** Bitset defining follow set for error recovery in rule state: FOLLOW_WS_in_result_record89 */
392static ANTLR3_BITWORD FOLLOW_WS_in_result_record89_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000302)0x0000000000000302ULL };
393static ANTLR3_BITSET_LIST FOLLOW_WS_in_result_record89 = { FOLLOW_WS_in_result_record89_bits, 1 };
394/** Bitset defining follow set for error recovery in rule state: FOLLOW_NL_in_result_record92 */
395static ANTLR3_BITWORD FOLLOW_NL_in_result_record92_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
396static ANTLR3_BITSET_LIST FOLLOW_NL_in_result_record92 = { FOLLOW_NL_in_result_record92_bits, 1 };
397/** Bitset defining follow set for error recovery in rule state: FOLLOW_out_of_band_record_in_output118 */
398static ANTLR3_BITWORD FOLLOW_out_of_band_record_in_output118_bits[] = { ANTLR3_UINT64_LIT(0x0000000000039F32)0x0000000000039F32ULL };
399static ANTLR3_BITSET_LIST FOLLOW_out_of_band_record_in_output118 = { FOLLOW_out_of_band_record_in_output118_bits, 1 };
400/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_record_in_output129 */
401static ANTLR3_BITWORD FOLLOW_result_record_in_output129_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000302)0x0000000000000302ULL };
402static ANTLR3_BITSET_LIST FOLLOW_result_record_in_output129 = { FOLLOW_result_record_in_output129_bits, 1 };
403/** Bitset defining follow set for error recovery in rule state: FOLLOW_WS_in_output135 */
404static ANTLR3_BITWORD FOLLOW_WS_in_output135_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000302)0x0000000000000302ULL };
405static ANTLR3_BITSET_LIST FOLLOW_WS_in_output135 = { FOLLOW_WS_in_output135_bits, 1 };
406/** Bitset defining follow set for error recovery in rule state: FOLLOW_NL_in_output138 */
407static ANTLR3_BITWORD FOLLOW_NL_in_output138_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
408static ANTLR3_BITSET_LIST FOLLOW_NL_in_output138 = { FOLLOW_NL_in_output138_bits, 1 };
409/** Bitset defining follow set for error recovery in rule state: FOLLOW_async_record_in_out_of_band_record163 */
410static ANTLR3_BITWORD FOLLOW_async_record_in_out_of_band_record163_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
411static ANTLR3_BITSET_LIST FOLLOW_async_record_in_out_of_band_record163 = { FOLLOW_async_record_in_out_of_band_record163_bits, 1 };
412/** Bitset defining follow set for error recovery in rule state: FOLLOW_stream_record_in_out_of_band_record171 */
413static ANTLR3_BITWORD FOLLOW_stream_record_in_out_of_band_record171_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
414static ANTLR3_BITSET_LIST FOLLOW_stream_record_in_out_of_band_record171 = { FOLLOW_stream_record_in_out_of_band_record171_bits, 1 };
415/** Bitset defining follow set for error recovery in rule state: FOLLOW_exec_async_output_in_async_record190 */
416static ANTLR3_BITWORD FOLLOW_exec_async_output_in_async_record190_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
417static ANTLR3_BITSET_LIST FOLLOW_exec_async_output_in_async_record190 = { FOLLOW_exec_async_output_in_async_record190_bits, 1 };
418/** Bitset defining follow set for error recovery in rule state: FOLLOW_status_async_output_in_async_record198 */
419static ANTLR3_BITWORD FOLLOW_status_async_output_in_async_record198_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
420static ANTLR3_BITSET_LIST FOLLOW_status_async_output_in_async_record198 = { FOLLOW_status_async_output_in_async_record198_bits, 1 };
421/** Bitset defining follow set for error recovery in rule state: FOLLOW_notify_async_output_in_async_record206 */
422static ANTLR3_BITWORD FOLLOW_notify_async_output_in_async_record206_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
423static ANTLR3_BITSET_LIST FOLLOW_notify_async_output_in_async_record206 = { FOLLOW_notify_async_output_in_async_record206_bits, 1 };
424/** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_in_exec_async_output226 */
425static ANTLR3_BITWORD FOLLOW_TOKEN_in_exec_async_output226_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000400)0x0000000000000400ULL };
426static ANTLR3_BITSET_LIST FOLLOW_TOKEN_in_exec_async_output226 = { FOLLOW_TOKEN_in_exec_async_output226_bits, 1 };
427/** Bitset defining follow set for error recovery in rule state: FOLLOW_EXEC_in_exec_async_output232 */
428static ANTLR3_BITWORD FOLLOW_EXEC_in_exec_async_output232_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000040)0x0000000000000040ULL };
429static ANTLR3_BITSET_LIST FOLLOW_EXEC_in_exec_async_output232 = { FOLLOW_EXEC_in_exec_async_output232_bits, 1 };
430/** Bitset defining follow set for error recovery in rule state: FOLLOW_async_output_in_exec_async_output234 */
431static ANTLR3_BITWORD FOLLOW_async_output_in_exec_async_output234_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
432static ANTLR3_BITSET_LIST FOLLOW_async_output_in_exec_async_output234 = { FOLLOW_async_output_in_exec_async_output234_bits, 1 };
433/** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_in_status_async_output254 */
434static ANTLR3_BITWORD FOLLOW_TOKEN_in_status_async_output254_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000800)0x0000000000000800ULL };
435static ANTLR3_BITSET_LIST FOLLOW_TOKEN_in_status_async_output254 = { FOLLOW_TOKEN_in_status_async_output254_bits, 1 };
436/** Bitset defining follow set for error recovery in rule state: FOLLOW_STATUS_in_status_async_output260 */
437static ANTLR3_BITWORD FOLLOW_STATUS_in_status_async_output260_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000040)0x0000000000000040ULL };
438static ANTLR3_BITSET_LIST FOLLOW_STATUS_in_status_async_output260 = { FOLLOW_STATUS_in_status_async_output260_bits, 1 };
439/** Bitset defining follow set for error recovery in rule state: FOLLOW_async_output_in_status_async_output262 */
440static ANTLR3_BITWORD FOLLOW_async_output_in_status_async_output262_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
441static ANTLR3_BITSET_LIST FOLLOW_async_output_in_status_async_output262 = { FOLLOW_async_output_in_status_async_output262_bits, 1 };
442/** Bitset defining follow set for error recovery in rule state: FOLLOW_TOKEN_in_notify_async_output282 */
443static ANTLR3_BITWORD FOLLOW_TOKEN_in_notify_async_output282_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000)0x0000000000001000ULL };
444static ANTLR3_BITSET_LIST FOLLOW_TOKEN_in_notify_async_output282 = { FOLLOW_TOKEN_in_notify_async_output282_bits, 1 };
445/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOTIFY_in_notify_async_output288 */
446static ANTLR3_BITWORD FOLLOW_NOTIFY_in_notify_async_output288_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000040)0x0000000000000040ULL };
447static ANTLR3_BITSET_LIST FOLLOW_NOTIFY_in_notify_async_output288 = { FOLLOW_NOTIFY_in_notify_async_output288_bits, 1 };
448/** Bitset defining follow set for error recovery in rule state: FOLLOW_async_output_in_notify_async_output290 */
449static ANTLR3_BITWORD FOLLOW_async_output_in_notify_async_output290_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
450static ANTLR3_BITSET_LIST FOLLOW_async_output_in_notify_async_output290 = { FOLLOW_async_output_in_notify_async_output290_bits, 1 };
451/** Bitset defining follow set for error recovery in rule state: FOLLOW_RESULT_CLASS_in_async_output317 */
452static ANTLR3_BITWORD FOLLOW_RESULT_CLASS_in_async_output317_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000282)0x0000000000000282ULL };
453static ANTLR3_BITSET_LIST FOLLOW_RESULT_CLASS_in_async_output317 = { FOLLOW_RESULT_CLASS_in_async_output317_bits, 1 };
454/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMMA_in_async_output327 */
455static ANTLR3_BITWORD FOLLOW_COMMA_in_async_output327_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
456static ANTLR3_BITSET_LIST FOLLOW_COMMA_in_async_output327 = { FOLLOW_COMMA_in_async_output327_bits, 1 };
457/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_async_output329 */
458static ANTLR3_BITWORD FOLLOW_result_in_async_output329_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000282)0x0000000000000282ULL };
459static ANTLR3_BITSET_LIST FOLLOW_result_in_async_output329 = { FOLLOW_result_in_async_output329_bits, 1 };
460/** Bitset defining follow set for error recovery in rule state: FOLLOW_NL_in_async_output335 */
461static ANTLR3_BITWORD FOLLOW_NL_in_async_output335_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
462static ANTLR3_BITSET_LIST FOLLOW_NL_in_async_output335 = { FOLLOW_NL_in_async_output335_bits, 1 };
463/** Bitset defining follow set for error recovery in rule state: FOLLOW_STRING_in_var360 */
464static ANTLR3_BITWORD FOLLOW_STRING_in_var360_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
465static ANTLR3_BITSET_LIST FOLLOW_STRING_in_var360 = { FOLLOW_STRING_in_var360_bits, 1 };
466/** Bitset defining follow set for error recovery in rule state: FOLLOW_C_STRING_in_constant386 */
467static ANTLR3_BITWORD FOLLOW_C_STRING_in_constant386_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
468static ANTLR3_BITSET_LIST FOLLOW_C_STRING_in_constant386 = { FOLLOW_C_STRING_in_constant386_bits, 1 };
469/** Bitset defining follow set for error recovery in rule state: FOLLOW_constant_in_value412 */
470static ANTLR3_BITWORD FOLLOW_constant_in_value412_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
471static ANTLR3_BITSET_LIST FOLLOW_constant_in_value412 = { FOLLOW_constant_in_value412_bits, 1 };
472/** Bitset defining follow set for error recovery in rule state: FOLLOW_modelica_tuple_in_value422 */
473static ANTLR3_BITWORD FOLLOW_modelica_tuple_in_value422_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
474static ANTLR3_BITSET_LIST FOLLOW_modelica_tuple_in_value422 = { FOLLOW_modelica_tuple_in_value422_bits, 1 };
475/** Bitset defining follow set for error recovery in rule state: FOLLOW_lista_in_value432 */
476static ANTLR3_BITWORD FOLLOW_lista_in_value432_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
477static ANTLR3_BITSET_LIST FOLLOW_lista_in_value432 = { FOLLOW_lista_in_value432_bits, 1 };
478/** Bitset defining follow set for error recovery in rule state: FOLLOW_var_in_result459 */
479static ANTLR3_BITWORD FOLLOW_var_in_result459_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000)0x0000000000001000ULL };
480static ANTLR3_BITSET_LIST FOLLOW_var_in_result459 = { FOLLOW_var_in_result459_bits, 1 };
481/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOTIFY_in_result461 */
482static ANTLR3_BITWORD FOLLOW_NOTIFY_in_result461_bits[] = { ANTLR3_UINT64_LIT(0x0000000000D84000)0x0000000000D84000ULL };
483static ANTLR3_BITSET_LIST FOLLOW_NOTIFY_in_result461 = { FOLLOW_NOTIFY_in_result461_bits, 1 };
484/** Bitset defining follow set for error recovery in rule state: FOLLOW_value_in_result463 */
485static ANTLR3_BITWORD FOLLOW_value_in_result463_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
486static ANTLR3_BITSET_LIST FOLLOW_value_in_result463 = { FOLLOW_value_in_result463_bits, 1 };
487/** Bitset defining follow set for error recovery in rule state: FOLLOW_19_in_modelica_tuple490 */
488static ANTLR3_BITWORD FOLLOW_19_in_modelica_tuple490_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
489static ANTLR3_BITSET_LIST FOLLOW_19_in_modelica_tuple490 = { FOLLOW_19_in_modelica_tuple490_bits, 1 };
490/** Bitset defining follow set for error recovery in rule state: FOLLOW_20_in_modelica_tuple496 */
491static ANTLR3_BITWORD FOLLOW_20_in_modelica_tuple496_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
492static ANTLR3_BITSET_LIST FOLLOW_20_in_modelica_tuple496 = { FOLLOW_20_in_modelica_tuple496_bits, 1 };
493/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_modelica_tuple500 */
494static ANTLR3_BITWORD FOLLOW_result_in_modelica_tuple500_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200080)0x0000000000200080ULL };
495static ANTLR3_BITSET_LIST FOLLOW_result_in_modelica_tuple500 = { FOLLOW_result_in_modelica_tuple500_bits, 1 };
496/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMMA_in_modelica_tuple505 */
497static ANTLR3_BITWORD FOLLOW_COMMA_in_modelica_tuple505_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
498static ANTLR3_BITSET_LIST FOLLOW_COMMA_in_modelica_tuple505 = { FOLLOW_COMMA_in_modelica_tuple505_bits, 1 };
499/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_modelica_tuple509 */
500static ANTLR3_BITWORD FOLLOW_result_in_modelica_tuple509_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200080)0x0000000000200080ULL };
501static ANTLR3_BITSET_LIST FOLLOW_result_in_modelica_tuple509 = { FOLLOW_result_in_modelica_tuple509_bits, 1 };
502/** Bitset defining follow set for error recovery in rule state: FOLLOW_21_in_modelica_tuple515 */
503static ANTLR3_BITWORD FOLLOW_21_in_modelica_tuple515_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
504static ANTLR3_BITSET_LIST FOLLOW_21_in_modelica_tuple515 = { FOLLOW_21_in_modelica_tuple515_bits, 1 };
505/** Bitset defining follow set for error recovery in rule state: FOLLOW_console_stream_output_in_stream_record539 */
506static ANTLR3_BITWORD FOLLOW_console_stream_output_in_stream_record539_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
507static ANTLR3_BITSET_LIST FOLLOW_console_stream_output_in_stream_record539 = { FOLLOW_console_stream_output_in_stream_record539_bits, 1 };
508/** Bitset defining follow set for error recovery in rule state: FOLLOW_target_stream_output_in_stream_record547 */
509static ANTLR3_BITWORD FOLLOW_target_stream_output_in_stream_record547_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
510static ANTLR3_BITSET_LIST FOLLOW_target_stream_output_in_stream_record547 = { FOLLOW_target_stream_output_in_stream_record547_bits, 1 };
511/** Bitset defining follow set for error recovery in rule state: FOLLOW_log_stream_output_in_stream_record555 */
512static ANTLR3_BITWORD FOLLOW_log_stream_output_in_stream_record555_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
513static ANTLR3_BITSET_LIST FOLLOW_log_stream_output_in_stream_record555 = { FOLLOW_log_stream_output_in_stream_record555_bits, 1 };
514/** Bitset defining follow set for error recovery in rule state: FOLLOW_22_in_lista581 */
515static ANTLR3_BITWORD FOLLOW_22_in_lista581_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
516static ANTLR3_BITSET_LIST FOLLOW_22_in_lista581 = { FOLLOW_22_in_lista581_bits, 1 };
517/** Bitset defining follow set for error recovery in rule state: FOLLOW_23_in_lista587 */
518static ANTLR3_BITWORD FOLLOW_23_in_lista587_bits[] = { ANTLR3_UINT64_LIT(0x0000000000D84000)0x0000000000D84000ULL };
519static ANTLR3_BITSET_LIST FOLLOW_23_in_lista587 = { FOLLOW_23_in_lista587_bits, 1 };
520/** Bitset defining follow set for error recovery in rule state: FOLLOW_value_in_lista591 */
521static ANTLR3_BITWORD FOLLOW_value_in_lista591_bits[] = { ANTLR3_UINT64_LIT(0x0000000001000080)0x0000000001000080ULL };
522static ANTLR3_BITSET_LIST FOLLOW_value_in_lista591 = { FOLLOW_value_in_lista591_bits, 1 };
523/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMMA_in_lista596 */
524static ANTLR3_BITWORD FOLLOW_COMMA_in_lista596_bits[] = { ANTLR3_UINT64_LIT(0x0000000000D84000)0x0000000000D84000ULL };
525static ANTLR3_BITSET_LIST FOLLOW_COMMA_in_lista596 = { FOLLOW_COMMA_in_lista596_bits, 1 };
526/** Bitset defining follow set for error recovery in rule state: FOLLOW_value_in_lista600 */
527static ANTLR3_BITWORD FOLLOW_value_in_lista600_bits[] = { ANTLR3_UINT64_LIT(0x0000000001000080)0x0000000001000080ULL };
528static ANTLR3_BITSET_LIST FOLLOW_value_in_lista600 = { FOLLOW_value_in_lista600_bits, 1 };
529/** Bitset defining follow set for error recovery in rule state: FOLLOW_24_in_lista606 */
530static ANTLR3_BITWORD FOLLOW_24_in_lista606_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
531static ANTLR3_BITSET_LIST FOLLOW_24_in_lista606 = { FOLLOW_24_in_lista606_bits, 1 };
532/** Bitset defining follow set for error recovery in rule state: FOLLOW_23_in_lista612 */
533static ANTLR3_BITWORD FOLLOW_23_in_lista612_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
534static ANTLR3_BITSET_LIST FOLLOW_23_in_lista612 = { FOLLOW_23_in_lista612_bits, 1 };
535/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_lista616 */
536static ANTLR3_BITWORD FOLLOW_result_in_lista616_bits[] = { ANTLR3_UINT64_LIT(0x0000000001000080)0x0000000001000080ULL };
537static ANTLR3_BITSET_LIST FOLLOW_result_in_lista616 = { FOLLOW_result_in_lista616_bits, 1 };
538/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMMA_in_lista621 */
539static ANTLR3_BITWORD FOLLOW_COMMA_in_lista621_bits[] = { ANTLR3_UINT64_LIT(0x0000000000002000)0x0000000000002000ULL };
540static ANTLR3_BITSET_LIST FOLLOW_COMMA_in_lista621 = { FOLLOW_COMMA_in_lista621_bits, 1 };
541/** Bitset defining follow set for error recovery in rule state: FOLLOW_result_in_lista625 */
542static ANTLR3_BITWORD FOLLOW_result_in_lista625_bits[] = { ANTLR3_UINT64_LIT(0x0000000001000080)0x0000000001000080ULL };
543static ANTLR3_BITSET_LIST FOLLOW_result_in_lista625 = { FOLLOW_result_in_lista625_bits, 1 };
544/** Bitset defining follow set for error recovery in rule state: FOLLOW_24_in_lista631 */
545static ANTLR3_BITWORD FOLLOW_24_in_lista631_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
546static ANTLR3_BITSET_LIST FOLLOW_24_in_lista631 = { FOLLOW_24_in_lista631_bits, 1 };
547/** Bitset defining follow set for error recovery in rule state: FOLLOW_CONSOLE_in_console_stream_output648 */
548static ANTLR3_BITWORD FOLLOW_CONSOLE_in_console_stream_output648_bits[] = { ANTLR3_UINT64_LIT(0x0000000000004000)0x0000000000004000ULL };
549static ANTLR3_BITSET_LIST FOLLOW_CONSOLE_in_console_stream_output648 = { FOLLOW_CONSOLE_in_console_stream_output648_bits, 1 };
550/** Bitset defining follow set for error recovery in rule state: FOLLOW_C_STRING_in_console_stream_output650 */
551static ANTLR3_BITWORD FOLLOW_C_STRING_in_console_stream_output650_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
552static ANTLR3_BITSET_LIST FOLLOW_C_STRING_in_console_stream_output650 = { FOLLOW_C_STRING_in_console_stream_output650_bits, 1 };
553/** Bitset defining follow set for error recovery in rule state: FOLLOW_TARGET_in_target_stream_output669 */
554static ANTLR3_BITWORD FOLLOW_TARGET_in_target_stream_output669_bits[] = { ANTLR3_UINT64_LIT(0x0000000000004000)0x0000000000004000ULL };
555static ANTLR3_BITSET_LIST FOLLOW_TARGET_in_target_stream_output669 = { FOLLOW_TARGET_in_target_stream_output669_bits, 1 };
556/** Bitset defining follow set for error recovery in rule state: FOLLOW_C_STRING_in_target_stream_output671 */
557static ANTLR3_BITWORD FOLLOW_C_STRING_in_target_stream_output671_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
558static ANTLR3_BITSET_LIST FOLLOW_C_STRING_in_target_stream_output671 = { FOLLOW_C_STRING_in_target_stream_output671_bits, 1 };
559/** Bitset defining follow set for error recovery in rule state: FOLLOW_LOG_in_log_stream_output690 */
560static ANTLR3_BITWORD FOLLOW_LOG_in_log_stream_output690_bits[] = { ANTLR3_UINT64_LIT(0x0000000000004000)0x0000000000004000ULL };
561static ANTLR3_BITSET_LIST FOLLOW_LOG_in_log_stream_output690 = { FOLLOW_LOG_in_log_stream_output690_bits, 1 };
562/** Bitset defining follow set for error recovery in rule state: FOLLOW_C_STRING_in_log_stream_output692 */
563static ANTLR3_BITWORD FOLLOW_C_STRING_in_log_stream_output692_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002)0x0000000000000002ULL };
564static ANTLR3_BITSET_LIST FOLLOW_C_STRING_in_log_stream_output692 = { FOLLOW_C_STRING_in_log_stream_output692_bits, 1 };
565
566
567
568
569/* ==============================================
570 * Parsing rules
571 */
572/**
573 * $ANTLR start result_record
574 * GDBMIOutput.g:64:1: result_record returns [GDBMIResultRecord* miResultRecord] : ( TOKEN )? RESULT RESULT_CLASS ( COMMA result )* ( WS )* ( NL )? ;
575 */
576static GDBMIResultRecord*
577result_record(pGDBMIOutputParser ctx)
578{
579 GDBMIResultRecord* miResultRecord = NULL__null;
580
581 pANTLR3_COMMON_TOKEN TOKEN1;
582 pANTLR3_COMMON_TOKEN RESULT_CLASS2;
583 GDBMIResult* result3;
584 #undef RETURN_TYPE_result3GDBMIResult*
585 #define RETURN_TYPE_result3GDBMIResult* GDBMIResult*
586
587 /* Initialize rule variables
588 */
589
590
591
592 miResultRecord = new GDBMIResultRecord;
593
594 TOKEN1 = NULL__null;
595 RESULT_CLASS2 = NULL__null;
596 result3 = NULL__null;
597
598 {
599 // GDBMIOutput.g:68:3: ( ( TOKEN )? RESULT RESULT_CLASS ( COMMA result )* ( WS )* ( NL )? )
600 // GDBMIOutput.g:68:5: ( TOKEN )? RESULT RESULT_CLASS ( COMMA result )* ( WS )* ( NL )?
601 {
602
603 // GDBMIOutput.g:68:5: ( TOKEN )?
604 {
605 int alt1=2;
606 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
9
'Default' branch taken. Execution continues on line 615
607 {
608 case TOKEN4:
609 {
610 alt1=1;
611 }
612 break;
613 }
614
615 switch (alt1)
10
'Default' branch taken. Execution continues on line 635
616 {
617 case 1:
618 // GDBMIOutput.g:68:6: TOKEN
619 {
620 TOKEN1 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN, &FOLLOW_TOKEN_in_result_record60)ctx->pParser->rec->match(ctx->pParser->rec, 4,
&FOLLOW_TOKEN_in_result_record60)
;
621 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
622 {
623 goto ruleresult_recordEx;
624 }
625
626 {
627 miResultRecord->token = atoi((char*)(TOKEN1->getText(TOKEN1))->chars);
628 }
629
630 }
631 break;
632
633 }
634 }
635 MATCHT(RESULT, &FOLLOW_RESULT_in_result_record66)ctx->pParser->rec->match(ctx->pParser->rec, 5,
&FOLLOW_RESULT_in_result_record66)
;
636 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
11
Taking false branch
637 {
638 goto ruleresult_recordEx;
639 }
640
641 RESULT_CLASS2 = (pANTLR3_COMMON_TOKEN) MATCHT(RESULT_CLASS, &FOLLOW_RESULT_CLASS_in_result_record72)ctx->pParser->rec->match(ctx->pParser->rec, 6,
&FOLLOW_RESULT_CLASS_in_result_record72)
;
642 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
12
Taking false branch
643 {
644 goto ruleresult_recordEx;
645 }
646
647 {
648 miResultRecord->cls = (char*)(RESULT_CLASS2->getText(RESULT_CLASS2))->chars;
649 }
650
651 // GDBMIOutput.g:70:5: ( COMMA result )*
652
653 for (;;)
13
Loop condition is true. Entering loop body
20
Loop condition is true. Entering loop body
27
Loop condition is true. Entering loop body
34
Loop condition is true. Entering loop body
654 {
655 int alt2=2;
656 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
14
Control jumps to 'case 7:' at line 658
21
Control jumps to 'case 7:' at line 658
28
Control jumps to 'case 7:' at line 658
35
Control jumps to 'case 7:' at line 658
657 {
658 case COMMA7:
659 {
660 alt2=1;
661 }
662 break;
15
Execution continues on line 666
22
Execution continues on line 666
29
Execution continues on line 666
36
Execution continues on line 666
663
664 }
665
666 switch (alt2)
16
Control jumps to 'case 1:' at line 668
23
Control jumps to 'case 1:' at line 668
30
Control jumps to 'case 1:' at line 668
37
Control jumps to 'case 1:' at line 668
667 {
668 case 1:
669 // GDBMIOutput.g:70:6: COMMA result
670 {
671 MATCHT(COMMA, &FOLLOW_COMMA_in_result_record81)ctx->pParser->rec->match(ctx->pParser->rec, 7,
&FOLLOW_COMMA_in_result_record81)
;
672 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
17
Taking false branch
24
Taking false branch
31
Taking false branch
38
Taking false branch
673 {
674 goto ruleresult_recordEx;
675 }
676
677 FOLLOWPUSH(FOLLOW_result_in_result_record83)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_result_record83
))), __null)
;
678 result3=result(ctx);
39
Calling 'result'
679
680 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
681 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
18
Taking false branch
25
Taking false branch
32
Taking false branch
682 {
683 goto ruleresult_recordEx;
684 }
685
686 {
687 miResultRecord->miResultsList.push_back(result3);
688 }
689
690 }
691 break;
19
Execution continues on line 653
26
Execution continues on line 653
33
Execution continues on line 653
692
693 default:
694 goto loop2; /* break out of the loop */
695 break;
696 }
697 }
698 loop2: ; /* Jump out to here if this rule does not match */
699
700
701 // GDBMIOutput.g:70:82: ( WS )*
702
703 for (;;)
704 {
705 int alt3=2;
706 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
707 {
708 case WS8:
709 {
710 alt3=1;
711 }
712 break;
713
714 }
715
716 switch (alt3)
717 {
718 case 1:
719 // GDBMIOutput.g:70:82: WS
720 {
721 MATCHT(WS, &FOLLOW_WS_in_result_record89)ctx->pParser->rec->match(ctx->pParser->rec, 8,
&FOLLOW_WS_in_result_record89)
;
722 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
723 {
724 goto ruleresult_recordEx;
725 }
726
727
728 }
729 break;
730
731 default:
732 goto loop3; /* break out of the loop */
733 break;
734 }
735 }
736 loop3: ; /* Jump out to here if this rule does not match */
737
738
739 // GDBMIOutput.g:70:86: ( NL )?
740 {
741 int alt4=2;
742 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
743 {
744 case NL9:
745 {
746 alt4=1;
747 }
748 break;
749 }
750
751 switch (alt4)
752 {
753 case 1:
754 // GDBMIOutput.g:70:86: NL
755 {
756 MATCHT(NL, &FOLLOW_NL_in_result_record92)ctx->pParser->rec->match(ctx->pParser->rec, 9,
&FOLLOW_NL_in_result_record92)
;
757 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
758 {
759 goto ruleresult_recordEx;
760 }
761
762
763 }
764 break;
765
766 }
767 }
768
769 }
770
771 }
772
773
774 // This is where rules clean up and exit
775 //
776 goto ruleresult_recordEx; /* Prevent compiler warnings */
777 ruleresult_recordEx: ;
778
779 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
780 {
781 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
782 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
783 }
784
785
786 return miResultRecord;
787}
788/* $ANTLR end result_record */
789
790/**
791 * $ANTLR start output
792 * GDBMIOutput.g:73:1: output returns [GDBMIResponse* miResponse] : ( out_of_band_record )* ( result_record )? ( WS )* ( NL )? ;
793 */
794static GDBMIResponse*
795output(pGDBMIOutputParser ctx)
796{
797 GDBMIResponse* miResponse = NULL__null;
798
799 GDBMIOutOfBandRecord* out_of_band_record4;
800 #undef RETURN_TYPE_out_of_band_record4GDBMIOutOfBandRecord*
801 #define RETURN_TYPE_out_of_band_record4GDBMIOutOfBandRecord* GDBMIOutOfBandRecord*
802
803 GDBMIResultRecord* result_record5;
804 #undef RETURN_TYPE_result_record5GDBMIResultRecord*
805 #define RETURN_TYPE_result_record5GDBMIResultRecord* GDBMIResultRecord*
806
807 /* Initialize rule variables
808 */
809
810
811
812 miResponse = new GDBMIResponse;
813
814 out_of_band_record4 = NULL__null;
815 result_record5 = NULL__null;
816
817 {
818 // GDBMIOutput.g:77:3: ( ( out_of_band_record )* ( result_record )? ( WS )* ( NL )? )
819 // GDBMIOutput.g:77:5: ( out_of_band_record )* ( result_record )? ( WS )* ( NL )?
820 {
821
822 // GDBMIOutput.g:77:5: ( out_of_band_record )*
823
824 for (;;)
1
Loop condition is true. Entering loop body
825 {
826 int alt5=2;
827 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2
'Default' branch taken. Execution continues on line 858
828 {
829 case TOKEN4:
830 {
831 switch ( LA(2)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 2)
)
832 {
833 case EXEC10:
834 case STATUS11:
835 case NOTIFY12:
836 {
837 alt5=1;
838 }
839 break;
840
841 }
842
843 }
844 break;
845 case EXEC10:
846 case STATUS11:
847 case NOTIFY12:
848 case CONSOLE15:
849 case TARGET16:
850 case LOG17:
851 {
852 alt5=1;
853 }
854 break;
855
856 }
857
858 switch (alt5)
3
Control jumps to the 'default' case at line 879
859 {
860 case 1:
861 // GDBMIOutput.g:77:6: out_of_band_record
862 {
863 FOLLOWPUSH(FOLLOW_out_of_band_record_in_output118)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_out_of_band_record_in_output118
))), __null)
;
864 out_of_band_record4=out_of_band_record(ctx);
865
866 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
867 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
868 {
869 goto ruleoutputEx;
870 }
871
872 {
873 miResponse->type = GDBMIResponse::OutOfBandRecordResponse; miResponse->miOutOfBandRecordList.push_back(out_of_band_record4);
874 }
875
876 }
877 break;
878
879 default:
880 goto loop5; /* break out of the loop */
4
Control jumps to line 889
881 break;
882 }
883 }
884 loop5: ; /* Jump out to here if this rule does not match */
885
886
887 // GDBMIOutput.g:78:5: ( result_record )?
888 {
889 int alt6=2;
890 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
5
Control jumps to 'case 4:' at line 892
891 {
892 case TOKEN4:
893 case RESULT5:
894 {
895 alt6=1;
896 }
897 break;
6
Execution continues on line 900
898 }
899
900 switch (alt6)
7
Control jumps to 'case 1:' at line 902
901 {
902 case 1:
903 // GDBMIOutput.g:78:6: result_record
904 {
905 FOLLOWPUSH(FOLLOW_result_record_in_output129)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_record_in_output129
))), __null)
;
906 result_record5=result_record(ctx);
8
Calling 'result_record'
907
908 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
909 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
910 {
911 goto ruleoutputEx;
912 }
913
914 {
915 miResponse->type = GDBMIResponse::ResultRecordResponse; miResponse->miResultRecord = result_record5;
916 }
917
918 }
919 break;
920
921 }
922 }
923
924 // GDBMIOutput.g:78:140: ( WS )*
925
926 for (;;)
927 {
928 int alt7=2;
929 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
930 {
931 case WS8:
932 {
933 alt7=1;
934 }
935 break;
936
937 }
938
939 switch (alt7)
940 {
941 case 1:
942 // GDBMIOutput.g:78:140: WS
943 {
944 MATCHT(WS, &FOLLOW_WS_in_output135)ctx->pParser->rec->match(ctx->pParser->rec, 8,
&FOLLOW_WS_in_output135)
;
945 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
946 {
947 goto ruleoutputEx;
948 }
949
950
951 }
952 break;
953
954 default:
955 goto loop7; /* break out of the loop */
956 break;
957 }
958 }
959 loop7: ; /* Jump out to here if this rule does not match */
960
961
962 // GDBMIOutput.g:78:144: ( NL )?
963 {
964 int alt8=2;
965 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
966 {
967 case NL9:
968 {
969 alt8=1;
970 }
971 break;
972 }
973
974 switch (alt8)
975 {
976 case 1:
977 // GDBMIOutput.g:78:144: NL
978 {
979 MATCHT(NL, &FOLLOW_NL_in_output138)ctx->pParser->rec->match(ctx->pParser->rec, 9,
&FOLLOW_NL_in_output138)
;
980 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
981 {
982 goto ruleoutputEx;
983 }
984
985
986 }
987 break;
988
989 }
990 }
991
992 }
993
994 }
995
996
997 // This is where rules clean up and exit
998 //
999 goto ruleoutputEx; /* Prevent compiler warnings */
1000 ruleoutputEx: ;
1001
1002 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1003 {
1004 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1005 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1006 }
1007
1008
1009 return miResponse;
1010}
1011/* $ANTLR end output */
1012
1013/**
1014 * $ANTLR start out_of_band_record
1015 * GDBMIOutput.g:81:1: out_of_band_record returns [GDBMIOutOfBandRecord* miOutOfBandRecord] : ( async_record | stream_record );
1016 */
1017static GDBMIOutOfBandRecord*
1018out_of_band_record(pGDBMIOutputParser ctx)
1019{
1020 GDBMIOutOfBandRecord* miOutOfBandRecord = NULL__null;
1021
1022 GDBMIResultRecord* async_record6;
1023 #undef RETURN_TYPE_async_record6GDBMIResultRecord*
1024 #define RETURN_TYPE_async_record6GDBMIResultRecord* GDBMIResultRecord*
1025
1026 GDBMIStreamRecord * stream_record7;
1027 #undef RETURN_TYPE_stream_record7GDBMIStreamRecord *
1028 #define RETURN_TYPE_stream_record7GDBMIStreamRecord * GDBMIStreamRecord *
1029
1030 /* Initialize rule variables
1031 */
1032
1033
1034
1035 miOutOfBandRecord = new GDBMIOutOfBandRecord;
1036
1037 async_record6 = NULL__null;
1038 stream_record7 = NULL__null;
1039
1040 {
1041 {
1042 // GDBMIOutput.g:85:3: ( async_record | stream_record )
1043
1044 ANTLR3_UINT32 alt9;
1045
1046 alt9=2;
1047
1048 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1049 {
1050 case TOKEN4:
1051 case EXEC10:
1052 case STATUS11:
1053 case NOTIFY12:
1054 {
1055 alt9=1;
1056 }
1057 break;
1058 case CONSOLE15:
1059 case TARGET16:
1060 case LOG17:
1061 {
1062 alt9=2;
1063 }
1064 break;
1065
1066 default:
1067 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
1068 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
1069 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
1070 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 9;
1071 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
1072
1073
1074 goto ruleout_of_band_recordEx;
1075 }
1076
1077 switch (alt9)
1078 {
1079 case 1:
1080 // GDBMIOutput.g:85:5: async_record
1081 {
1082 FOLLOWPUSH(FOLLOW_async_record_in_out_of_band_record163)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_async_record_in_out_of_band_record163
))), __null)
;
1083 async_record6=async_record(ctx);
1084
1085 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1086 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1087 {
1088 goto ruleout_of_band_recordEx;
1089 }
1090
1091 {
1092 miOutOfBandRecord->type = GDBMIOutOfBandRecord::AsyncRecord; miOutOfBandRecord->miResultRecord = async_record6;
1093 }
1094
1095 }
1096 break;
1097 case 2:
1098 // GDBMIOutput.g:86:5: stream_record
1099 {
1100 FOLLOWPUSH(FOLLOW_stream_record_in_out_of_band_record171)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_stream_record_in_out_of_band_record171
))), __null)
;
1101 stream_record7=stream_record(ctx);
1102
1103 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1104 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1105 {
1106 goto ruleout_of_band_recordEx;
1107 }
1108
1109 {
1110 miOutOfBandRecord->type = GDBMIOutOfBandRecord::StreamRecord; miOutOfBandRecord->miStreamRecord = stream_record7;
1111 }
1112
1113 }
1114 break;
1115
1116 }
1117 }
1118 }
1119
1120
1121 // This is where rules clean up and exit
1122 //
1123 goto ruleout_of_band_recordEx; /* Prevent compiler warnings */
1124 ruleout_of_band_recordEx: ;
1125
1126 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1127 {
1128 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1129 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1130 }
1131
1132
1133 return miOutOfBandRecord;
1134}
1135/* $ANTLR end out_of_band_record */
1136
1137/**
1138 * $ANTLR start async_record
1139 * GDBMIOutput.g:89:1: async_record returns [GDBMIResultRecord* miResultRecord] : ( exec_async_output | status_async_output | notify_async_output );
1140 */
1141static GDBMIResultRecord*
1142async_record(pGDBMIOutputParser ctx)
1143{
1144 GDBMIResultRecord* miResultRecord = NULL__null;
1145
1146 GDBMIResultRecord* exec_async_output8;
1147 #undef RETURN_TYPE_exec_async_output8GDBMIResultRecord*
1148 #define RETURN_TYPE_exec_async_output8GDBMIResultRecord* GDBMIResultRecord*
1149
1150 GDBMIResultRecord* status_async_output9;
1151 #undef RETURN_TYPE_status_async_output9GDBMIResultRecord*
1152 #define RETURN_TYPE_status_async_output9GDBMIResultRecord* GDBMIResultRecord*
1153
1154 GDBMIResultRecord* notify_async_output10;
1155 #undef RETURN_TYPE_notify_async_output10GDBMIResultRecord*
1156 #define RETURN_TYPE_notify_async_output10GDBMIResultRecord* GDBMIResultRecord*
1157
1158 /* Initialize rule variables
1159 */
1160
1161
1162 exec_async_output8 = NULL__null;
1163 status_async_output9 = NULL__null;
1164 notify_async_output10 = NULL__null;
1165
1166 {
1167 {
1168 // GDBMIOutput.g:90:3: ( exec_async_output | status_async_output | notify_async_output )
1169
1170 ANTLR3_UINT32 alt10;
1171
1172 alt10=3;
1173
1174 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1175 {
1176 case TOKEN4:
1177 {
1178 switch ( LA(2)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 2)
)
1179 {
1180 case NOTIFY12:
1181 {
1182 alt10=3;
1183 }
1184 break;
1185 case EXEC10:
1186 {
1187 alt10=1;
1188 }
1189 break;
1190 case STATUS11:
1191 {
1192 alt10=2;
1193 }
1194 break;
1195
1196 default:
1197 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
1198 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
1199 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
1200 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 10;
1201 EXCEPTIONctx->pParser->rec->state->exception->state = 1;
1202
1203
1204 goto ruleasync_recordEx;
1205 }
1206
1207 }
1208 break;
1209 case EXEC10:
1210 {
1211 alt10=1;
1212 }
1213 break;
1214 case STATUS11:
1215 {
1216 alt10=2;
1217 }
1218 break;
1219 case NOTIFY12:
1220 {
1221 alt10=3;
1222 }
1223 break;
1224
1225 default:
1226 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
1227 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
1228 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
1229 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 10;
1230 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
1231
1232
1233 goto ruleasync_recordEx;
1234 }
1235
1236 switch (alt10)
1237 {
1238 case 1:
1239 // GDBMIOutput.g:90:5: exec_async_output
1240 {
1241 FOLLOWPUSH(FOLLOW_exec_async_output_in_async_record190)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_exec_async_output_in_async_record190
))), __null)
;
1242 exec_async_output8=exec_async_output(ctx);
1243
1244 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1245 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1246 {
1247 goto ruleasync_recordEx;
1248 }
1249
1250 {
1251 miResultRecord = exec_async_output8;
1252 }
1253
1254 }
1255 break;
1256 case 2:
1257 // GDBMIOutput.g:91:5: status_async_output
1258 {
1259 FOLLOWPUSH(FOLLOW_status_async_output_in_async_record198)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_status_async_output_in_async_record198
))), __null)
;
1260 status_async_output9=status_async_output(ctx);
1261
1262 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1263 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1264 {
1265 goto ruleasync_recordEx;
1266 }
1267
1268 {
1269 miResultRecord = status_async_output9;
1270 }
1271
1272 }
1273 break;
1274 case 3:
1275 // GDBMIOutput.g:92:5: notify_async_output
1276 {
1277 FOLLOWPUSH(FOLLOW_notify_async_output_in_async_record206)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_notify_async_output_in_async_record206
))), __null)
;
1278 notify_async_output10=notify_async_output(ctx);
1279
1280 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1281 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1282 {
1283 goto ruleasync_recordEx;
1284 }
1285
1286 {
1287 miResultRecord = notify_async_output10;
1288 }
1289
1290 }
1291 break;
1292
1293 }
1294 }
1295 }
1296
1297
1298 // This is where rules clean up and exit
1299 //
1300 goto ruleasync_recordEx; /* Prevent compiler warnings */
1301 ruleasync_recordEx: ;
1302
1303 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1304 {
1305 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1306 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1307 }
1308
1309
1310 return miResultRecord;
1311}
1312/* $ANTLR end async_record */
1313
1314/**
1315 * $ANTLR start exec_async_output
1316 * GDBMIOutput.g:95:1: exec_async_output returns [GDBMIResultRecord* miResultRecord] : ( TOKEN )? EXEC async_output ;
1317 */
1318static GDBMIResultRecord*
1319exec_async_output(pGDBMIOutputParser ctx)
1320{
1321 GDBMIResultRecord* miResultRecord = NULL__null;
1322
1323 pANTLR3_COMMON_TOKEN TOKEN11;
1324 GDBMIResultRecord* async_output12;
1325 #undef RETURN_TYPE_async_output12GDBMIResultRecord*
1326 #define RETURN_TYPE_async_output12GDBMIResultRecord* GDBMIResultRecord*
1327
1328 /* Initialize rule variables
1329 */
1330
1331
1332 TOKEN11 = NULL__null;
1333 async_output12 = NULL__null;
1334
1335 {
1336 // GDBMIOutput.g:96:3: ( ( TOKEN )? EXEC async_output )
1337 // GDBMIOutput.g:96:5: ( TOKEN )? EXEC async_output
1338 {
1339
1340 // GDBMIOutput.g:96:5: ( TOKEN )?
1341 {
1342 int alt11=2;
1343 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1344 {
1345 case TOKEN4:
1346 {
1347 alt11=1;
1348 }
1349 break;
1350 }
1351
1352 switch (alt11)
1353 {
1354 case 1:
1355 // GDBMIOutput.g:96:6: TOKEN
1356 {
1357 TOKEN11 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN, &FOLLOW_TOKEN_in_exec_async_output226)ctx->pParser->rec->match(ctx->pParser->rec, 4,
&FOLLOW_TOKEN_in_exec_async_output226)
;
1358 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1359 {
1360 goto ruleexec_async_outputEx;
1361 }
1362
1363 {
1364 miResultRecord->token = atoi((char*)(TOKEN11->getText(TOKEN11))->chars);
1365 }
1366
1367 }
1368 break;
1369
1370 }
1371 }
1372 MATCHT(EXEC, &FOLLOW_EXEC_in_exec_async_output232)ctx->pParser->rec->match(ctx->pParser->rec, 10
, &FOLLOW_EXEC_in_exec_async_output232)
;
1373 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1374 {
1375 goto ruleexec_async_outputEx;
1376 }
1377
1378 FOLLOWPUSH(FOLLOW_async_output_in_exec_async_output234)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_async_output_in_exec_async_output234
))), __null)
;
1379 async_output12=async_output(ctx);
1380
1381 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1382 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1383 {
1384 goto ruleexec_async_outputEx;
1385 }
1386
1387 {
1388 miResultRecord = async_output12;
1389 }
1390
1391 }
1392
1393 }
1394
1395
1396 // This is where rules clean up and exit
1397 //
1398 goto ruleexec_async_outputEx; /* Prevent compiler warnings */
1399 ruleexec_async_outputEx: ;
1400
1401 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1402 {
1403 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1404 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1405 }
1406
1407
1408 return miResultRecord;
1409}
1410/* $ANTLR end exec_async_output */
1411
1412/**
1413 * $ANTLR start status_async_output
1414 * GDBMIOutput.g:99:1: status_async_output returns [GDBMIResultRecord* miResultRecord] : ( TOKEN )? STATUS async_output ;
1415 */
1416static GDBMIResultRecord*
1417status_async_output(pGDBMIOutputParser ctx)
1418{
1419 GDBMIResultRecord* miResultRecord = NULL__null;
1420
1421 pANTLR3_COMMON_TOKEN TOKEN13;
1422 GDBMIResultRecord* async_output14;
1423 #undef RETURN_TYPE_async_output14GDBMIResultRecord*
1424 #define RETURN_TYPE_async_output14GDBMIResultRecord* GDBMIResultRecord*
1425
1426 /* Initialize rule variables
1427 */
1428
1429
1430 TOKEN13 = NULL__null;
1431 async_output14 = NULL__null;
1432
1433 {
1434 // GDBMIOutput.g:100:3: ( ( TOKEN )? STATUS async_output )
1435 // GDBMIOutput.g:100:5: ( TOKEN )? STATUS async_output
1436 {
1437
1438 // GDBMIOutput.g:100:5: ( TOKEN )?
1439 {
1440 int alt12=2;
1441 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1442 {
1443 case TOKEN4:
1444 {
1445 alt12=1;
1446 }
1447 break;
1448 }
1449
1450 switch (alt12)
1451 {
1452 case 1:
1453 // GDBMIOutput.g:100:6: TOKEN
1454 {
1455 TOKEN13 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN, &FOLLOW_TOKEN_in_status_async_output254)ctx->pParser->rec->match(ctx->pParser->rec, 4,
&FOLLOW_TOKEN_in_status_async_output254)
;
1456 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1457 {
1458 goto rulestatus_async_outputEx;
1459 }
1460
1461 {
1462 miResultRecord->token = atoi((char*)(TOKEN13->getText(TOKEN13))->chars);
1463 }
1464
1465 }
1466 break;
1467
1468 }
1469 }
1470 MATCHT(STATUS, &FOLLOW_STATUS_in_status_async_output260)ctx->pParser->rec->match(ctx->pParser->rec, 11
, &FOLLOW_STATUS_in_status_async_output260)
;
1471 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1472 {
1473 goto rulestatus_async_outputEx;
1474 }
1475
1476 FOLLOWPUSH(FOLLOW_async_output_in_status_async_output262)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_async_output_in_status_async_output262
))), __null)
;
1477 async_output14=async_output(ctx);
1478
1479 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1480 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1481 {
1482 goto rulestatus_async_outputEx;
1483 }
1484
1485 {
1486 miResultRecord = async_output14;
1487 }
1488
1489 }
1490
1491 }
1492
1493
1494 // This is where rules clean up and exit
1495 //
1496 goto rulestatus_async_outputEx; /* Prevent compiler warnings */
1497 rulestatus_async_outputEx: ;
1498
1499 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1500 {
1501 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1502 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1503 }
1504
1505
1506 return miResultRecord;
1507}
1508/* $ANTLR end status_async_output */
1509
1510/**
1511 * $ANTLR start notify_async_output
1512 * GDBMIOutput.g:103:1: notify_async_output returns [GDBMIResultRecord* miResultRecord] : ( TOKEN )? NOTIFY async_output ;
1513 */
1514static GDBMIResultRecord*
1515notify_async_output(pGDBMIOutputParser ctx)
1516{
1517 GDBMIResultRecord* miResultRecord = NULL__null;
1518
1519 pANTLR3_COMMON_TOKEN TOKEN15;
1520 GDBMIResultRecord* async_output16;
1521 #undef RETURN_TYPE_async_output16GDBMIResultRecord*
1522 #define RETURN_TYPE_async_output16GDBMIResultRecord* GDBMIResultRecord*
1523
1524 /* Initialize rule variables
1525 */
1526
1527
1528 TOKEN15 = NULL__null;
1529 async_output16 = NULL__null;
1530
1531 {
1532 // GDBMIOutput.g:104:3: ( ( TOKEN )? NOTIFY async_output )
1533 // GDBMIOutput.g:104:5: ( TOKEN )? NOTIFY async_output
1534 {
1535
1536 // GDBMIOutput.g:104:5: ( TOKEN )?
1537 {
1538 int alt13=2;
1539 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1540 {
1541 case TOKEN4:
1542 {
1543 alt13=1;
1544 }
1545 break;
1546 }
1547
1548 switch (alt13)
1549 {
1550 case 1:
1551 // GDBMIOutput.g:104:6: TOKEN
1552 {
1553 TOKEN15 = (pANTLR3_COMMON_TOKEN) MATCHT(TOKEN, &FOLLOW_TOKEN_in_notify_async_output282)ctx->pParser->rec->match(ctx->pParser->rec, 4,
&FOLLOW_TOKEN_in_notify_async_output282)
;
1554 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1555 {
1556 goto rulenotify_async_outputEx;
1557 }
1558
1559 {
1560 miResultRecord->token = atoi((char*)(TOKEN15->getText(TOKEN15))->chars);
1561 }
1562
1563 }
1564 break;
1565
1566 }
1567 }
1568 MATCHT(NOTIFY, &FOLLOW_NOTIFY_in_notify_async_output288)ctx->pParser->rec->match(ctx->pParser->rec, 12
, &FOLLOW_NOTIFY_in_notify_async_output288)
;
1569 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1570 {
1571 goto rulenotify_async_outputEx;
1572 }
1573
1574 FOLLOWPUSH(FOLLOW_async_output_in_notify_async_output290)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_async_output_in_notify_async_output290
))), __null)
;
1575 async_output16=async_output(ctx);
1576
1577 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1578 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1579 {
1580 goto rulenotify_async_outputEx;
1581 }
1582
1583 {
1584 miResultRecord = async_output16;
1585 }
1586
1587 }
1588
1589 }
1590
1591
1592 // This is where rules clean up and exit
1593 //
1594 goto rulenotify_async_outputEx; /* Prevent compiler warnings */
1595 rulenotify_async_outputEx: ;
1596
1597 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1598 {
1599 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1600 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1601 }
1602
1603
1604 return miResultRecord;
1605}
1606/* $ANTLR end notify_async_output */
1607
1608/**
1609 * $ANTLR start async_output
1610 * GDBMIOutput.g:107:1: async_output returns [GDBMIResultRecord* miResultRecord] : ( RESULT_CLASS ) ( COMMA result )* ( NL )? ;
1611 */
1612static GDBMIResultRecord*
1613async_output(pGDBMIOutputParser ctx)
1614{
1615 GDBMIResultRecord* miResultRecord = NULL__null;
1616
1617 pANTLR3_COMMON_TOKEN RESULT_CLASS17;
1618 GDBMIResult* result18;
1619 #undef RETURN_TYPE_result18GDBMIResult*
1620 #define RETURN_TYPE_result18GDBMIResult* GDBMIResult*
1621
1622 /* Initialize rule variables
1623 */
1624
1625
1626
1627 miResultRecord = new GDBMIResultRecord;
1628
1629 RESULT_CLASS17 = NULL__null;
1630 result18 = NULL__null;
1631
1632 {
1633 // GDBMIOutput.g:111:3: ( ( RESULT_CLASS ) ( COMMA result )* ( NL )? )
1634 // GDBMIOutput.g:111:5: ( RESULT_CLASS ) ( COMMA result )* ( NL )?
1635 {
1636 // GDBMIOutput.g:111:5: ( RESULT_CLASS )
1637 // GDBMIOutput.g:111:6: RESULT_CLASS
1638 {
1639 RESULT_CLASS17 = (pANTLR3_COMMON_TOKEN) MATCHT(RESULT_CLASS, &FOLLOW_RESULT_CLASS_in_async_output317)ctx->pParser->rec->match(ctx->pParser->rec, 6,
&FOLLOW_RESULT_CLASS_in_async_output317)
;
1640 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1641 {
1642 goto ruleasync_outputEx;
1643 }
1644
1645 {
1646 miResultRecord->cls = (char*)(RESULT_CLASS17->getText(RESULT_CLASS17))->chars;
1647 }
1648
1649 }
1650
1651
1652 // GDBMIOutput.g:112:5: ( COMMA result )*
1653
1654 for (;;)
1655 {
1656 int alt14=2;
1657 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1658 {
1659 case COMMA7:
1660 {
1661 alt14=1;
1662 }
1663 break;
1664
1665 }
1666
1667 switch (alt14)
1668 {
1669 case 1:
1670 // GDBMIOutput.g:112:6: COMMA result
1671 {
1672 MATCHT(COMMA, &FOLLOW_COMMA_in_async_output327)ctx->pParser->rec->match(ctx->pParser->rec, 7,
&FOLLOW_COMMA_in_async_output327)
;
1673 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1674 {
1675 goto ruleasync_outputEx;
1676 }
1677
1678 FOLLOWPUSH(FOLLOW_result_in_async_output329)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_async_output329
))), __null)
;
1679 result18=result(ctx);
1680
1681 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1682 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1683 {
1684 goto ruleasync_outputEx;
1685 }
1686
1687 {
1688 miResultRecord->miResultsList.push_back(result18);
1689 }
1690
1691 }
1692 break;
1693
1694 default:
1695 goto loop14; /* break out of the loop */
1696 break;
1697 }
1698 }
1699 loop14: ; /* Jump out to here if this rule does not match */
1700
1701
1702 // GDBMIOutput.g:112:82: ( NL )?
1703 {
1704 int alt15=2;
1705 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
1706 {
1707 case NL9:
1708 {
1709 alt15=1;
1710 }
1711 break;
1712 }
1713
1714 switch (alt15)
1715 {
1716 case 1:
1717 // GDBMIOutput.g:112:82: NL
1718 {
1719 MATCHT(NL, &FOLLOW_NL_in_async_output335)ctx->pParser->rec->match(ctx->pParser->rec, 9,
&FOLLOW_NL_in_async_output335)
;
1720 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1721 {
1722 goto ruleasync_outputEx;
1723 }
1724
1725
1726 }
1727 break;
1728
1729 }
1730 }
1731
1732 }
1733
1734 }
1735
1736
1737 // This is where rules clean up and exit
1738 //
1739 goto ruleasync_outputEx; /* Prevent compiler warnings */
1740 ruleasync_outputEx: ;
1741
1742 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1743 {
1744 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1745 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1746 }
1747
1748
1749 return miResultRecord;
1750}
1751/* $ANTLR end async_output */
1752
1753/**
1754 * $ANTLR start var
1755 * GDBMIOutput.g:115:1: var returns [string txt] : STRING ;
1756 */
1757static GDBMIOutputParser_var_return
1758var(pGDBMIOutputParser ctx)
1759{
1760 GDBMIOutputParser_var_return retval;
1761
1762 pANTLR3_COMMON_TOKEN STRING19;
1763
1764 /* Initialize rule variables
1765 */
1766
1767
1768
1769 string txt;
1770
1771 STRING19 = NULL__null;
1772 retval.start = LT(1)ctx->pParser->tstream->_LT(ctx->pParser->tstream
, 1)
; retval.stop = retval.start;
1773
1774 {
1775 // GDBMIOutput.g:119:3: ( STRING )
1776 // GDBMIOutput.g:119:5: STRING
1777 {
1778 STRING19 = (pANTLR3_COMMON_TOKEN) MATCHT(STRING, &FOLLOW_STRING_in_var360)ctx->pParser->rec->match(ctx->pParser->rec, 13
, &FOLLOW_STRING_in_var360)
;
1779 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1780 {
1781 goto rulevarEx;
1782 }
1783
1784 {
1785
1786 txt = (char*)(STRING19->getText(STRING19))->chars;
1787
1788 }
1789
1790 }
1791
1792 }
1793
1794
1795 // This is where rules clean up and exit
1796 //
1797 goto rulevarEx; /* Prevent compiler warnings */
1798 rulevarEx: ;
1799 retval.stop = LT(-1)ctx->pParser->tstream->_LT(ctx->pParser->tstream
, -1)
;
1800
1801 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1802 {
1803 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1804 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1805 }
1806
1807
1808 return retval;
1809}
1810/* $ANTLR end var */
1811
1812/**
1813 * $ANTLR start constant
1814 * GDBMIOutput.g:124:1: constant returns [string txt] : C_STRING ;
1815 */
1816static GDBMIOutputParser_constant_return
1817constant(pGDBMIOutputParser ctx)
1818{
1819 GDBMIOutputParser_constant_return retval;
1820
1821 pANTLR3_COMMON_TOKEN C_STRING20;
1822
1823 /* Initialize rule variables
1824 */
1825
1826
1827
1828 string txt;
1829
1830 C_STRING20 = NULL__null;
1831 retval.start = LT(1)ctx->pParser->tstream->_LT(ctx->pParser->tstream
, 1)
; retval.stop = retval.start;
1832
1833 {
1834 // GDBMIOutput.g:128:3: ( C_STRING )
1835 // GDBMIOutput.g:128:5: C_STRING
1836 {
1837 C_STRING20 = (pANTLR3_COMMON_TOKEN) MATCHT(C_STRING, &FOLLOW_C_STRING_in_constant386)ctx->pParser->rec->match(ctx->pParser->rec, 14
, &FOLLOW_C_STRING_in_constant386)
;
1838 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1839 {
1840 goto ruleconstantEx;
1841 }
1842
1843 {
1844
1845 txt = (char*)(C_STRING20->getText(C_STRING20))->chars;
1846
1847 }
1848
1849 }
1850
1851 }
1852
1853
1854 // This is where rules clean up and exit
1855 //
1856 goto ruleconstantEx; /* Prevent compiler warnings */
1857 ruleconstantEx: ;
1858 retval.stop = LT(-1)ctx->pParser->tstream->_LT(ctx->pParser->tstream
, -1)
;
1859
1860 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1861 {
1862 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
1863 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
1864 }
1865
1866
1867 return retval;
1868}
1869/* $ANTLR end constant */
1870
1871/**
1872 * $ANTLR start value
1873 * GDBMIOutput.g:133:1: value returns [GDBMIValue* miValue] : ( constant | modelica_tuple | lista );
1874 */
1875static GDBMIValue*
1876value(pGDBMIOutputParser ctx)
1877{
1878 GDBMIValue* miValue = NULL__null;
1879
1880 GDBMIOutputParser_constant_return constant21;
1881 #undef RETURN_TYPE_constant21GDBMIOutputParser_constant_return
1882 #define RETURN_TYPE_constant21GDBMIOutputParser_constant_return GDBMIOutputParser_constant_return
1883
1884 GDBMITuple* modelica_tuple22;
1885 #undef RETURN_TYPE_modelica_tuple22GDBMITuple*
1886 #define RETURN_TYPE_modelica_tuple22GDBMITuple* GDBMITuple*
1887
1888 GDBMIList* lista23;
1889 #undef RETURN_TYPE_lista23GDBMIList*
1890 #define RETURN_TYPE_lista23GDBMIList* GDBMIList*
1891
1892 /* Initialize rule variables
1893 */
1894
1895
1896
1897 miValue = new GDBMIValue;
1898
1899 modelica_tuple22 = NULL__null;
1900 lista23 = NULL__null;
1901
1902 {
1903 {
1904 // GDBMIOutput.g:137:3: ( constant | modelica_tuple | lista )
1905
1906 ANTLR3_UINT32 alt16;
1907
1908 alt16=3;
1909
1910 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
43
Control jumps to 'case 20:' at line 1918
1911 {
1912 case C_STRING14:
1913 {
1914 alt16=1;
1915 }
1916 break;
1917 case 19:
1918 case 20:
1919 {
1920 alt16=2;
1921 }
1922 break;
44
Execution continues on line 1941
1923 case 22:
1924 case 23:
1925 {
1926 alt16=3;
1927 }
1928 break;
1929
1930 default:
1931 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
1932 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
1933 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
1934 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 16;
1935 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
1936
1937
1938 goto rulevalueEx;
1939 }
1940
1941 switch (alt16)
45
Control jumps to 'case 2:' at line 1964
1942 {
1943 case 1:
1944 // GDBMIOutput.g:137:5: constant
1945 {
1946 FOLLOWPUSH(FOLLOW_constant_in_value412)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_constant_in_value412
))), __null)
;
1947 constant21=constant(ctx);
1948
1949 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1950 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1951 {
1952 goto rulevalueEx;
1953 }
1954
1955 {
1956
1957 miValue->type = GDBMIValue::ConstantValue;
1958 miValue->value = (char*)(STRSTREAMctx->pParser->tstream->toStringTT(STRSTREAMctx->pParser->tstream, constant21.start, constant21.stop))->chars;
1959
1960 }
1961
1962 }
1963 break;
1964 case 2:
1965 // GDBMIOutput.g:141:7: modelica_tuple
1966 {
1967 FOLLOWPUSH(FOLLOW_modelica_tuple_in_value422)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_modelica_tuple_in_value422
))), __null)
;
1968 modelica_tuple22=modelica_tuple(ctx);
46
Calling 'modelica_tuple'
54
Returned allocated memory
1969
1970 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1971 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
55
Taking true branch
1972 {
1973 goto rulevalueEx;
56
Control jumps to line 2017
1974 }
1975
1976 {
1977
1978 miValue->type = GDBMIValue::TupleValue;
1979 miValue->miTuple = modelica_tuple22;
1980
1981 }
1982
1983 }
1984 break;
1985 case 3:
1986 // GDBMIOutput.g:145:7: lista
1987 {
1988 FOLLOWPUSH(FOLLOW_lista_in_value432)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_lista_in_value432
))), __null)
;
1989 lista23=lista(ctx);
1990
1991 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
1992 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
1993 {
1994 goto rulevalueEx;
1995 }
1996
1997 {
1998
1999 miValue->type = GDBMIValue::ListValue;
2000 miValue->miList = lista23;
2001
2002 }
2003
2004 }
2005 break;
2006
2007 }
2008 }
2009 }
2010
2011
2012 // This is where rules clean up and exit
2013 //
2014 goto rulevalueEx; /* Prevent compiler warnings */
2015 rulevalueEx: ;
2016
2017 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
57
Within the expansion of the macro 'HASEXCEPTION':
a
Potential leak of memory pointed to by 'modelica_tuple22'
2018 {
2019 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2020 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2021 }
2022
2023
2024 return miValue;
2025}
2026/* $ANTLR end value */
2027
2028/**
2029 * $ANTLR start result
2030 * GDBMIOutput.g:151:1: result returns [GDBMIResult* miResult] : ( var '=' value ) ;
2031 */
2032static GDBMIResult*
2033result(pGDBMIOutputParser ctx)
2034{
2035 GDBMIResult* miResult = NULL__null;
2036
2037 GDBMIOutputParser_var_return var24;
2038 #undef RETURN_TYPE_var24GDBMIOutputParser_var_return
2039 #define RETURN_TYPE_var24GDBMIOutputParser_var_return GDBMIOutputParser_var_return
2040
2041 GDBMIValue* value25;
2042 #undef RETURN_TYPE_value25GDBMIValue*
2043 #define RETURN_TYPE_value25GDBMIValue* GDBMIValue*
2044
2045 /* Initialize rule variables
2046 */
2047
2048
2049
2050 miResult = new GDBMIResult;
2051
2052 value25 = NULL__null;
2053
2054 {
2055 // GDBMIOutput.g:155:3: ( ( var '=' value ) )
2056 // GDBMIOutput.g:155:5: ( var '=' value )
2057 {
2058 // GDBMIOutput.g:155:5: ( var '=' value )
2059 // GDBMIOutput.g:155:6: var '=' value
2060 {
2061 FOLLOWPUSH(FOLLOW_var_in_result459)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_var_in_result459
))), __null)
;
2062 var24=var(ctx);
2063
2064 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2065 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
40
Taking false branch
2066 {
2067 goto ruleresultEx;
2068 }
2069
2070 MATCHT(NOTIFY, &FOLLOW_NOTIFY_in_result461)ctx->pParser->rec->match(ctx->pParser->rec, 12
, &FOLLOW_NOTIFY_in_result461)
;
2071 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
41
Taking false branch
2072 {
2073 goto ruleresultEx;
2074 }
2075
2076 FOLLOWPUSH(FOLLOW_value_in_result463)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_value_in_result463
))), __null)
;
2077 value25=value(ctx);
42
Calling 'value'
2078
2079 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2080 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2081 {
2082 goto ruleresultEx;
2083 }
2084
2085
2086 }
2087
2088 {
2089
2090 miResult->variable = (char*)(STRSTREAMctx->pParser->tstream->toStringTT(STRSTREAMctx->pParser->tstream, var24.start, var24.stop))->chars;
2091 miResult->miValue = value25;
2092
2093 }
2094
2095 }
2096
2097 }
2098
2099
2100 // This is where rules clean up and exit
2101 //
2102 goto ruleresultEx; /* Prevent compiler warnings */
2103 ruleresultEx: ;
2104
2105 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2106 {
2107 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2108 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2109 }
2110
2111
2112 return miResult;
2113}
2114/* $ANTLR end result */
2115
2116/**
2117 * $ANTLR start modelica_tuple
2118 * GDBMIOutput.g:161:1: modelica_tuple returns [GDBMITuple* miTuple] : ( '{}' | '{' a= result ( COMMA b= result )* '}' );
2119 */
2120static GDBMITuple*
2121modelica_tuple(pGDBMIOutputParser ctx)
2122{
2123 GDBMITuple* miTuple = NULL__null;
2124
2125 GDBMIResult* a;
2126 #undef RETURN_TYPE_aGDBMIValue*
2127 #define RETURN_TYPE_aGDBMIValue* GDBMIResult*
2128
2129 GDBMIResult* b;
2130 #undef RETURN_TYPE_bGDBMIValue*
2131 #define RETURN_TYPE_bGDBMIValue* GDBMIResult*
2132
2133 /* Initialize rule variables
2134 */
2135
2136
2137
2138 miTuple = new GDBMITuple;
47
Memory is allocated
2139
2140 a = NULL__null;
2141 b = NULL__null;
2142
2143 {
2144 {
2145 // GDBMIOutput.g:165:3: ( '{}' | '{' a= result ( COMMA b= result )* '}' )
2146
2147 ANTLR3_UINT32 alt18;
2148
2149 alt18=2;
2150
2151 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
48
Control jumps to 'case 20:' at line 2158
2152 {
2153 case 19:
2154 {
2155 alt18=1;
2156 }
2157 break;
2158 case 20:
2159 {
2160 alt18=2;
2161 }
2162 break;
49
Execution continues on line 2175
2163
2164 default:
2165 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
2166 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
2167 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
2168 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 18;
2169 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
2170
2171
2172 goto rulemodelica_tupleEx;
2173 }
2174
2175 switch (alt18)
50
Control jumps to 'case 2:' at line 2189
2176 {
2177 case 1:
2178 // GDBMIOutput.g:165:5: '{}'
2179 {
2180 MATCHT(19, &FOLLOW_19_in_modelica_tuple490)ctx->pParser->rec->match(ctx->pParser->rec, 19
, &FOLLOW_19_in_modelica_tuple490)
;
2181 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2182 {
2183 goto rulemodelica_tupleEx;
2184 }
2185
2186
2187 }
2188 break;
2189 case 2:
2190 // GDBMIOutput.g:166:5: '{' a= result ( COMMA b= result )* '}'
2191 {
2192 MATCHT(20, &FOLLOW_20_in_modelica_tuple496)ctx->pParser->rec->match(ctx->pParser->rec, 20
, &FOLLOW_20_in_modelica_tuple496)
;
2193 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
51
Taking true branch
2194 {
2195 goto rulemodelica_tupleEx;
52
Control jumps to line 2280
2196 }
2197
2198 FOLLOWPUSH(FOLLOW_result_in_modelica_tuple500)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_modelica_tuple500
))), __null)
;
2199 a=result(ctx);
2200
2201 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2202 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2203 {
2204 goto rulemodelica_tupleEx;
2205 }
2206
2207 {
2208 miTuple->miResultsList.push_back(a);
2209 }
2210
2211 // GDBMIOutput.g:166:57: ( COMMA b= result )*
2212
2213 for (;;)
2214 {
2215 int alt17=2;
2216 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2217 {
2218 case COMMA7:
2219 {
2220 alt17=1;
2221 }
2222 break;
2223
2224 }
2225
2226 switch (alt17)
2227 {
2228 case 1:
2229 // GDBMIOutput.g:166:58: COMMA b= result
2230 {
2231 MATCHT(COMMA, &FOLLOW_COMMA_in_modelica_tuple505)ctx->pParser->rec->match(ctx->pParser->rec, 7,
&FOLLOW_COMMA_in_modelica_tuple505)
;
2232 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2233 {
2234 goto rulemodelica_tupleEx;
2235 }
2236
2237 FOLLOWPUSH(FOLLOW_result_in_modelica_tuple509)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_modelica_tuple509
))), __null)
;
2238 b=result(ctx);
2239
2240 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2241 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2242 {
2243 goto rulemodelica_tupleEx;
2244 }
2245
2246 {
2247 miTuple->miResultsList.push_back(b);
2248 }
2249
2250 }
2251 break;
2252
2253 default:
2254 goto loop17; /* break out of the loop */
2255 break;
2256 }
2257 }
2258 loop17: ; /* Jump out to here if this rule does not match */
2259
2260 MATCHT(21, &FOLLOW_21_in_modelica_tuple515)ctx->pParser->rec->match(ctx->pParser->rec, 21
, &FOLLOW_21_in_modelica_tuple515)
;
2261 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2262 {
2263 goto rulemodelica_tupleEx;
2264 }
2265
2266
2267 }
2268 break;
2269
2270 }
2271 }
2272 }
2273
2274
2275 // This is where rules clean up and exit
2276 //
2277 goto rulemodelica_tupleEx; /* Prevent compiler warnings */
2278 rulemodelica_tupleEx: ;
2279
2280 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
53
Taking true branch
2281 {
2282 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2283 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2284 }
2285
2286
2287 return miTuple;
2288}
2289/* $ANTLR end modelica_tuple */
2290
2291/**
2292 * $ANTLR start stream_record
2293 * GDBMIOutput.g:169:1: stream_record returns [GDBMIStreamRecord *miStreamRecord] : ( console_stream_output | target_stream_output | log_stream_output );
2294 */
2295static GDBMIStreamRecord *
2296stream_record(pGDBMIOutputParser ctx)
2297{
2298 GDBMIStreamRecord * miStreamRecord = NULL__null;
2299
2300 char* console_stream_output26;
2301 #undef RETURN_TYPE_console_stream_output26char*
2302 #define RETURN_TYPE_console_stream_output26char* char*
2303
2304 char* target_stream_output27;
2305 #undef RETURN_TYPE_target_stream_output27char*
2306 #define RETURN_TYPE_target_stream_output27char* char*
2307
2308 char* log_stream_output28;
2309 #undef RETURN_TYPE_log_stream_output28char*
2310 #define RETURN_TYPE_log_stream_output28char* char*
2311
2312 /* Initialize rule variables
2313 */
2314
2315
2316
2317 miStreamRecord = new GDBMIStreamRecord;
2318
2319 console_stream_output26 = NULL__null;
2320 target_stream_output27 = NULL__null;
2321 log_stream_output28 = NULL__null;
2322
2323 {
2324 {
2325 // GDBMIOutput.g:173:3: ( console_stream_output | target_stream_output | log_stream_output )
2326
2327 ANTLR3_UINT32 alt19;
2328
2329 alt19=3;
2330
2331 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2332 {
2333 case CONSOLE15:
2334 {
2335 alt19=1;
2336 }
2337 break;
2338 case TARGET16:
2339 {
2340 alt19=2;
2341 }
2342 break;
2343 case LOG17:
2344 {
2345 alt19=3;
2346 }
2347 break;
2348
2349 default:
2350 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
2351 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
2352 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
2353 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 19;
2354 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
2355
2356
2357 goto rulestream_recordEx;
2358 }
2359
2360 switch (alt19)
2361 {
2362 case 1:
2363 // GDBMIOutput.g:173:5: console_stream_output
2364 {
2365 FOLLOWPUSH(FOLLOW_console_stream_output_in_stream_record539)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_console_stream_output_in_stream_record539
))), __null)
;
2366 console_stream_output26=console_stream_output(ctx);
2367
2368 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2369 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2370 {
2371 goto rulestream_recordEx;
2372 }
2373
2374 {
2375 miStreamRecord->type = GDBMIStreamRecord::ConsoleStream; miStreamRecord->value = console_stream_output26;
2376 }
2377
2378 }
2379 break;
2380 case 2:
2381 // GDBMIOutput.g:174:5: target_stream_output
2382 {
2383 FOLLOWPUSH(FOLLOW_target_stream_output_in_stream_record547)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_target_stream_output_in_stream_record547
))), __null)
;
2384 target_stream_output27=target_stream_output(ctx);
2385
2386 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2387 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2388 {
2389 goto rulestream_recordEx;
2390 }
2391
2392 {
2393 miStreamRecord->type = GDBMIStreamRecord::TargetStream; miStreamRecord->value = target_stream_output27;
2394 }
2395
2396 }
2397 break;
2398 case 3:
2399 // GDBMIOutput.g:175:5: log_stream_output
2400 {
2401 FOLLOWPUSH(FOLLOW_log_stream_output_in_stream_record555)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_log_stream_output_in_stream_record555
))), __null)
;
2402 log_stream_output28=log_stream_output(ctx);
2403
2404 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2405 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2406 {
2407 goto rulestream_recordEx;
2408 }
2409
2410 {
2411 miStreamRecord->type = GDBMIStreamRecord::LogStream; miStreamRecord->value = log_stream_output28;
2412 }
2413
2414 }
2415 break;
2416
2417 }
2418 }
2419 }
2420
2421
2422 // This is where rules clean up and exit
2423 //
2424 goto rulestream_recordEx; /* Prevent compiler warnings */
2425 rulestream_recordEx: ;
2426
2427 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2428 {
2429 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2430 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2431 }
2432
2433
2434 return miStreamRecord;
2435}
2436/* $ANTLR end stream_record */
2437
2438/**
2439 * $ANTLR start lista
2440 * GDBMIOutput.g:178:1: lista returns [GDBMIList* miList] : ( '[]' | '[' a= value ( COMMA b= value )* ']' | '[' c= result ( COMMA d= result )* ']' );
2441 */
2442static GDBMIList*
2443lista(pGDBMIOutputParser ctx)
2444{
2445 GDBMIList* miList = NULL__null;
2446
2447 GDBMIValue* a;
2448 #undef RETURN_TYPE_aGDBMIValue*
2449 #define RETURN_TYPE_aGDBMIValue* GDBMIValue*
2450
2451 GDBMIValue* b;
2452 #undef RETURN_TYPE_bGDBMIValue*
2453 #define RETURN_TYPE_bGDBMIValue* GDBMIValue*
2454
2455 GDBMIResult* c;
2456 #undef RETURN_TYPE_cGDBMIResult*
2457 #define RETURN_TYPE_cGDBMIResult* GDBMIResult*
2458
2459 GDBMIResult* d;
2460 #undef RETURN_TYPE_dGDBMIResult*
2461 #define RETURN_TYPE_dGDBMIResult* GDBMIResult*
2462
2463 /* Initialize rule variables
2464 */
2465
2466
2467
2468 miList = new GDBMIList;
2469
2470 a = NULL__null;
2471 b = NULL__null;
2472 c = NULL__null;
2473 d = NULL__null;
2474
2475 {
2476 {
2477 // GDBMIOutput.g:182:3: ( '[]' | '[' a= value ( COMMA b= value )* ']' | '[' c= result ( COMMA d= result )* ']' )
2478
2479 ANTLR3_UINT32 alt22;
2480
2481 alt22=3;
2482
2483 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2484 {
2485 case 22:
2486 {
2487 alt22=1;
2488 }
2489 break;
2490 case 23:
2491 {
2492 switch ( LA(2)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 2)
)
2493 {
2494 case C_STRING14:
2495 case 19:
2496 case 20:
2497 case 22:
2498 case 23:
2499 {
2500 alt22=2;
2501 }
2502 break;
2503 case STRING13:
2504 {
2505 alt22=3;
2506 }
2507 break;
2508
2509 default:
2510 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
2511 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
2512 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
2513 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 22;
2514 EXCEPTIONctx->pParser->rec->state->exception->state = 2;
2515
2516
2517 goto rulelistaEx;
2518 }
2519
2520 }
2521 break;
2522
2523 default:
2524 CONSTRUCTEX()ctx->pParser->rec->exConstruct(ctx->pParser->rec
)
;
2525 EXCEPTIONctx->pParser->rec->state->exception->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION3;
2526 EXCEPTIONctx->pParser->rec->state->exception->message = (void *)"";
2527 EXCEPTIONctx->pParser->rec->state->exception->decisionNum = 22;
2528 EXCEPTIONctx->pParser->rec->state->exception->state = 0;
2529
2530
2531 goto rulelistaEx;
2532 }
2533
2534 switch (alt22)
2535 {
2536 case 1:
2537 // GDBMIOutput.g:182:5: '[]'
2538 {
2539 MATCHT(22, &FOLLOW_22_in_lista581)ctx->pParser->rec->match(ctx->pParser->rec, 22
, &FOLLOW_22_in_lista581)
;
2540 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2541 {
2542 goto rulelistaEx;
2543 }
2544
2545
2546 }
2547 break;
2548 case 2:
2549 // GDBMIOutput.g:183:5: '[' a= value ( COMMA b= value )* ']'
2550 {
2551 MATCHT(23, &FOLLOW_23_in_lista587)ctx->pParser->rec->match(ctx->pParser->rec, 23
, &FOLLOW_23_in_lista587)
;
2552 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2553 {
2554 goto rulelistaEx;
2555 }
2556
2557 FOLLOWPUSH(FOLLOW_value_in_lista591)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_value_in_lista591
))), __null)
;
2558 a=value(ctx);
2559
2560 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2561 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2562 {
2563 goto rulelistaEx;
2564 }
2565
2566 {
2567 miList->type = GDBMIList::ValuesList; miList->miValuesList.push_back(a);
2568 }
2569
2570 // GDBMIOutput.g:183:92: ( COMMA b= value )*
2571
2572 for (;;)
2573 {
2574 int alt20=2;
2575 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2576 {
2577 case COMMA7:
2578 {
2579 alt20=1;
2580 }
2581 break;
2582
2583 }
2584
2585 switch (alt20)
2586 {
2587 case 1:
2588 // GDBMIOutput.g:183:93: COMMA b= value
2589 {
2590 MATCHT(COMMA, &FOLLOW_COMMA_in_lista596)ctx->pParser->rec->match(ctx->pParser->rec, 7,
&FOLLOW_COMMA_in_lista596)
;
2591 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2592 {
2593 goto rulelistaEx;
2594 }
2595
2596 FOLLOWPUSH(FOLLOW_value_in_lista600)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_value_in_lista600
))), __null)
;
2597 b=value(ctx);
2598
2599 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2600 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2601 {
2602 goto rulelistaEx;
2603 }
2604
2605 {
2606 miList->miValuesList.push_back(b);
2607 }
2608
2609 }
2610 break;
2611
2612 default:
2613 goto loop20; /* break out of the loop */
2614 break;
2615 }
2616 }
2617 loop20: ; /* Jump out to here if this rule does not match */
2618
2619 MATCHT(24, &FOLLOW_24_in_lista606)ctx->pParser->rec->match(ctx->pParser->rec, 24
, &FOLLOW_24_in_lista606)
;
2620 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2621 {
2622 goto rulelistaEx;
2623 }
2624
2625
2626 }
2627 break;
2628 case 3:
2629 // GDBMIOutput.g:184:5: '[' c= result ( COMMA d= result )* ']'
2630 {
2631 MATCHT(23, &FOLLOW_23_in_lista612)ctx->pParser->rec->match(ctx->pParser->rec, 23
, &FOLLOW_23_in_lista612)
;
2632 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2633 {
2634 goto rulelistaEx;
2635 }
2636
2637 FOLLOWPUSH(FOLLOW_result_in_lista616)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_lista616
))), __null)
;
2638 c=result(ctx);
2639
2640 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2641 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2642 {
2643 goto rulelistaEx;
2644 }
2645
2646 {
2647 miList->type = GDBMIList::ResultsList; miList->miResultsList.push_back(c);
2648 }
2649
2650 // GDBMIOutput.g:184:95: ( COMMA d= result )*
2651
2652 for (;;)
2653 {
2654 int alt21=2;
2655 switch ( LA(1)ctx->pParser->tstream->istream->_LA(ctx->pParser
->tstream->istream, 1)
)
2656 {
2657 case COMMA7:
2658 {
2659 alt21=1;
2660 }
2661 break;
2662
2663 }
2664
2665 switch (alt21)
2666 {
2667 case 1:
2668 // GDBMIOutput.g:184:96: COMMA d= result
2669 {
2670 MATCHT(COMMA, &FOLLOW_COMMA_in_lista621)ctx->pParser->rec->match(ctx->pParser->rec, 7,
&FOLLOW_COMMA_in_lista621)
;
2671 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2672 {
2673 goto rulelistaEx;
2674 }
2675
2676 FOLLOWPUSH(FOLLOW_result_in_lista625)ctx->pParser->rec->state->following->push(ctx->
pParser->rec->state->following, ((void *)(&(FOLLOW_result_in_lista625
))), __null)
;
2677 d=result(ctx);
2678
2679 FOLLOWPOP()ctx->pParser->rec->state->following->pop(ctx->
pParser->rec->state->following)
;
2680 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2681 {
2682 goto rulelistaEx;
2683 }
2684
2685 {
2686 miList->miResultsList.push_back(d);
2687 }
2688
2689 }
2690 break;
2691
2692 default:
2693 goto loop21; /* break out of the loop */
2694 break;
2695 }
2696 }
2697 loop21: ; /* Jump out to here if this rule does not match */
2698
2699 MATCHT(24, &FOLLOW_24_in_lista631)ctx->pParser->rec->match(ctx->pParser->rec, 24
, &FOLLOW_24_in_lista631)
;
2700 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2701 {
2702 goto rulelistaEx;
2703 }
2704
2705
2706 }
2707 break;
2708
2709 }
2710 }
2711 }
2712
2713
2714 // This is where rules clean up and exit
2715 //
2716 goto rulelistaEx; /* Prevent compiler warnings */
2717 rulelistaEx: ;
2718
2719 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2720 {
2721 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2722 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2723 }
2724
2725
2726 return miList;
2727}
2728/* $ANTLR end lista */
2729
2730/**
2731 * $ANTLR start console_stream_output
2732 * GDBMIOutput.g:187:1: console_stream_output returns [char* txt] : CONSOLE C_STRING ;
2733 */
2734static char*
2735console_stream_output(pGDBMIOutputParser ctx)
2736{
2737 char* txt = NULL__null;
2738
2739 pANTLR3_COMMON_TOKEN C_STRING29;
2740
2741 /* Initialize rule variables
2742 */
2743
2744
2745 C_STRING29 = NULL__null;
2746
2747 {
2748 // GDBMIOutput.g:188:3: ( CONSOLE C_STRING )
2749 // GDBMIOutput.g:188:5: CONSOLE C_STRING
2750 {
2751 MATCHT(CONSOLE, &FOLLOW_CONSOLE_in_console_stream_output648)ctx->pParser->rec->match(ctx->pParser->rec, 15
, &FOLLOW_CONSOLE_in_console_stream_output648)
;
2752 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2753 {
2754 goto ruleconsole_stream_outputEx;
2755 }
2756
2757 C_STRING29 = (pANTLR3_COMMON_TOKEN) MATCHT(C_STRING, &FOLLOW_C_STRING_in_console_stream_output650)ctx->pParser->rec->match(ctx->pParser->rec, 14
, &FOLLOW_C_STRING_in_console_stream_output650)
;
2758 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2759 {
2760 goto ruleconsole_stream_outputEx;
2761 }
2762
2763 {
2764 txt = (char*)(C_STRING29->getText(C_STRING29))->chars;
2765 }
2766
2767 }
2768
2769 }
2770
2771
2772 // This is where rules clean up and exit
2773 //
2774 goto ruleconsole_stream_outputEx; /* Prevent compiler warnings */
2775 ruleconsole_stream_outputEx: ;
2776
2777 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2778 {
2779 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2780 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2781 }
2782
2783
2784 return txt;
2785}
2786/* $ANTLR end console_stream_output */
2787
2788/**
2789 * $ANTLR start target_stream_output
2790 * GDBMIOutput.g:191:1: target_stream_output returns [char* txt] : TARGET C_STRING ;
2791 */
2792static char*
2793target_stream_output(pGDBMIOutputParser ctx)
2794{
2795 char* txt = NULL__null;
2796
2797 pANTLR3_COMMON_TOKEN C_STRING30;
2798
2799 /* Initialize rule variables
2800 */
2801
2802
2803 C_STRING30 = NULL__null;
2804
2805 {
2806 // GDBMIOutput.g:192:3: ( TARGET C_STRING )
2807 // GDBMIOutput.g:192:5: TARGET C_STRING
2808 {
2809 MATCHT(TARGET, &FOLLOW_TARGET_in_target_stream_output669)ctx->pParser->rec->match(ctx->pParser->rec, 16
, &FOLLOW_TARGET_in_target_stream_output669)
;
2810 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2811 {
2812 goto ruletarget_stream_outputEx;
2813 }
2814
2815 C_STRING30 = (pANTLR3_COMMON_TOKEN) MATCHT(C_STRING, &FOLLOW_C_STRING_in_target_stream_output671)ctx->pParser->rec->match(ctx->pParser->rec, 14
, &FOLLOW_C_STRING_in_target_stream_output671)
;
2816 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2817 {
2818 goto ruletarget_stream_outputEx;
2819 }
2820
2821 {
2822 txt = (char*)(C_STRING30->getText(C_STRING30))->chars;
2823 }
2824
2825 }
2826
2827 }
2828
2829
2830 // This is where rules clean up and exit
2831 //
2832 goto ruletarget_stream_outputEx; /* Prevent compiler warnings */
2833 ruletarget_stream_outputEx: ;
2834
2835 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2836 {
2837 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2838 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2839 }
2840
2841
2842 return txt;
2843}
2844/* $ANTLR end target_stream_output */
2845
2846/**
2847 * $ANTLR start log_stream_output
2848 * GDBMIOutput.g:195:1: log_stream_output returns [char* txt] : LOG C_STRING ;
2849 */
2850static char*
2851log_stream_output(pGDBMIOutputParser ctx)
2852{
2853 char* txt = NULL__null;
2854
2855 pANTLR3_COMMON_TOKEN C_STRING31;
2856
2857 /* Initialize rule variables
2858 */
2859
2860
2861 C_STRING31 = NULL__null;
2862
2863 {
2864 // GDBMIOutput.g:196:3: ( LOG C_STRING )
2865 // GDBMIOutput.g:196:5: LOG C_STRING
2866 {
2867 MATCHT(LOG, &FOLLOW_LOG_in_log_stream_output690)ctx->pParser->rec->match(ctx->pParser->rec, 17
, &FOLLOW_LOG_in_log_stream_output690)
;
2868 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2869 {
2870 goto rulelog_stream_outputEx;
2871 }
2872
2873 C_STRING31 = (pANTLR3_COMMON_TOKEN) MATCHT(C_STRING, &FOLLOW_C_STRING_in_log_stream_output692)ctx->pParser->rec->match(ctx->pParser->rec, 14
, &FOLLOW_C_STRING_in_log_stream_output692)
;
2874 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2875 {
2876 goto rulelog_stream_outputEx;
2877 }
2878
2879 {
2880 txt = (char*)(C_STRING31->getText(C_STRING31))->chars;
2881 }
2882
2883 }
2884
2885 }
2886
2887
2888 // This is where rules clean up and exit
2889 //
2890 goto rulelog_stream_outputEx; /* Prevent compiler warnings */
2891 rulelog_stream_outputEx: ;
2892
2893 if (HASEXCEPTION()(ctx->pParser->rec->state->error == 1))
2894 {
2895 PREPORTERROR()ctx->pParser->rec->reportError(ctx->pParser->rec
)
;
2896 PRECOVER()ctx->pParser->rec->recover(ctx->pParser->rec);
2897 }
2898
2899
2900 return txt;
2901}
2902/* $ANTLR end log_stream_output */
2903/* End of parsing rules
2904 * ==============================================
2905 */
2906
2907/* ==============================================
2908 * Syntactic predicates
2909 */
2910/* End of syntactic predicates
2911 * ==============================================
2912 */
2913
2914
2915
2916
2917
2918
2919/* End of code
2920 * =============================================================================
2921 */