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