2 * This C header file was generated by $ANTLR version 3.2 Sep 23, 2009 12:02:23
4 * - From the grammar source file : C:\\Simantics\\workspace\\org.simantics.databoard\\cpp\\DataBoardTest\\DataBoard\\SimanticsData.g
5 * - On : 2010-03-26 13:33:28
6 * - for the lexer : SimanticsDataLexerLexer *
7 * Editing it, at least manually, is not wise.
9 * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
12 * The lexer SimanticsDataLexer has the callable functions (rules) shown below,
13 * which will invoke the code for the associated rule in the source grammar
14 * assuming that the input stream is pointing to a token/text stream that could begin
17 * For instance if you call the first (topmost) rule in a parser grammar, you will
18 * get the results of a full parse, but calling a rule half way through the grammar will
19 * allow you to pass part of a full token stream to the parser, such as for syntax checking
20 * in editors and so on.
22 * The parser entry points are called indirectly (by function pointer to function) via
23 * a parser context typedef pSimanticsDataLexer, which is returned from a call to SimanticsDataLexerNew().
25 * As this is a generated lexer, it is unlikely you will call it 'manually'. However
26 * the methods are provided anyway.
27 * * The methods in pSimanticsDataLexer are as follows:
29 * - void pSimanticsDataLexer->T__34(pSimanticsDataLexer)
30 * - void pSimanticsDataLexer->T__35(pSimanticsDataLexer)
31 * - void pSimanticsDataLexer->T__36(pSimanticsDataLexer)
32 * - void pSimanticsDataLexer->T__37(pSimanticsDataLexer)
33 * - void pSimanticsDataLexer->T__38(pSimanticsDataLexer)
34 * - void pSimanticsDataLexer->T__39(pSimanticsDataLexer)
35 * - void pSimanticsDataLexer->T__40(pSimanticsDataLexer)
36 * - void pSimanticsDataLexer->T__41(pSimanticsDataLexer)
37 * - void pSimanticsDataLexer->T__42(pSimanticsDataLexer)
38 * - void pSimanticsDataLexer->T__43(pSimanticsDataLexer)
39 * - void pSimanticsDataLexer->T__44(pSimanticsDataLexer)
40 * - void pSimanticsDataLexer->T__45(pSimanticsDataLexer)
41 * - void pSimanticsDataLexer->T__46(pSimanticsDataLexer)
42 * - void pSimanticsDataLexer->T__47(pSimanticsDataLexer)
43 * - void pSimanticsDataLexer->T__48(pSimanticsDataLexer)
44 * - void pSimanticsDataLexer->T__49(pSimanticsDataLexer)
45 * - void pSimanticsDataLexer->ID(pSimanticsDataLexer)
46 * - void pSimanticsDataLexer->INT(pSimanticsDataLexer)
47 * - void pSimanticsDataLexer->FLOAT(pSimanticsDataLexer)
48 * - void pSimanticsDataLexer->COMMENT(pSimanticsDataLexer)
49 * - void pSimanticsDataLexer->WS(pSimanticsDataLexer)
50 * - void pSimanticsDataLexer->STRING(pSimanticsDataLexer)
51 * - void pSimanticsDataLexer->EXPONENT(pSimanticsDataLexer)
52 * - void pSimanticsDataLexer->HEX_DIGIT(pSimanticsDataLexer)
53 * - void pSimanticsDataLexer->ESC_SEQ(pSimanticsDataLexer)
54 * - void pSimanticsDataLexer->OCTAL_ESC(pSimanticsDataLexer)
55 * - void pSimanticsDataLexer->UNICODE_ESC(pSimanticsDataLexer)
56 * - void pSimanticsDataLexer->Tokens(pSimanticsDataLexer)
58 * The return type for any particular rule is of course determined by the source
61 // [The "BSD licence"]
62 // Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
63 // http://www.temporal-wave.com
64 // http://www.linkedin.com/in/jimidle
66 // All rights reserved.
68 // Redistribution and use in source and binary forms, with or without
69 // modification, are permitted provided that the following conditions
71 // 1. Redistributions of source code must retain the above copyright
72 // notice, this list of conditions and the following disclaimer.
73 // 2. Redistributions in binary form must reproduce the above copyright
74 // notice, this list of conditions and the following disclaimer in the
75 // documentation and/or other materials provided with the distribution.
76 // 3. The name of the author may not be used to endorse or promote products
77 // derived from this software without specific prior written permission.
79 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
80 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
81 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
82 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
83 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
84 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
85 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
86 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
87 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
88 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
90 #ifndef _SimanticsDataLexer_H
91 #define _SimanticsDataLexer_H
92 /* =============================================================================
93 * Standard antlr3 C runtime definitions
97 /* End of standard antlr 3 runtime definitions
98 * =============================================================================
105 // Forward declare the context typedef so that we can use it before it is
106 // properly defined. Delegators and delegates (from import statements) are
107 // interdependent and their context structures contain pointers to each other
108 // C only allows such things to be declared if you pre-declare the typedef.
110 typedef struct SimanticsDataLexer_Ctx_struct SimanticsDataLexer, * pSimanticsDataLexer;
114 #ifdef ANTLR3_WINDOWS
115 // Disable: Unreferenced parameter, - Rules with parameters that are not used
116 // constant conditional, - ANTLR realizes that a prediction is always true (synpred usually)
117 // initialized but unused variable - tree rewrite variables declared but not needed
118 // Unreferenced local variable - lexer rule declares but does not always use _type
119 // potentially unitialized variable used - retval always returned from a rule
120 // unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns
122 // These are only really displayed at warning level /W4 but that is the code ideal I am aiming at
123 // and the codegen must generate some of these warnings by necessity, apart from 4100, which is
124 // usually generated when a parser rule is given a parameter that it does not use. Mostly though
125 // this is a matter of orthogonality hence I disable that one.
127 #pragma warning( disable : 4100 )
128 #pragma warning( disable : 4101 )
129 #pragma warning( disable : 4127 )
130 #pragma warning( disable : 4189 )
131 #pragma warning( disable : 4505 )
132 #pragma warning( disable : 4701 )
135 /** Context tracking structure for SimanticsDataLexer
137 struct SimanticsDataLexer_Ctx_struct
139 /** Built in ANTLR3 context tracker contains all the generic elements
140 * required for context tracking.
142 pANTLR3_LEXER pLexer;
145 void (*mT__34) (struct SimanticsDataLexer_Ctx_struct * ctx);
146 void (*mT__35) (struct SimanticsDataLexer_Ctx_struct * ctx);
147 void (*mT__36) (struct SimanticsDataLexer_Ctx_struct * ctx);
148 void (*mT__37) (struct SimanticsDataLexer_Ctx_struct * ctx);
149 void (*mT__38) (struct SimanticsDataLexer_Ctx_struct * ctx);
150 void (*mT__39) (struct SimanticsDataLexer_Ctx_struct * ctx);
151 void (*mT__40) (struct SimanticsDataLexer_Ctx_struct * ctx);
152 void (*mT__41) (struct SimanticsDataLexer_Ctx_struct * ctx);
153 void (*mT__42) (struct SimanticsDataLexer_Ctx_struct * ctx);
154 void (*mT__43) (struct SimanticsDataLexer_Ctx_struct * ctx);
155 void (*mT__44) (struct SimanticsDataLexer_Ctx_struct * ctx);
156 void (*mT__45) (struct SimanticsDataLexer_Ctx_struct * ctx);
157 void (*mT__46) (struct SimanticsDataLexer_Ctx_struct * ctx);
158 void (*mT__47) (struct SimanticsDataLexer_Ctx_struct * ctx);
159 void (*mT__48) (struct SimanticsDataLexer_Ctx_struct * ctx);
160 void (*mT__49) (struct SimanticsDataLexer_Ctx_struct * ctx);
161 void (*mID) (struct SimanticsDataLexer_Ctx_struct * ctx);
162 void (*mINT) (struct SimanticsDataLexer_Ctx_struct * ctx);
163 void (*mFLOAT) (struct SimanticsDataLexer_Ctx_struct * ctx);
164 void (*mCOMMENT) (struct SimanticsDataLexer_Ctx_struct * ctx);
165 void (*mWS) (struct SimanticsDataLexer_Ctx_struct * ctx);
166 void (*mSTRING) (struct SimanticsDataLexer_Ctx_struct * ctx);
167 void (*mEXPONENT) (struct SimanticsDataLexer_Ctx_struct * ctx);
168 void (*mHEX_DIGIT) (struct SimanticsDataLexer_Ctx_struct * ctx);
169 void (*mESC_SEQ) (struct SimanticsDataLexer_Ctx_struct * ctx);
170 void (*mOCTAL_ESC) (struct SimanticsDataLexer_Ctx_struct * ctx);
171 void (*mUNICODE_ESC) (struct SimanticsDataLexer_Ctx_struct * ctx);
172 void (*mTokens) (struct SimanticsDataLexer_Ctx_struct * ctx); const char * (*getGrammarFileName)();
173 void (*free) (struct SimanticsDataLexer_Ctx_struct * ctx);
177 // Function protoypes for the constructor functions that external translation units
178 // such as delegators and delegates may wish to call.
180 ANTLR3_API pSimanticsDataLexer SimanticsDataLexerNew (pANTLR3_INPUT_STREAM instream);
181 ANTLR3_API pSimanticsDataLexer SimanticsDataLexerNewSSD (pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state);
183 /** Symbolic definitions of all the tokens that the lexer will work with.
186 * Antlr will define EOF, but we can't use that as it it is too common in
187 * in C header files and that would be confusing. There is no way to filter this out at the moment
188 * so we just undef it here for now. That isn't the value we get back from C recognizers
189 * anyway. We are looking for ANTLR3_TOKEN_EOF.
197 #define RECORD_TYPE 7
200 #define VALUE_DEFINITION 14
209 #define TYPE_REFERENCE 10
210 #define TYPE_COMPONENT 12
212 #define TYPE_ANNOTATION 11
223 #define TAGGED_VALUE 19
226 #define VALUE_DEFINITIONS 13
227 #define UNICODE_ESC 32
233 #define TYPE_DEFINITIONS 4
240 #define TYPE_DEFINITION 5
241 #define ASSIGNMENT 22
246 #define EOF ANTLR3_TOKEN_EOF
250 #define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource
253 /* End of token definitions for SimanticsDataLexer
254 * =============================================================================
264 /* END - Note:Keep extra line feed to satisfy UNIX systems */