--- /dev/null
+/** \file\r
+ * This C source file was generated by $ANTLR version 3.2 Sep 23, 2009 12:02:23\r
+ *\r
+ * - From the grammar source file : LangDumpDecl.g\r
+ * - On : 2010-02-24 13:30:09\r
+ * - for the tree parser : LangDumpDeclTreeParser *\r
+ * Editing it, at least manually, is not wise. \r
+ *\r
+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.\r
+ *\r
+ *\r
+*/\r
+// [The "BSD licence"]\r
+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC\r
+// http://www.temporal-wave.com\r
+// http://www.linkedin.com/in/jimidle\r
+//\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions\r
+// are met:\r
+// 1. Redistributions of source code must retain the above copyright\r
+// notice, this list of conditions and the following disclaimer.\r
+// 2. Redistributions in binary form must reproduce the above copyright\r
+// notice, this list of conditions and the following disclaimer in the\r
+// documentation and/or other materials provided with the distribution.\r
+// 3. The name of the author may not be used to endorse or promote products\r
+// derived from this software without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\r
+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+/* -----------------------------------------\r
+ * Include the ANTLR3 generated header file.\r
+ */\r
+#include "LangDumpDecl.h"\r
+/* ----------------------------------------- */\r
+\r
+\r
+\r
+\r
+\r
+/* MACROS that hide the C interface implementations from the\r
+ * generated code, which makes it a little more understandable to the human eye.\r
+ * I am very much against using C pre-processor macros for function calls and bits\r
+ * of code as you cannot see what is happening when single stepping in debuggers\r
+ * and so on. The exception (in my book at least) is for generated code, where you are\r
+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input()\r
+ * hides some indirect calls, but is always referring to the input stream. This is\r
+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig\r
+ * the runtime interfaces without changing the generated code too often, without\r
+ * confusing the reader of the generated output, who may not wish to know the gory\r
+ * details of the interface inheritance.\r
+ */\r
+ \r
+#define CTX ctx\r
+\r
+/* Aids in accessing scopes for grammar programmers\r
+ */\r
+#undef SCOPE_TYPE\r
+#undef SCOPE_STACK\r
+#undef SCOPE_TOP\r
+#define SCOPE_TYPE(scope) pLangDumpDecl_##scope##_SCOPE\r
+#define SCOPE_STACK(scope) pLangDumpDecl_##scope##Stack\r
+#define SCOPE_TOP(scope) ctx->pLangDumpDecl_##scope##Top\r
+#define SCOPE_SIZE(scope) ctx->pLangDumpDecl_##scope##Stack_limit\r
+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i))\r
+\r
+/* Macros for accessing things in the parser\r
+ */\r
+ \r
+#undef PARSER\r
+#undef RECOGNIZER \r
+#undef HAVEPARSEDRULE\r
+#undef INPUT\r
+#undef STRSTREAM\r
+#undef HASEXCEPTION\r
+#undef EXCEPTION\r
+#undef MATCHT\r
+#undef MATCHANYT\r
+#undef FOLLOWSTACK\r
+#undef FOLLOWPUSH\r
+#undef FOLLOWPOP\r
+#undef PRECOVER\r
+#undef PREPORTERROR\r
+#undef LA\r
+#undef LT\r
+#undef CONSTRUCTEX\r
+#undef CONSUME\r
+#undef MARK\r
+#undef REWIND\r
+#undef REWINDLAST\r
+#undef PERRORRECOVERY\r
+#undef HASFAILED\r
+#undef FAILEDFLAG\r
+#undef RECOVERFROMMISMATCHEDSET\r
+#undef RECOVERFROMMISMATCHEDELEMENT\r
+#undef BACKTRACKING\r
+#undef ADAPTOR\r
+#undef RULEMEMO \r
+#undef SEEK \r
+#undef INDEX\r
+#undef DBG\r
+\r
+#define PARSER ctx->pTreeParser \r
+#define RECOGNIZER PARSER->rec\r
+#define PSRSTATE RECOGNIZER->state\r
+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r)\r
+#define INPUT PARSER->ctnstream\r
+#define ISTREAM INPUT->tnstream->istream\r
+#define STRSTREAM INPUT->tnstream\r
+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE)\r
+#define EXCEPTION PSRSTATE->exception\r
+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs)\r
+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER)\r
+#define FOLLOWSTACK PSRSTATE->following\r
+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL)\r
+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK)\r
+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER)\r
+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER)\r
+#define LA(n) ISTREAM->_LA(ISTREAM, n)\r
+#define LT(n) INPUT->tnstream->_LT(INPUT->tnstream, n)\r
+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER)\r
+#define CONSUME() ISTREAM->consume(ISTREAM)\r
+#define MARK() ISTREAM->mark(ISTREAM)\r
+#define REWIND(m) ISTREAM->rewind(ISTREAM, m)\r
+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM)\r
+#define PERRORRECOVERY PSRSTATE->errorRecovery\r
+#define FAILEDFLAG PSRSTATE->failed\r
+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE)\r
+#define BACKTRACKING PSRSTATE->backtracking\r
+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s)\r
+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s)\r
+#define ADAPTOR INPUT->adaptor\r
+#define RULEMEMO PSRSTATE->ruleMemo\r
+#define SEEK(n) ISTREAM->seek(ISTREAM, n)\r
+#define INDEX() ISTREAM->index(ISTREAM)\r
+#define DBG RECOGNIZER->debugger\r
+\r
+\r
+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt\r
+\r
+/* The 4 tokens defined below may well clash with your own #defines or token types. If so\r
+ * then for the present you must use different names for your defines as these are hard coded\r
+ * in the code generator. It would be better not to use such names internally, and maybe\r
+ * we can change this in a forthcoming release. I deliberately do not #undef these\r
+ * here as this will at least give you a redefined error somewhere if they clash.\r
+ */\r
+#define UP ANTLR3_TOKEN_UP\r
+#define DOWN ANTLR3_TOKEN_DOWN\r
+#define EOR ANTLR3_TOKEN_EOR\r
+#define INVALID ANTLR3_TOKEN_INVALID\r
+\r
+\r
+/* =============================================================================\r
+ * Functions to create and destroy scopes. First come the rule scopes, followed\r
+ * by the global declared scopes.\r
+ */\r
+\r
+\r
+\r
+/* ============================================================================= */\r
+\r
+/* =============================================================================\r
+ * Start of recognizer\r
+ */\r
+\r
+\r
+\r
+/** \brief Table of all token names in symbolic order, mainly used for\r
+ * error reporting.\r
+ */\r
+pANTLR3_UINT8 LangDumpDeclTokenNames[7+4]\r
+ = {\r
+ (pANTLR3_UINT8) "<invalid>", /* String to print to indicate an invalid token */\r
+ (pANTLR3_UINT8) "<EOR>",\r
+ (pANTLR3_UINT8) "<DOWN>", \r
+ (pANTLR3_UINT8) "<UP>", \r
+ (pANTLR3_UINT8) "DECL",\r
+ (pANTLR3_UINT8) "ID",\r
+ (pANTLR3_UINT8) "INTTYPE",\r
+ (pANTLR3_UINT8) "FLOATTYPE",\r
+ (pANTLR3_UINT8) "INT",\r
+ (pANTLR3_UINT8) "WS",\r
+ (pANTLR3_UINT8) "';'"\r
+ };\r
+\r
+ \r
+\r
+// Forward declare the locally static matching functions we have generated.\r
+//\r
+static void decl (pLangDumpDecl ctx);\r
+static void decls (pLangDumpDecl ctx);\r
+static void type (pLangDumpDecl ctx);\r
+static LangDumpDecl_declarator_return declarator (pLangDumpDecl ctx);\r
+static void LangDumpDeclFree(pLangDumpDecl ctx);\r
+/* For use in tree output where we are accumulating rule labels via label += ruleRef\r
+ * we need a function that knows how to free a return scope when the list is destroyed. \r
+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro.\r
+ */\r
+static void ANTLR3_CDECL freeScope(void * scope)\r
+{\r
+ ANTLR3_FREE(scope);\r
+}\r
+\r
+/** \brief Name of the grammar file that generated this code\r
+ */\r
+static const char fileName[] = "LangDumpDecl.g";\r
+\r
+/** \brief Return the name of the grammar file that generated this code.\r
+ */\r
+static const char * getGrammarFileName()\r
+{\r
+ return fileName;\r
+}\r
+/** \brief Create a new LangDumpDecl parser and return a context for it.\r
+ *\r
+ * \param[in] instream Pointer to an input stream interface.\r
+ *\r
+ * \return Pointer to new parser context upon success.\r
+ */\r
+ANTLR3_API pLangDumpDecl\r
+LangDumpDeclNew (pANTLR3_COMMON_TREE_NODE_STREAM instream)\r
+{\r
+ // See if we can create a new parser with the standard constructor\r
+ //\r
+ return LangDumpDeclNewSSD(instream, NULL);\r
+}\r
+\r
+/** \brief Create a new LangDumpDecl parser and return a context for it.\r
+ *\r
+ * \param[in] instream Pointer to an input stream interface.\r
+ *\r
+ * \return Pointer to new parser context upon success.\r
+ */\r
+ANTLR3_API pLangDumpDecl\r
+LangDumpDeclNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state)\r
+{\r
+ pLangDumpDecl ctx; /* Context structure we will build and return */\r
+ \r
+ ctx = (pLangDumpDecl) ANTLR3_CALLOC(1, sizeof(LangDumpDecl));\r
+ \r
+ if (ctx == NULL)\r
+ {\r
+ // Failed to allocate memory for parser context\r
+ //\r
+ return NULL;\r
+ }\r
+ \r
+ /* -------------------------------------------------------------------\r
+ * Memory for basic structure is allocated, now to fill in\r
+ * the base ANTLR3 structures. We initialize the function pointers\r
+ * for the standard ANTLR3 parser function set, but upon return\r
+ * from here, the programmer may set the pointers to provide custom\r
+ * implementations of each function. \r
+ *\r
+ * We don't use the macros defined in LangDumpDecl.h here, in order that you can get a sense\r
+ * of what goes where.\r
+ */\r
+\r
+ /* Create a base Tree parser/recognizer, using the supplied tree node stream\r
+ */\r
+ ctx->pTreeParser = antlr3TreeParserNewStream(ANTLR3_SIZE_HINT, instream, state);\r
+ /* Install the implementation of our LangDumpDecl interface\r
+ */\r
+ ctx->decl = decl;\r
+ ctx->decls = decls;\r
+ ctx->type = type;\r
+ ctx->declarator = declarator;\r
+ ctx->free = LangDumpDeclFree;\r
+ ctx->getGrammarFileName = getGrammarFileName;\r
+ \r
+ /* Install the scope pushing methods.\r
+ */\r
+\r
+ \r
+ \r
+\r
+ \r
+ /* Install the token table\r
+ */\r
+ PSRSTATE->tokenNames = LangDumpDeclTokenNames;\r
+ \r
+ \r
+ /* Return the newly built parser to the caller\r
+ */\r
+ return ctx;\r
+}\r
+\r
+/** Free the parser resources\r
+ */\r
+ static void\r
+ LangDumpDeclFree(pLangDumpDecl ctx)\r
+ {\r
+ /* Free any scope memory\r
+ */\r
+ \r
+ \r
+ // Free this parser\r
+ //\r
+ ctx->pTreeParser->free(ctx->pTreeParser);\r
+ ANTLR3_FREE(ctx);\r
+\r
+ /* Everything is released, so we can return\r
+ */\r
+ return;\r
+ }\r
+ \r
+/** Return token names used by this tree parser\r
+ *\r
+ * The returned pointer is used as an index into the token names table (using the token \r
+ * number as the index).\r
+ * \r
+ * \return Pointer to first char * in the table.\r
+ */\r
+static pANTLR3_UINT8 *getTokenNames() \r
+{\r
+ return LangDumpDeclTokenNames; \r
+}\r
+\r
+ \r
+/* Declare the bitsets\r
+ */\r
+\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_decls_in_decl58 */\r
+static ANTLR3_BITWORD FOLLOW_decls_in_decl58_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000012) };\r
+static ANTLR3_BITSET_LIST FOLLOW_decls_in_decl58 = { FOLLOW_decls_in_decl58_bits, 1 };\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECL_in_decls71 */\r
+static ANTLR3_BITWORD FOLLOW_DECL_in_decls71_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) };\r
+static ANTLR3_BITSET_LIST FOLLOW_DECL_in_decls71 = { FOLLOW_DECL_in_decls71_bits, 1 };\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_type_in_decls73 */\r
+static ANTLR3_BITWORD FOLLOW_type_in_decls73_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000020) };\r
+static ANTLR3_BITSET_LIST FOLLOW_type_in_decls73 = { FOLLOW_type_in_decls73_bits, 1 };\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_declarator_in_decls77 */\r
+static ANTLR3_BITWORD FOLLOW_declarator_in_decls77_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) };\r
+static ANTLR3_BITSET_LIST FOLLOW_declarator_in_decls77 = { FOLLOW_declarator_in_decls77_bits, 1 };\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTTYPE_in_type110 */\r
+static ANTLR3_BITWORD FOLLOW_INTTYPE_in_type110_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) };\r
+static ANTLR3_BITSET_LIST FOLLOW_INTTYPE_in_type110 = { FOLLOW_INTTYPE_in_type110_bits, 1 };\r
+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ID_in_declarator126 */\r
+static ANTLR3_BITWORD FOLLOW_ID_in_declarator126_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) };\r
+static ANTLR3_BITSET_LIST FOLLOW_ID_in_declarator126 = { FOLLOW_ID_in_declarator126_bits, 1 };\r
+ \r
+\r
+ \r
+ \r
+/* ==============================================\r
+ * Parsing rules\r
+ */\r
+/** \r
+ * $ANTLR start decl\r
+ * LangDumpDecl.g:10:1: decl : ( decls )+ ;\r
+ */\r
+static void\r
+decl(pLangDumpDecl ctx)\r
+{ \r
+ /* Initialize rule variables\r
+ */\r
+\r
+\r
+ {\r
+ // LangDumpDecl.g:10:6: ( ( decls )+ )\r
+ // LangDumpDecl.g:10:8: ( decls )+\r
+ {\r
+ // LangDumpDecl.g:10:8: ( decls )+\r
+ {\r
+ int cnt1=0;\r
+\r
+ for (;;)\r
+ {\r
+ int alt1=2;\r
+ switch ( LA(1) ) \r
+ {\r
+ case DECL:\r
+ {\r
+ alt1=1;\r
+ }\r
+ break;\r
+\r
+ }\r
+\r
+ switch (alt1) \r
+ {\r
+ case 1:\r
+ // LangDumpDecl.g:10:8: decls\r
+ {\r
+ FOLLOWPUSH(FOLLOW_decls_in_decl58);\r
+ decls(ctx);\r
+\r
+ FOLLOWPOP();\r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclEx;\r
+ }\r
+\r
+\r
+ }\r
+ break;\r
+\r
+ default:\r
+ \r
+ if ( cnt1 >= 1 )\r
+ {\r
+ goto loop1;\r
+ }\r
+ /* mismatchedSetEx()\r
+ */\r
+ CONSTRUCTEX();\r
+ EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;\r
+ EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;\r
+\r
+\r
+ goto ruledeclEx;\r
+ }\r
+ cnt1++;\r
+ }\r
+ loop1: ; /* Jump to here if this rule does not match */\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+ \r
+\r
+ // This is where rules clean up and exit\r
+ //\r
+ goto ruledeclEx; /* Prevent compiler warnings */\r
+ ruledeclEx: ;\r
+\r
+ if (HASEXCEPTION())\r
+ {\r
+ PREPORTERROR();\r
+ PRECOVER();\r
+ }\r
+\r
+\r
+ return ;\r
+}\r
+/* $ANTLR end decl */\r
+\r
+/** \r
+ * $ANTLR start decls\r
+ * LangDumpDecl.g:13:1: decls : ^( DECL type d= declarator ) ;\r
+ */\r
+static void\r
+decls(pLangDumpDecl ctx)\r
+{ \r
+ LangDumpDecl_declarator_return d;\r
+ #undef RETURN_TYPE_d\r
+ #define RETURN_TYPE_d LangDumpDecl_declarator_return\r
+\r
+ /* Initialize rule variables\r
+ */\r
+\r
+\r
+ {\r
+ // LangDumpDecl.g:13:7: ( ^( DECL type d= declarator ) )\r
+ // LangDumpDecl.g:13:9: ^( DECL type d= declarator )\r
+ {\r
+ MATCHT(DECL, &FOLLOW_DECL_in_decls71); \r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclsEx;\r
+ }\r
+\r
+\r
+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); \r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclsEx;\r
+ }\r
+\r
+ FOLLOWPUSH(FOLLOW_type_in_decls73);\r
+ type(ctx);\r
+\r
+ FOLLOWPOP();\r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclsEx;\r
+ }\r
+\r
+ FOLLOWPUSH(FOLLOW_declarator_in_decls77);\r
+ d=declarator(ctx);\r
+\r
+ FOLLOWPOP();\r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclsEx;\r
+ }\r
+\r
+\r
+ MATCHT(ANTLR3_TOKEN_UP, NULL); \r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclsEx;\r
+ }\r
+\r
+ {\r
+\r
+ printf("int %s\n", (STRSTREAM->toStringSS(STRSTREAM, d.start, d.start))->chars);\r
+ \r
+ }\r
+\r
+ }\r
+\r
+ }\r
+ \r
+\r
+ // This is where rules clean up and exit\r
+ //\r
+ goto ruledeclsEx; /* Prevent compiler warnings */\r
+ ruledeclsEx: ;\r
+\r
+ if (HASEXCEPTION())\r
+ {\r
+ PREPORTERROR();\r
+ PRECOVER();\r
+ }\r
+\r
+\r
+ return ;\r
+}\r
+/* $ANTLR end decls */\r
+\r
+/** \r
+ * $ANTLR start type\r
+ * LangDumpDecl.g:21:1: type : INTTYPE ;\r
+ */\r
+static void\r
+type(pLangDumpDecl ctx)\r
+{ \r
+ /* Initialize rule variables\r
+ */\r
+\r
+\r
+ {\r
+ // LangDumpDecl.g:21:6: ( INTTYPE )\r
+ // LangDumpDecl.g:21:8: INTTYPE\r
+ {\r
+ MATCHT(INTTYPE, &FOLLOW_INTTYPE_in_type110); \r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruletypeEx;\r
+ }\r
+\r
+\r
+ }\r
+\r
+ }\r
+ \r
+\r
+ // This is where rules clean up and exit\r
+ //\r
+ goto ruletypeEx; /* Prevent compiler warnings */\r
+ ruletypeEx: ;\r
+\r
+ if (HASEXCEPTION())\r
+ {\r
+ PREPORTERROR();\r
+ PRECOVER();\r
+ }\r
+\r
+\r
+ return ;\r
+}\r
+/* $ANTLR end type */\r
+\r
+/** \r
+ * $ANTLR start declarator\r
+ * LangDumpDecl.g:23:1: declarator : i= ID ;\r
+ */\r
+static LangDumpDecl_declarator_return\r
+declarator(pLangDumpDecl ctx)\r
+{ \r
+ LangDumpDecl_declarator_return retval;\r
+\r
+ pANTLR3_BASE_TREE i;\r
+\r
+ /* Initialize rule variables\r
+ */\r
+\r
+\r
+ i = NULL;\r
+ retval.start = LT(1); retval.stop = retval.start;\r
+\r
+ {\r
+ // LangDumpDecl.g:24:6: (i= ID )\r
+ // LangDumpDecl.g:24:8: i= ID\r
+ {\r
+ i = (pANTLR3_BASE_TREE) MATCHT(ID, &FOLLOW_ID_in_declarator126); \r
+ if (HASEXCEPTION())\r
+ {\r
+ goto ruledeclaratorEx;\r
+ }\r
+\r
+\r
+ }\r
+\r
+ }\r
+ \r
+\r
+ // This is where rules clean up and exit\r
+ //\r
+ goto ruledeclaratorEx; /* Prevent compiler warnings */\r
+ ruledeclaratorEx: ;\r
+\r
+ if (HASEXCEPTION())\r
+ {\r
+ PREPORTERROR();\r
+ PRECOVER();\r
+ }\r
+\r
+\r
+ return retval;\r
+}\r
+/* $ANTLR end declarator */\r
+/* End of parsing rules\r
+ * ==============================================\r
+ */\r
+\r
+/* ==============================================\r
+ * Syntactic predicates\r
+ */\r
+/* End of syntactic predicates\r
+ * ==============================================\r
+ */\r
+\r
+ \r
+ \r
+\r
+\r
+\r
+/* End of code\r
+ * =============================================================================\r
+ */\r