]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoard/SimanticsDataLexer.h
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoard / SimanticsDataLexer.h
1 /** \file
2  *  This C header file was generated by $ANTLR version 3.2 Sep 23, 2009 12:02:23
3  *
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. 
8  *
9  * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
10  *
11  *
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
15  * this rule.
16  * 
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.
21  *
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().
24  *
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:
28  *
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)
57  *
58  * The return type for any particular rule is of course determined by the source
59  * grammar file.
60  */
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
65 //
66 // All rights reserved.
67 //
68 // Redistribution and use in source and binary forms, with or without
69 // modification, are permitted provided that the following conditions
70 // are met:
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.
78 //
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.
89
90 #ifndef _SimanticsDataLexer_H
91 #define _SimanticsDataLexer_H
92 /* =============================================================================
93  * Standard antlr3 C runtime definitions
94  */
95 #include    <antlr3.h>
96
97 /* End of standard antlr 3 runtime definitions
98  * =============================================================================
99  */
100  
101 #ifdef __cplusplus
102 extern "C" {
103 #endif
104
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.
109 //
110 typedef struct SimanticsDataLexer_Ctx_struct SimanticsDataLexer, * pSimanticsDataLexer;
111
112
113
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
121 //
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.
126 //
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 )
133 #endif
134
135 /** Context tracking structure for SimanticsDataLexer
136  */
137 struct SimanticsDataLexer_Ctx_struct
138 {
139     /** Built in ANTLR3 context tracker contains all the generic elements
140      *  required for context tracking.
141      */
142     pANTLR3_LEXER    pLexer;
143
144
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);
174         
175 };
176
177 // Function protoypes for the constructor functions that external translation units
178 // such as delegators and delegates may wish to call.
179 //
180 ANTLR3_API pSimanticsDataLexer SimanticsDataLexerNew         (pANTLR3_INPUT_STREAM instream);
181 ANTLR3_API pSimanticsDataLexer SimanticsDataLexerNewSSD      (pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state);
182
183 /** Symbolic definitions of all the tokens that the lexer will work with.
184  * \{
185  *
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.
190  */
191 #ifdef  EOF
192 #undef  EOF
193 #endif
194 #ifdef  Tokens
195 #undef  Tokens
196 #endif 
197 #define RECORD_TYPE      7
198 #define EXPONENT      25
199 #define TUPLE_TYPE      8
200 #define VALUE_DEFINITION      14
201 #define OCTAL_ESC      33
202 #define ARRAY_TYPE      9
203 #define FLOAT      26
204 #define ID      23
205 #define EOF      -1
206 #define TUPLE      18
207 #define ESC_SEQ      29
208 #define UNION_TYPE      6
209 #define TYPE_REFERENCE      10
210 #define TYPE_COMPONENT      12
211 #define COMMENT      27
212 #define TYPE_ANNOTATION      11
213 #define ARRAY      17
214 #define T__42      42
215 #define T__43      43
216 #define T__40      40
217 #define T__41      41
218 #define RECORD      20
219 #define T__46      46
220 #define T__47      47
221 #define T__44      44
222 #define T__45      45
223 #define TAGGED_VALUE      19
224 #define T__48      48
225 #define T__49      49
226 #define VALUE_DEFINITIONS      13
227 #define UNICODE_ESC      32
228 #define HEX_DIGIT      31
229 #define INT      24
230 #define VARIANT      16
231 #define WS      28
232 #define T__34      34
233 #define TYPE_DEFINITIONS      4
234 #define T__35      35
235 #define T__36      36
236 #define T__37      37
237 #define T__38      38
238 #define T__39      39
239 #define MAP      21
240 #define TYPE_DEFINITION      5
241 #define ASSIGNMENT      22
242 #define NO_VALUE      15
243 #define STRING      30
244 #ifdef  EOF
245 #undef  EOF
246 #define EOF     ANTLR3_TOKEN_EOF
247 #endif
248
249 #ifndef TOKENSOURCE
250 #define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource
251 #endif
252
253 /* End of token definitions for SimanticsDataLexer
254  * =============================================================================
255  */
256 /** \} */
257
258 #ifdef __cplusplus
259 }
260 #endif
261
262 #endif
263
264 /* END - Note:Keep extra line feed to satisfy UNIX systems */