langscan 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/AUTHORS.txt +19 -0
  2. data/History.txt +126 -0
  3. data/Manifest.txt +167 -0
  4. data/README.rdoc +89 -0
  5. data/Rakefile +40 -0
  6. data/ext/langscan/_make_c.rb +20 -0
  7. data/ext/langscan/_make_h.rb +30 -0
  8. data/ext/langscan/_template.c +134 -0
  9. data/ext/langscan/_template.h +53 -0
  10. data/ext/langscan/c/c/Makefile +157 -0
  11. data/ext/langscan/c/c/c.c +134 -0
  12. data/ext/langscan/c/c/c.h +66 -0
  13. data/ext/langscan/c/c/ctok.c +4622 -0
  14. data/ext/langscan/c/c/ctok.l +212 -0
  15. data/ext/langscan/c/c/extconf.rb +3 -0
  16. data/ext/langscan/c/c/modulename.txt +1 -0
  17. data/ext/langscan/c/c/tokenlist.txt +13 -0
  18. data/ext/langscan/csharp/csharp/Makefile +157 -0
  19. data/ext/langscan/csharp/csharp/csharp.c +134 -0
  20. data/ext/langscan/csharp/csharp/csharp.h +65 -0
  21. data/ext/langscan/csharp/csharp/csharptok.c +2965 -0
  22. data/ext/langscan/csharp/csharp/csharptok.l +200 -0
  23. data/ext/langscan/csharp/csharp/extconf.rb +3 -0
  24. data/ext/langscan/csharp/csharp/modulename.txt +1 -0
  25. data/ext/langscan/csharp/csharp/tokenlist.txt +12 -0
  26. data/ext/langscan/d/d/Makefile +157 -0
  27. data/ext/langscan/d/d/d.c +134 -0
  28. data/ext/langscan/d/d/d.h +64 -0
  29. data/ext/langscan/d/d/dtok.c +5461 -0
  30. data/ext/langscan/d/d/dtok.l +282 -0
  31. data/ext/langscan/d/d/extconf.rb +3 -0
  32. data/ext/langscan/d/d/modulename.txt +1 -0
  33. data/ext/langscan/d/d/tokenlist.txt +11 -0
  34. data/ext/langscan/elisp/elisp/Makefile +157 -0
  35. data/ext/langscan/elisp/elisp/elisp.c +134 -0
  36. data/ext/langscan/elisp/elisp/elisp.h +62 -0
  37. data/ext/langscan/elisp/elisp/elisptok.c +2101 -0
  38. data/ext/langscan/elisp/elisp/elisptok.l +151 -0
  39. data/ext/langscan/elisp/elisp/extconf.rb +3 -0
  40. data/ext/langscan/elisp/elisp/modulename.txt +1 -0
  41. data/ext/langscan/elisp/elisp/tokenlist.txt +9 -0
  42. data/ext/langscan/java/java/Makefile +157 -0
  43. data/ext/langscan/java/java/extconf.rb +3 -0
  44. data/ext/langscan/java/java/java.c +134 -0
  45. data/ext/langscan/java/java/java.h +64 -0
  46. data/ext/langscan/java/java/javatok.c +2090 -0
  47. data/ext/langscan/java/java/javatok.l +155 -0
  48. data/ext/langscan/java/java/modulename.txt +1 -0
  49. data/ext/langscan/java/java/tokenlist.txt +11 -0
  50. data/ext/langscan/javascript/javascript/Makefile +157 -0
  51. data/ext/langscan/javascript/javascript/extconf.rb +3 -0
  52. data/ext/langscan/javascript/javascript/javascript.c +134 -0
  53. data/ext/langscan/javascript/javascript/javascript.h +63 -0
  54. data/ext/langscan/javascript/javascript/javascripttok.c +2051 -0
  55. data/ext/langscan/javascript/javascript/javascripttok.l +147 -0
  56. data/ext/langscan/javascript/javascript/modulename.txt +1 -0
  57. data/ext/langscan/javascript/javascript/tokenlist.txt +10 -0
  58. data/ext/langscan/pairmatcher/pairmatcher/Makefile +157 -0
  59. data/ext/langscan/pairmatcher/pairmatcher/extconf.rb +3 -0
  60. data/ext/langscan/pairmatcher/pairmatcher/pairmatcher.c +890 -0
  61. data/ext/langscan/php/php/Makefile +157 -0
  62. data/ext/langscan/php/php/extconf.rb +3 -0
  63. data/ext/langscan/php/php/modulename.txt +1 -0
  64. data/ext/langscan/php/php/php.c +134 -0
  65. data/ext/langscan/php/php/php.h +64 -0
  66. data/ext/langscan/php/php/phptok.c +2406 -0
  67. data/ext/langscan/php/php/phptok.l +212 -0
  68. data/ext/langscan/php/php/tokenlist.txt +11 -0
  69. data/ext/langscan/post-distclean.rb +21 -0
  70. data/ext/langscan/pre-config.rb +57 -0
  71. data/ext/langscan/python/python/Makefile +157 -0
  72. data/ext/langscan/python/python/extconf.rb +3 -0
  73. data/ext/langscan/python/python/modulename.txt +1 -0
  74. data/ext/langscan/python/python/python.c +134 -0
  75. data/ext/langscan/python/python/python.h +61 -0
  76. data/ext/langscan/python/python/pythontok.c +2102 -0
  77. data/ext/langscan/python/python/pythontok.l +155 -0
  78. data/ext/langscan/python/python/tokenlist.txt +8 -0
  79. data/ext/langscan/ruby/compat/ripper/Makefile +158 -0
  80. data/ext/langscan/ruby/compat/ripper/depend +1 -0
  81. data/ext/langscan/ruby/compat/ripper/extconf.rb +4 -0
  82. data/ext/langscan/ruby/compat/ripper/include/eventids1.c +251 -0
  83. data/ext/langscan/ruby/compat/ripper/include/eventids2.c +277 -0
  84. data/ext/langscan/ruby/compat/ripper/include/lex.c +138 -0
  85. data/ext/langscan/ruby/compat/ripper/ripper.c +14420 -0
  86. data/ext/langscan/scheme/scheme/Makefile +157 -0
  87. data/ext/langscan/scheme/scheme/extconf.rb +3 -0
  88. data/ext/langscan/scheme/scheme/modulename.txt +1 -0
  89. data/ext/langscan/scheme/scheme/scheme.c +134 -0
  90. data/ext/langscan/scheme/scheme/scheme.h +60 -0
  91. data/ext/langscan/scheme/scheme/schemetok.c +2447 -0
  92. data/ext/langscan/scheme/scheme/schemetok.l +177 -0
  93. data/ext/langscan/scheme/scheme/tokenlist.txt +7 -0
  94. data/ext/langscan/sh/sh/Makefile +157 -0
  95. data/ext/langscan/sh/sh/extconf.rb +3 -0
  96. data/ext/langscan/sh/sh/modulename.txt +1 -0
  97. data/ext/langscan/sh/sh/sh.c +134 -0
  98. data/ext/langscan/sh/sh/sh.h +61 -0
  99. data/ext/langscan/sh/sh/shtok.c +2470 -0
  100. data/ext/langscan/sh/sh/shtok.l +325 -0
  101. data/ext/langscan/sh/sh/tokenlist.txt +8 -0
  102. data/lib/langscan.rb +124 -0
  103. data/lib/langscan/_common.rb +50 -0
  104. data/lib/langscan/_easyscanner.rb +78 -0
  105. data/lib/langscan/_pairmatcher.rb +46 -0
  106. data/lib/langscan/_type.rb +125 -0
  107. data/lib/langscan/autoconf.rb +51 -0
  108. data/lib/langscan/automake.rb +51 -0
  109. data/lib/langscan/brainfuck.rb +48 -0
  110. data/lib/langscan/c.rb +144 -0
  111. data/lib/langscan/csharp.rb +101 -0
  112. data/lib/langscan/css.rb +109 -0
  113. data/lib/langscan/d.rb +201 -0
  114. data/lib/langscan/eiffel.rb +167 -0
  115. data/lib/langscan/elisp.rb +132 -0
  116. data/lib/langscan/io.rb +84 -0
  117. data/lib/langscan/java.rb +95 -0
  118. data/lib/langscan/javascript.rb +97 -0
  119. data/lib/langscan/lua.rb +116 -0
  120. data/lib/langscan/ocaml.rb +298 -0
  121. data/lib/langscan/ocaml/camlexer.ml +28 -0
  122. data/lib/langscan/ocaml/lexer.mll +230 -0
  123. data/lib/langscan/ocaml/types.ml +36 -0
  124. data/lib/langscan/perl.rb +87 -0
  125. data/lib/langscan/perl/tokenizer.pl +231 -0
  126. data/lib/langscan/php.rb +80 -0
  127. data/lib/langscan/python.rb +101 -0
  128. data/lib/langscan/rpmspec.rb +71 -0
  129. data/lib/langscan/ruby.rb +164 -0
  130. data/lib/langscan/ruby/compat/README +5 -0
  131. data/lib/langscan/ruby/compat/ripper.rb +4 -0
  132. data/lib/langscan/ruby/compat/ripper/core.rb +918 -0
  133. data/lib/langscan/ruby/compat/ripper/filter.rb +70 -0
  134. data/lib/langscan/ruby/compat/ripper/lexer.rb +179 -0
  135. data/lib/langscan/ruby/compat/ripper/sexp.rb +100 -0
  136. data/lib/langscan/scheme.rb +160 -0
  137. data/lib/langscan/sh.rb +116 -0
  138. data/lib/langscan/text.rb +37 -0
  139. data/metaconfig +2 -0
  140. data/script/console +10 -0
  141. data/script/destroy +14 -0
  142. data/script/generate +14 -0
  143. data/script/makemanifest.rb +21 -0
  144. data/setup.rb +1604 -0
  145. data/tasks/extconf.rake +13 -0
  146. data/tasks/extconf/langscan.rake +42 -0
  147. data/test/langscan/brainfuck/test/test_scan.rb +55 -0
  148. data/test/langscan/c/test/test_scan.rb +216 -0
  149. data/test/langscan/c/test/test_token.rb +41 -0
  150. data/test/langscan/csharp/test/test_scan.rb +157 -0
  151. data/test/langscan/css/test/test_css.rb +79 -0
  152. data/test/langscan/d/test/test_scan.rb +233 -0
  153. data/test/langscan/d/test/test_token.rb +205 -0
  154. data/test/langscan/eiffel/test/test_eiffel.rb +95 -0
  155. data/test/langscan/elisp/test/test_elisp.rb +177 -0
  156. data/test/langscan/io/test/test_io.rb +79 -0
  157. data/test/langscan/java/test/test_java.rb +74 -0
  158. data/test/langscan/javascript/test/test_javascript.rb +39 -0
  159. data/test/langscan/lua/test/test_lua.rb +69 -0
  160. data/test/langscan/ocaml/test/test_ocaml.rb +161 -0
  161. data/test/langscan/php/test/test_scan.rb +138 -0
  162. data/test/langscan/python/test/test_scan.rb +105 -0
  163. data/test/langscan/rpmspec/test/test_rpmspec.rb +51 -0
  164. data/test/langscan/ruby/test/test_scan.rb +71 -0
  165. data/test/langscan/scheme/test/test_scan.rb +198 -0
  166. data/test/test_helper.rb +7 -0
  167. data/test/test_langscan.rb +123 -0
  168. metadata +296 -0
@@ -0,0 +1,65 @@
1
+ #ifndef LANGSCAN_CSHARP_H
2
+ #define LANGSCAN_CSHARP_H
3
+
4
+ #define LANGSCAN_CSHARP_TOKEN_LIST \
5
+ LANGSCAN_CSHARP_TOKEN(preproc) \
6
+ LANGSCAN_CSHARP_TOKEN(classdef) \
7
+ LANGSCAN_CSHARP_TOKEN(classref) \
8
+ LANGSCAN_CSHARP_TOKEN(delegate) \
9
+ LANGSCAN_CSHARP_TOKEN(character) \
10
+ LANGSCAN_CSHARP_TOKEN(integer) \
11
+ LANGSCAN_CSHARP_TOKEN(floating) \
12
+ LANGSCAN_CSHARP_TOKEN(punct) \
13
+ LANGSCAN_CSHARP_TOKEN(comment) \
14
+ LANGSCAN_CSHARP_TOKEN(ident) \
15
+ LANGSCAN_CSHARP_TOKEN(string) \
16
+ LANGSCAN_CSHARP_TOKEN(space)
17
+
18
+ typedef enum {
19
+ langscan_csharp_eof = 0,
20
+ #define LANGSCAN_CSHARP_TOKEN(name) langscan_csharp_##name,
21
+ LANGSCAN_CSHARP_TOKEN_LIST
22
+ #undef LANGSCAN_CSHARP_TOKEN
23
+ } langscan_csharp_token_t;
24
+
25
+ typedef struct {
26
+ int beg_lineno;
27
+ int beg_columnno;
28
+ int beg_byteno;
29
+ int end_lineno;
30
+ int end_columnno;
31
+ int end_byteno;
32
+ int eof;
33
+ char *text;
34
+ int leng;
35
+ size_t (*user_read)(void **user_data_p, char *buf, size_t maxlen);
36
+ void *user_data;
37
+ } langscan_csharp_lex_extra_t;
38
+
39
+ typedef struct langscan_csharp_tokenizer_tag {
40
+ langscan_csharp_lex_extra_t *extra;
41
+ void *scanner;
42
+ } langscan_csharp_tokenizer_t;
43
+
44
+ typedef size_t (*user_read_t)(void **user_data_p, char *buf, size_t maxlen);
45
+
46
+ langscan_csharp_tokenizer_t *langscan_csharp_make_tokenizer(user_read_t user_read, void *user_data);
47
+ langscan_csharp_token_t langscan_csharp_get_token(langscan_csharp_tokenizer_t *tokenizer);
48
+ void langscan_csharp_free_tokenizer(langscan_csharp_tokenizer_t *tokenizer);
49
+
50
+ user_read_t langscan_csharp_tokenizer_get_user_read(langscan_csharp_tokenizer_t *tokenizer);
51
+ void *langscan_csharp_tokenizer_get_user_data(langscan_csharp_tokenizer_t *tokenizer);
52
+
53
+ const char *langscan_csharp_token_name(langscan_csharp_token_t token);
54
+ #define langscan_csharp_curtoken_beg_lineno(tokenizer) ((tokenizer)->extra->beg_lineno)
55
+ #define langscan_csharp_curtoken_beg_columnno(tokenizer) ((tokenizer)->extra->beg_columnno)
56
+ #define langscan_csharp_curtoken_beg_byteno(tokenizer) ((tokenizer)->extra->beg_byteno)
57
+ #define langscan_csharp_curtoken_end_lineno(tokenizer) ((tokenizer)->extra->end_lineno)
58
+ #define langscan_csharp_curtoken_end_columnno(tokenizer) ((tokenizer)->extra->end_columnno)
59
+ #define langscan_csharp_curtoken_end_byteno(tokenizer) ((tokenizer)->extra->end_byteno)
60
+ #define langscan_csharp_curtoken_text(tokenizer) ((tokenizer)->extra->text)
61
+ #define langscan_csharp_curtoken_leng(tokenizer) ((tokenizer)->extra->leng)
62
+
63
+ void langscan_csharp_extract_functions(langscan_csharp_tokenizer_t *);
64
+
65
+ #endif
@@ -0,0 +1,2965 @@
1
+
2
+ #line 3 "<stdout>"
3
+
4
+ #define YY_INT_ALIGNED short int
5
+
6
+ /* A lexical scanner generated by flex */
7
+
8
+ #define FLEX_SCANNER
9
+ #define YY_FLEX_MAJOR_VERSION 2
10
+ #define YY_FLEX_MINOR_VERSION 5
11
+ #define YY_FLEX_SUBMINOR_VERSION 35
12
+ #if YY_FLEX_SUBMINOR_VERSION > 0
13
+ #define FLEX_BETA
14
+ #endif
15
+
16
+ /* First, we deal with platform-specific or compiler-specific issues. */
17
+
18
+ /* begin standard C headers. */
19
+ #include <stdio.h>
20
+ #include <string.h>
21
+ #include <errno.h>
22
+ #include <stdlib.h>
23
+
24
+ /* end standard C headers. */
25
+
26
+ /* flex integer type definitions */
27
+
28
+ #ifndef FLEXINT_H
29
+ #define FLEXINT_H
30
+
31
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
+
33
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
+
35
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36
+ * if you want the limit (max/min) macros for int types.
37
+ */
38
+ #ifndef __STDC_LIMIT_MACROS
39
+ #define __STDC_LIMIT_MACROS 1
40
+ #endif
41
+
42
+ #include <inttypes.h>
43
+ typedef int8_t flex_int8_t;
44
+ typedef uint8_t flex_uint8_t;
45
+ typedef int16_t flex_int16_t;
46
+ typedef uint16_t flex_uint16_t;
47
+ typedef int32_t flex_int32_t;
48
+ typedef uint32_t flex_uint32_t;
49
+ #else
50
+ typedef signed char flex_int8_t;
51
+ typedef short int flex_int16_t;
52
+ typedef int flex_int32_t;
53
+ typedef unsigned char flex_uint8_t;
54
+ typedef unsigned short int flex_uint16_t;
55
+ typedef unsigned int flex_uint32_t;
56
+ #endif /* ! C99 */
57
+
58
+ /* Limits of integral types. */
59
+ #ifndef INT8_MIN
60
+ #define INT8_MIN (-128)
61
+ #endif
62
+ #ifndef INT16_MIN
63
+ #define INT16_MIN (-32767-1)
64
+ #endif
65
+ #ifndef INT32_MIN
66
+ #define INT32_MIN (-2147483647-1)
67
+ #endif
68
+ #ifndef INT8_MAX
69
+ #define INT8_MAX (127)
70
+ #endif
71
+ #ifndef INT16_MAX
72
+ #define INT16_MAX (32767)
73
+ #endif
74
+ #ifndef INT32_MAX
75
+ #define INT32_MAX (2147483647)
76
+ #endif
77
+ #ifndef UINT8_MAX
78
+ #define UINT8_MAX (255U)
79
+ #endif
80
+ #ifndef UINT16_MAX
81
+ #define UINT16_MAX (65535U)
82
+ #endif
83
+ #ifndef UINT32_MAX
84
+ #define UINT32_MAX (4294967295U)
85
+ #endif
86
+
87
+ #endif /* ! FLEXINT_H */
88
+
89
+ #ifdef __cplusplus
90
+
91
+ /* The "const" storage-class-modifier is valid. */
92
+ #define YY_USE_CONST
93
+
94
+ #else /* ! __cplusplus */
95
+
96
+ /* C99 requires __STDC__ to be defined as 1. */
97
+ #if defined (__STDC__)
98
+
99
+ #define YY_USE_CONST
100
+
101
+ #endif /* defined (__STDC__) */
102
+ #endif /* ! __cplusplus */
103
+
104
+ #ifdef YY_USE_CONST
105
+ #define yyconst const
106
+ #else
107
+ #define yyconst
108
+ #endif
109
+
110
+ /* Returned upon end-of-file. */
111
+ #define YY_NULL 0
112
+
113
+ /* Promotes a possibly negative, possibly signed char to an unsigned
114
+ * integer for use as an array index. If the signed char is negative,
115
+ * we want to instead treat it as an 8-bit unsigned char, hence the
116
+ * double cast.
117
+ */
118
+ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
+
120
+ /* An opaque pointer. */
121
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
122
+ #define YY_TYPEDEF_YY_SCANNER_T
123
+ typedef void* yyscan_t;
124
+ #endif
125
+
126
+ /* For convenience, these vars (plus the bison vars far below)
127
+ are macros in the reentrant scanner. */
128
+ #define yyin yyg->yyin_r
129
+ #define yyout yyg->yyout_r
130
+ #define yyextra yyg->yyextra_r
131
+ #define yyleng yyg->yyleng_r
132
+ #define yytext yyg->yytext_r
133
+ #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
134
+ #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
135
+ #define yy_flex_debug yyg->yy_flex_debug_r
136
+
137
+ /* Enter a start condition. This macro really ought to take a parameter,
138
+ * but we do it the disgusting crufty way forced on us by the ()-less
139
+ * definition of BEGIN.
140
+ */
141
+ #define BEGIN yyg->yy_start = 1 + 2 *
142
+
143
+ /* Translate the current start state into a value that can be later handed
144
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
145
+ * compatibility.
146
+ */
147
+ #define YY_START ((yyg->yy_start - 1) / 2)
148
+ #define YYSTATE YY_START
149
+
150
+ /* Action number for EOF rule of a given start state. */
151
+ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
152
+
153
+ /* Special action meaning "start processing a new file". */
154
+ #define YY_NEW_FILE langscan_csharp_lex_restart(yyin ,yyscanner )
155
+
156
+ #define YY_END_OF_BUFFER_CHAR 0
157
+
158
+ /* Size of default input buffer. */
159
+ #ifndef YY_BUF_SIZE
160
+ #define YY_BUF_SIZE 16384
161
+ #endif
162
+
163
+ /* The state buf must be large enough to hold one state per character in the main buffer.
164
+ */
165
+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
166
+
167
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
168
+ #define YY_TYPEDEF_YY_BUFFER_STATE
169
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
170
+ #endif
171
+
172
+ #ifndef YY_TYPEDEF_YY_SIZE_T
173
+ #define YY_TYPEDEF_YY_SIZE_T
174
+ typedef size_t yy_size_t;
175
+ #endif
176
+
177
+ #define EOB_ACT_CONTINUE_SCAN 0
178
+ #define EOB_ACT_END_OF_FILE 1
179
+ #define EOB_ACT_LAST_MATCH 2
180
+
181
+ #define YY_LESS_LINENO(n)
182
+
183
+ /* Return all but the first "n" matched characters back to the input stream. */
184
+ #define yyless(n) \
185
+ do \
186
+ { \
187
+ /* Undo effects of setting up yytext. */ \
188
+ int yyless_macro_arg = (n); \
189
+ YY_LESS_LINENO(yyless_macro_arg);\
190
+ *yy_cp = yyg->yy_hold_char; \
191
+ YY_RESTORE_YY_MORE_OFFSET \
192
+ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
193
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
194
+ } \
195
+ while ( 0 )
196
+
197
+ #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
198
+
199
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
200
+ #define YY_STRUCT_YY_BUFFER_STATE
201
+ struct yy_buffer_state
202
+ {
203
+ FILE *yy_input_file;
204
+
205
+ char *yy_ch_buf; /* input buffer */
206
+ char *yy_buf_pos; /* current position in input buffer */
207
+
208
+ /* Size of input buffer in bytes, not including room for EOB
209
+ * characters.
210
+ */
211
+ yy_size_t yy_buf_size;
212
+
213
+ /* Number of characters read into yy_ch_buf, not including EOB
214
+ * characters.
215
+ */
216
+ yy_size_t yy_n_chars;
217
+
218
+ /* Whether we "own" the buffer - i.e., we know we created it,
219
+ * and can realloc() it to grow it, and should free() it to
220
+ * delete it.
221
+ */
222
+ int yy_is_our_buffer;
223
+
224
+ /* Whether this is an "interactive" input source; if so, and
225
+ * if we're using stdio for input, then we want to use getc()
226
+ * instead of fread(), to make sure we stop fetching input after
227
+ * each newline.
228
+ */
229
+ int yy_is_interactive;
230
+
231
+ /* Whether we're considered to be at the beginning of a line.
232
+ * If so, '^' rules will be active on the next match, otherwise
233
+ * not.
234
+ */
235
+ int yy_at_bol;
236
+
237
+ int yy_bs_lineno; /**< The line count. */
238
+ int yy_bs_column; /**< The column count. */
239
+
240
+ /* Whether to try to fill the input buffer when we reach the
241
+ * end of it.
242
+ */
243
+ int yy_fill_buffer;
244
+
245
+ int yy_buffer_status;
246
+
247
+ #define YY_BUFFER_NEW 0
248
+ #define YY_BUFFER_NORMAL 1
249
+ /* When an EOF's been seen but there's still some text to process
250
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
251
+ * shouldn't try reading from the input source any more. We might
252
+ * still have a bunch of tokens to match, though, because of
253
+ * possible backing-up.
254
+ *
255
+ * When we actually see the EOF, we change the status to "new"
256
+ * (via langscan_csharp_lex_restart()), so that the user can continue scanning by
257
+ * just pointing yyin at a new input file.
258
+ */
259
+ #define YY_BUFFER_EOF_PENDING 2
260
+
261
+ };
262
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
263
+
264
+ /* We provide macros for accessing buffer states in case in the
265
+ * future we want to put the buffer states in a more general
266
+ * "scanner state".
267
+ *
268
+ * Returns the top of the stack, or NULL.
269
+ */
270
+ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
271
+ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
272
+ : NULL)
273
+
274
+ /* Same as previous macro, but useful when we know that the buffer stack is not
275
+ * NULL or when we need an lvalue. For internal use only.
276
+ */
277
+ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
278
+
279
+ void langscan_csharp_lex_restart (FILE *input_file ,yyscan_t yyscanner );
280
+ void langscan_csharp_lex__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
281
+ YY_BUFFER_STATE langscan_csharp_lex__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
282
+ void langscan_csharp_lex__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
283
+ void langscan_csharp_lex__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
284
+ void langscan_csharp_lex_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
285
+ void langscan_csharp_lex_pop_buffer_state (yyscan_t yyscanner );
286
+
287
+ static void langscan_csharp_lex_ensure_buffer_stack (yyscan_t yyscanner );
288
+ static void langscan_csharp_lex__load_buffer_state (yyscan_t yyscanner );
289
+ static void langscan_csharp_lex__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
290
+
291
+ #define YY_FLUSH_BUFFER langscan_csharp_lex__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
292
+
293
+ YY_BUFFER_STATE langscan_csharp_lex__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
294
+ YY_BUFFER_STATE langscan_csharp_lex__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
295
+ YY_BUFFER_STATE langscan_csharp_lex__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
296
+
297
+ void *langscan_csharp_lex_alloc (yy_size_t ,yyscan_t yyscanner );
298
+ void *langscan_csharp_lex_realloc (void *,yy_size_t ,yyscan_t yyscanner );
299
+ void langscan_csharp_lex_free (void * ,yyscan_t yyscanner );
300
+
301
+ #define yy_new_buffer langscan_csharp_lex__create_buffer
302
+
303
+ #define yy_set_interactive(is_interactive) \
304
+ { \
305
+ if ( ! YY_CURRENT_BUFFER ){ \
306
+ langscan_csharp_lex_ensure_buffer_stack (yyscanner); \
307
+ YY_CURRENT_BUFFER_LVALUE = \
308
+ langscan_csharp_lex__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
309
+ } \
310
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
311
+ }
312
+
313
+ #define yy_set_bol(at_bol) \
314
+ { \
315
+ if ( ! YY_CURRENT_BUFFER ){\
316
+ langscan_csharp_lex_ensure_buffer_stack (yyscanner); \
317
+ YY_CURRENT_BUFFER_LVALUE = \
318
+ langscan_csharp_lex__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
319
+ } \
320
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321
+ }
322
+
323
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324
+
325
+ /* Begin user sect3 */
326
+
327
+ #define langscan_csharp_lex_wrap(n) 1
328
+ #define YY_SKIP_YYWRAP
329
+
330
+ typedef unsigned char YY_CHAR;
331
+
332
+ typedef int yy_state_type;
333
+
334
+ #define yytext_ptr yytext_r
335
+
336
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
337
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
338
+ static int yy_get_next_buffer (yyscan_t yyscanner );
339
+ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
340
+
341
+ /* Done after the current pattern has been matched and before the
342
+ * corresponding action - sets up yytext.
343
+ */
344
+ #define YY_DO_BEFORE_ACTION \
345
+ yyg->yytext_ptr = yy_bp; \
346
+ yyleng = (size_t) (yy_cp - yy_bp); \
347
+ yyg->yy_hold_char = *yy_cp; \
348
+ *yy_cp = '\0'; \
349
+ yyg->yy_c_buf_p = yy_cp;
350
+
351
+ #define YY_NUM_RULES 22
352
+ #define YY_END_OF_BUFFER 23
353
+ /* This struct is not used in this scanner,
354
+ but its presence is necessary. */
355
+ struct yy_trans_info
356
+ {
357
+ flex_int32_t yy_verify;
358
+ flex_int32_t yy_nxt;
359
+ };
360
+ static yyconst flex_int16_t yy_acclist[386] =
361
+ { 0,
362
+ 23, 21, 22, 10, 21, 22, 11, 22, 21, 22,
363
+ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
364
+ 21, 22, 21, 22, 21, 22, 21, 22, 17, 21,
365
+ 22, 18, 21, 22, 21, 22, 21, 22, 21, 22,
366
+ 16, 21, 22, 21, 22, 16, 21, 22, 16, 21,
367
+ 22, 16, 21, 22, 16, 21, 22, 21, 22, 10,
368
+ 21, 22, 21, 22, 16, 21, 22,16390, 16, 21,
369
+ 22,16390, 16, 21, 22,16390, 16, 21, 22,16390,
370
+ 16, 21, 22,16390, 7, 21, 22, 16, 21, 22,
371
+ 16390, 16, 21, 22,16390, 16, 21, 22,16390, 16,
372
+
373
+ 21, 22,16390, 16, 21, 22,16390, 16, 21, 22,
374
+ 16393, 16, 21, 22,16393, 16, 21, 22,16393, 16,
375
+ 21, 22,16393, 16, 21, 22,16393, 10, 21, 14,
376
+ 20, 12, 20, 17, 17, 18, 18, 21, 21, 16,
377
+ 16, 16, 16, 16, 10, 1, 16,16390, 5, 5,
378
+ 8198, 16,16390, 16,16390, 16,16390, 16,16390, 16,
379
+ 16390, 8198, 16,16390, 16,16390, 16,16390, 16,16390,
380
+ 8201, 16,16393, 16,16393, 16,16393, 16,16393, 16,
381
+ 16393, 15, 20, 12, 20, 19, 16, 16, 16, 16,
382
+ 1, 16,16390, 16,16390, 16,16390, 16,16390, 16,
383
+
384
+ 16390, 16,16390, 16,16390, 16,16390, 16,16393, 16,
385
+ 16393, 16,16393, 16,16393, 20, 13, 19, 16, 16,
386
+ 16, 16, 16,16390, 16,16390, 16,16390, 16,16390,
387
+ 16,16390, 16,16390, 16,16390, 16,16390, 16,16393,
388
+ 16,16393, 16,16393, 16,16393, 16, 16, 16, 16,
389
+ 16,16390, 16,16390, 16,16390, 16,16390, 16,16390,
390
+ 16,16390, 16,16390, 16,16390, 16,16393, 16,16393,
391
+ 16,16393, 16,16393, 16, 16, 16, 16,16390, 16,
392
+ 16390, 16,16390, 16,16390, 16,16390, 16,16390, 16,
393
+ 16393, 16,16393, 16,16393, 2, 16, 16, 5, 2,
394
+
395
+ 5, 8198, 16,16390, 16,16390, 2, 8198, 16,16390,
396
+ 16,16390, 8201, 16,16393, 16,16393, 8, 16, 16,
397
+ 3, 8, 16,16390, 16,16390, 5, 3, 5, 8198,
398
+ 8, 16,16390, 16,16390, 3, 8198, 8, 16,16393,
399
+ 16,16393, 8201, 16, 2, 16,16390, 2, 16,16390,
400
+ 2, 16,16393, 2, 3, 2, 3, 2, 3, 4,
401
+ 2, 5, 4, 5, 8198, 3, 2, 4, 8198, 3,
402
+ 2, 8201, 3, 3, 3, 3, 4, 4, 4, 4,
403
+ 4, 4, 4, 4, 4
404
+ } ;
405
+
406
+ static yyconst flex_int16_t yy_accept[425] =
407
+ { 0,
408
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
409
+ 4, 7, 9, 11, 13, 15, 17, 19, 21, 23,
410
+ 25, 27, 29, 32, 35, 37, 39, 41, 44, 46,
411
+ 49, 52, 55, 58, 60, 63, 65, 69, 73, 77,
412
+ 81, 85, 88, 92, 96, 100, 104, 108, 112, 116,
413
+ 120, 124, 128, 129, 130, 130, 131, 131, 131, 131,
414
+ 132, 132, 133, 134, 135, 135, 136, 136, 137, 138,
415
+ 139, 140, 141, 142, 143, 144, 145, 146, 146, 146,
416
+ 146, 147, 147, 147, 149, 150, 152, 154, 156, 158,
417
+ 160, 160, 160, 162, 163, 165, 167, 169, 171, 171,
418
+
419
+ 172, 172, 174, 176, 178, 180, 182, 183, 183, 183,
420
+ 183, 183, 183, 183, 184, 184, 184, 184, 185, 186,
421
+ 187, 188, 189, 190, 191, 191, 192, 192, 194, 196,
422
+ 198, 200, 200, 202, 204, 206, 208, 208, 210, 212,
423
+ 214, 216, 216, 216, 216, 216, 217, 217, 218, 219,
424
+ 220, 221, 222, 223, 223, 223, 223, 223, 225, 227,
425
+ 229, 231, 231, 231, 233, 235, 237, 239, 239, 239,
426
+ 241, 243, 245, 247, 247, 248, 249, 250, 251, 251,
427
+ 251, 253, 255, 257, 259, 259, 261, 263, 265, 267,
428
+ 267, 269, 271, 273, 275, 275, 275, 276, 277, 278,
429
+
430
+ 278, 278, 278, 278, 280, 282, 284, 284, 284, 284,
431
+ 286, 288, 290, 290, 290, 290, 292, 294, 296, 296,
432
+ 297, 297, 298, 299, 299, 299, 299, 299, 300, 303,
433
+ 303, 305, 307, 307, 307, 307, 307, 309, 309, 311,
434
+ 313, 313, 313, 313, 314, 314, 314, 316, 318, 318,
435
+ 318, 318, 318, 320, 321, 321, 322, 322, 322, 322,
436
+ 322, 325, 327, 327, 327, 328, 331, 331, 331, 331,
437
+ 331, 334, 336, 336, 336, 338, 338, 338, 338, 338,
438
+ 341, 343, 343, 344, 344, 344, 344, 345, 345, 345,
439
+ 345, 345, 346, 346, 348, 348, 348, 348, 348, 348,
440
+
441
+ 349, 349, 351, 351, 351, 351, 351, 351, 352, 352,
442
+ 354, 354, 354, 354, 354, 354, 354, 354, 354, 355,
443
+ 355, 355, 355, 355, 355, 356, 356, 356, 357, 357,
444
+ 357, 357, 357, 357, 358, 358, 358, 359, 359, 359,
445
+ 359, 359, 359, 360, 360, 360, 361, 361, 361, 361,
446
+ 362, 362, 362, 363, 366, 366, 366, 367, 367, 367,
447
+ 368, 368, 368, 370, 370, 370, 371, 371, 371, 372,
448
+ 372, 373, 373, 373, 373, 374, 374, 374, 374, 374,
449
+ 374, 374, 374, 375, 375, 375, 375, 375, 376, 376,
450
+ 376, 376, 376, 377, 377, 377, 377, 378, 378, 378,
451
+
452
+ 378, 379, 379, 379, 379, 380, 380, 380, 380, 381,
453
+ 381, 381, 382, 382, 382, 383, 383, 383, 384, 384,
454
+ 385, 385, 386, 386
455
+ } ;
456
+
457
+ static yyconst flex_int32_t yy_ec[256] =
458
+ { 0,
459
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
460
+ 1, 4, 4, 1, 1, 1, 1, 1, 1, 1,
461
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462
+ 1, 2, 5, 6, 7, 1, 8, 9, 10, 11,
463
+ 1, 12, 13, 1, 14, 15, 16, 17, 18, 18,
464
+ 18, 19, 19, 19, 19, 20, 20, 21, 22, 23,
465
+ 24, 25, 26, 1, 27, 27, 27, 28, 29, 28,
466
+ 30, 30, 30, 30, 30, 31, 32, 30, 30, 30,
467
+ 30, 30, 30, 30, 33, 30, 30, 34, 30, 30,
468
+ 1, 35, 1, 36, 30, 1, 37, 38, 39, 40,
469
+
470
+ 41, 42, 43, 44, 45, 44, 44, 46, 47, 48,
471
+ 44, 44, 44, 49, 50, 51, 52, 44, 44, 53,
472
+ 44, 44, 54, 55, 1, 1, 1, 1, 1, 1,
473
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480
+
481
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486
+ 1, 1, 1, 1, 1
487
+ } ;
488
+
489
+ static yyconst flex_int32_t yy_meta[56] =
490
+ { 0,
491
+ 1, 2, 3, 2, 1, 4, 1, 1, 1, 5,
492
+ 6, 1, 1, 1, 1, 2, 7, 7, 7, 8,
493
+ 9, 10, 1, 1, 1, 4, 11, 11, 11, 12,
494
+ 12, 12, 13, 13, 4, 1, 14, 14, 14, 14,
495
+ 14, 14, 13, 13, 13, 13, 13, 13, 13, 13,
496
+ 13, 13, 13, 15, 1
497
+ } ;
498
+
499
+ static yyconst flex_int16_t yy_base[524] =
500
+ { 0,
501
+ 0, 54, 35, 88, 69, 121, 102, 154, 1307, 2619,
502
+ 55, 2619, 1282, 131, 1267, 148, 1236, 1246, 47, 80,
503
+ 107, 146, 158, 197, 68, 1245, 135, 0, 1244, 1221,
504
+ 1224, 1209, 1205, 114, 161, 177, 180, 204, 144, 140,
505
+ 148, 2619, 219, 229, 235, 238, 244, 253, 263, 297,
506
+ 300, 303, 193, 2619, 165, 2619, 1249, 1241, 244, 338,
507
+ 1231, 0, 303, 171, 309, 239, 0, 0, 279, 1218,
508
+ 1215, 0, 1201, 1191, 1174, 1175, 280, 330, 333, 1211,
509
+ 0, 360, 1204, 1169, 2619, 2619, 172, 1168, 152, 118,
510
+ 337, 1201, 357, 2619, 384, 390, 394, 400, 415, 2619,
511
+
512
+ 1200, 421, 431, 448, 454, 458, 2619, 333, 410, 0,
513
+ 0, 1201, 1200, 2619, 458, 1191, 278, 0, 0, 338,
514
+ 1152, 1148, 1126, 1113, 1151, 0, 1150, 322, 247, 301,
515
+ 167, 1148, 437, 477, 480, 486, 1147, 495, 506, 512,
516
+ 533, 533, 1148, 0, 507, 569, 1145, 2619, 508, 1106,
517
+ 1112, 1105, 1114, 1140, 383, 1139, 389, 362, 225, 269,
518
+ 190, 1138, 397, 553, 559, 563, 579, 1137, 451, 588,
519
+ 618, 621, 624, 1132, 568, 1105, 1099, 1087, 1123, 1121,
520
+ 639, 207, 458, 513, 1118, 642, 646, 649, 664, 1109,
521
+ 670, 673, 690, 705, 1064, 1078, 1034, 1047, 695, 1070,
522
+
523
+ 1065, 720, 1063, 522, 328, 723, 1057, 727, 1050, 731,
524
+ 742, 746, 1049, 749, 1045, 764, 786, 790, 992, 2619,
525
+ 1006, 963, 964, 943, 980, 805, 431, 936, 2619, 977,
526
+ 552, 213, 808, 972, 768, 520, 2619, 958, 815, 831,
527
+ 834, 953, 837, 909, 546, 940, 841, 861, 864, 931,
528
+ 926, 517, 0, 891, 863, 2619, 898, 593, 895, 530,
529
+ 859, 573, 890, 582, 845, 2619, 886, 666, 877, 564,
530
+ 893, 899, 917, 648, 2619, 875, 683, 864, 594, 920,
531
+ 923, 926, 819, 659, 849, 848, 946, 837, 743, 751,
532
+ 862, 830, 820, 952, 792, 813, 745, 859, 892, 804,
533
+
534
+ 801, 956, 923, 787, 771, 929, 945, 786, 765, 971,
535
+ 954, 764, 779, 752, 686, 726, 716, 957, 707, 705,
536
+ 991, 702, 966, 969, 692, 678, 974, 675, 670, 998,
537
+ 667, 993, 1005, 657, 652, 994, 647, 645, 1022, 644,
538
+ 997, 1018, 642, 627, 577, 2619, 618, 596, 1010, 584,
539
+ 1033, 700, 524, 2619, 565, 1017, 536, 518, 1019, 508,
540
+ 1040, 766, 2619, 507, 1038, 501, 500, 1041, 491, 1063,
541
+ 447, 774, 483, 1046, 480, 474, 461, 839, 1058, 454,
542
+ 842, 1066, 443, 1069, 434, 867, 1071, 418, 1074, 410,
543
+ 874, 1077, 403, 395, 1085, 1086, 377, 371, 1089, 1093,
544
+
545
+ 365, 363, 1091, 1094, 333, 332, 318, 1092, 305, 269,
546
+ 1107, 268, 215, 1110, 175, 162, 1112, 81, 1114, 58,
547
+ 1115, 46, 2619, 1169, 1184, 1193, 1206, 1219, 1233, 1247,
548
+ 1259, 1273, 1288, 1297, 1305, 1313, 1321, 1335, 1350, 1365,
549
+ 1380, 1395, 1404, 1418, 1433, 1448, 1463, 1478, 1493, 1508,
550
+ 1523, 1538, 1553, 1568, 1583, 1598, 1613, 1628, 1643, 1658,
551
+ 1673, 1688, 1703, 1718, 1733, 1748, 1763, 1778, 1793, 1808,
552
+ 1823, 1838, 1853, 1868, 1883, 1898, 1913, 1928, 1943, 1958,
553
+ 1973, 1988, 2003, 2018, 2033, 2048, 2063, 2078, 2093, 2108,
554
+ 2123, 2138, 2153, 2168, 2183, 2198, 2213, 2228, 2243, 2258,
555
+
556
+ 2273, 2288, 2303, 2318, 2333, 2348, 2363, 2378, 2393, 2408,
557
+ 2423, 2438, 2453, 2468, 2483, 2498, 2513, 2528, 2543, 2558,
558
+ 2573, 2588, 2603
559
+ } ;
560
+
561
+ static yyconst flex_int16_t yy_def[524] =
562
+ { 0,
563
+ 423, 1, 1, 3, 3, 5, 1, 7, 423, 423,
564
+ 423, 423, 423, 424, 423, 423, 425, 423, 423, 423,
565
+ 423, 423, 423, 423, 423, 423, 423, 426, 423, 426,
566
+ 426, 426, 426, 423, 423, 427, 428, 428, 38, 38,
567
+ 38, 423, 429, 429, 429, 429, 429, 430, 430, 430,
568
+ 430, 430, 423, 423, 424, 423, 424, 423, 431, 423,
569
+ 432, 433, 60, 23, 423, 423, 434, 24, 423, 423,
570
+ 423, 426, 426, 426, 426, 426, 423, 427, 427, 423,
571
+ 435, 423, 423, 38, 423, 423, 38, 38, 38, 38,
572
+ 423, 423, 429, 423, 429, 429, 429, 429, 423, 423,
573
+
574
+ 423, 430, 430, 430, 430, 430, 423, 423, 423, 436,
575
+ 437, 436, 437, 423, 423, 432, 438, 433, 63, 434,
576
+ 426, 426, 426, 426, 439, 435, 440, 38, 38, 38,
577
+ 38, 441, 429, 429, 429, 429, 442, 430, 430, 430,
578
+ 430, 423, 436, 443, 423, 423, 444, 423, 423, 426,
579
+ 426, 426, 426, 439, 445, 440, 446, 38, 38, 38,
580
+ 38, 441, 447, 429, 429, 429, 429, 442, 448, 430,
581
+ 430, 430, 430, 444, 426, 426, 426, 426, 449, 450,
582
+ 38, 38, 38, 38, 451, 429, 429, 429, 429, 452,
583
+ 430, 430, 430, 430, 453, 423, 426, 426, 426, 449,
584
+
585
+ 450, 453, 423, 38, 38, 38, 451, 453, 423, 429,
586
+ 429, 429, 452, 453, 423, 430, 430, 430, 453, 423,
587
+ 454, 426, 426, 455, 423, 453, 453, 453, 423, 456,
588
+ 38, 38, 455, 423, 453, 453, 423, 457, 429, 429,
589
+ 455, 423, 453, 453, 453, 458, 430, 430, 455, 423,
590
+ 454, 459, 426, 426, 455, 423, 460, 461, 456, 462,
591
+ 38, 38, 455, 455, 455, 423, 463, 464, 457, 465,
592
+ 429, 429, 455, 455, 423, 466, 467, 458, 468, 430,
593
+ 430, 455, 455, 455, 469, 470, 426, 460, 471, 461,
594
+ 472, 440, 473, 38, 474, 463, 475, 464, 476, 477,
595
+
596
+ 478, 429, 479, 466, 480, 467, 481, 482, 483, 430,
597
+ 484, 469, 485, 470, 486, 423, 487, 488, 489, 473,
598
+ 486, 423, 474, 490, 440, 491, 492, 493, 478, 486,
599
+ 423, 479, 494, 477, 495, 496, 497, 483, 486, 423,
600
+ 484, 498, 482, 499, 486, 423, 500, 487, 488, 489,
601
+ 486, 486, 486, 423, 501, 502, 489, 491, 492, 493,
602
+ 486, 486, 423, 503, 504, 493, 495, 496, 497, 486,
603
+ 486, 486, 505, 506, 497, 499, 500, 507, 508, 501,
604
+ 509, 502, 489, 510, 503, 511, 504, 493, 512, 505,
605
+ 513, 506, 497, 514, 508, 515, 440, 516, 510, 517,
606
+
607
+ 477, 518, 512, 519, 482, 520, 514, 521, 489, 516,
608
+ 522, 493, 518, 523, 497, 520, 521, 489, 522, 493,
609
+ 523, 497, 0, 423, 423, 423, 423, 423, 423, 423,
610
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
611
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
612
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
613
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
614
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
615
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
616
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
617
+
618
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
619
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
620
+ 423, 423, 423
621
+ } ;
622
+
623
+ static yyconst flex_int16_t yy_nxt[2675] =
624
+ { 0,
625
+ 10, 11, 12, 11, 13, 14, 10, 15, 16, 17,
626
+ 10, 18, 19, 20, 21, 22, 23, 24, 24, 24,
627
+ 10, 10, 25, 26, 27, 10, 28, 28, 28, 28,
628
+ 28, 28, 28, 28, 10, 29, 28, 28, 30, 31,
629
+ 28, 28, 28, 28, 32, 28, 28, 28, 28, 33,
630
+ 28, 28, 28, 10, 34, 35, 53, 169, 53, 54,
631
+ 36, 37, 37, 37, 37, 37, 37, 37, 37, 163,
632
+ 54, 37, 37, 38, 39, 37, 37, 37, 37, 40,
633
+ 37, 37, 37, 37, 41, 37, 37, 37, 42, 35,
634
+ 70, 54, 157, 54, 36, 43, 43, 43, 43, 43,
635
+
636
+ 43, 43, 43, 54, 54, 43, 43, 44, 45, 43,
637
+ 43, 43, 43, 46, 43, 43, 43, 43, 47, 43,
638
+ 43, 43, 35, 60, 60, 60, 60, 36, 48, 48,
639
+ 48, 48, 48, 48, 48, 48, 56, 54, 48, 48,
640
+ 49, 50, 48, 48, 48, 48, 51, 48, 48, 48,
641
+ 48, 52, 48, 48, 48, 35, 54, 61, 54, 71,
642
+ 36, 62, 77, 84, 53, 57, 131, 78, 54, 54,
643
+ 56, 54, 63, 391, 64, 64, 64, 65, 79, 79,
644
+ 79, 82, 82, 82, 88, 84, 169, 89, 66, 84,
645
+ 66, 67, 80, 84, 53, 83, 53, 84, 90, 57,
646
+
647
+ 85, 85, 130, 66, 423, 82, 82, 82, 128, 66,
648
+ 67, 63, 84, 68, 68, 68, 68, 84, 161, 83,
649
+ 91, 91, 91, 423, 85, 85, 386, 69, 184, 69,
650
+ 91, 91, 91, 86, 92, 84, 91, 91, 91, 91,
651
+ 91, 91, 69, 204, 92, 91, 91, 91, 69, 87,
652
+ 92, 262, 84, 92, 99, 99, 99, 86, 84, 92,
653
+ 108, 108, 109, 100, 99, 99, 99, 182, 101, 66,
654
+ 84, 66, 94, 100, 95, 96, 110, 111, 101, 163,
655
+ 381, 77, 94, 53, 66, 97, 78, 159, 94, 117,
656
+ 66, 94, 84, 148, 98, 112, 113, 94, 99, 99,
657
+
658
+ 99, 99, 99, 99, 99, 99, 99, 100, 103, 69,
659
+ 100, 69, 101, 100, 84, 101, 157, 183, 101, 119,
660
+ 119, 119, 119, 63, 69, 65, 65, 65, 65, 378,
661
+ 69, 79, 79, 79, 79, 79, 79, 104, 91, 91,
662
+ 91, 160, 107, 391, 169, 80, 84, 105, 80, 142,
663
+ 142, 142, 92, 106, 60, 60, 60, 60, 91, 91,
664
+ 91, 82, 82, 82, 232, 114, 115, 84, 149, 114,
665
+ 149, 158, 92, 84, 386, 83, 163, 114, 115, 114,
666
+ 85, 85, 381, 149, 114, 91, 91, 91, 157, 149,
667
+ 94, 91, 91, 91, 155, 91, 91, 91, 79, 92,
668
+
669
+ 157, 91, 91, 91, 82, 92, 378, 84, 163, 92,
670
+ 94, 181, 91, 86, 169, 92, 99, 99, 99, 107,
671
+ 133, 391, 99, 99, 99, 100, 58, 58, 58, 163,
672
+ 101, 100, 99, 99, 99, 134, 101, 94, 91, 91,
673
+ 91, 100, 258, 94, 135, 386, 101, 94, 136, 99,
674
+ 99, 99, 92, 94, 157, 99, 99, 99, 100, 99,
675
+ 99, 99, 169, 101, 100, 381, 99, 138, 100, 101,
676
+ 145, 145, 378, 101, 146, 146, 146, 146, 91, 91,
677
+ 91, 91, 91, 91, 220, 313, 164, 91, 91, 91,
678
+ 94, 169, 92, 139, 391, 92, 99, 99, 99, 205,
679
+
680
+ 346, 92, 169, 84, 140, 100, 141, 99, 99, 99,
681
+ 101, 305, 163, 99, 99, 99, 100, 165, 386, 163,
682
+ 166, 101, 100, 146, 146, 146, 146, 101, 252, 297,
683
+ 94, 268, 195, 94, 99, 99, 99, 167, 149, 94,
684
+ 149, 260, 107, 100, 170, 202, 171, 157, 101, 58,
685
+ 58, 58, 172, 149, 91, 91, 91, 277, 84, 149,
686
+ 91, 91, 91, 206, 91, 91, 91, 84, 92, 195,
687
+ 195, 195, 231, 220, 92, 270, 381, 346, 92, 208,
688
+ 91, 91, 91, 196, 173, 146, 146, 146, 146, 99,
689
+ 99, 99, 261, 295, 92, 157, 114, 84, 100, 220,
690
+
691
+ 114, 187, 186, 101, 291, 279, 94, 289, 114, 214,
692
+ 114, 188, 94, 294, 156, 114, 94, 189, 84, 99,
693
+ 99, 99, 99, 99, 99, 99, 99, 99, 100, 378,
694
+ 346, 100, 94, 101, 100, 256, 101, 191, 313, 101,
695
+ 202, 202, 202, 208, 208, 208, 292, 91, 91, 91,
696
+ 91, 91, 91, 169, 203, 373, 279, 209, 169, 303,
697
+ 192, 92, 194, 305, 92, 91, 91, 91, 163, 193,
698
+ 311, 214, 214, 214, 99, 99, 99, 299, 364, 92,
699
+ 100, 270, 210, 100, 84, 215, 163, 162, 101, 297,
700
+ 211, 99, 99, 99, 307, 94, 224, 224, 224, 94,
701
+
702
+ 100, 256, 94, 157, 168, 101, 99, 99, 99, 216,
703
+ 225, 379, 256, 355, 212, 100, 260, 94, 157, 300,
704
+ 101, 226, 226, 226, 233, 233, 233, 289, 235, 235,
705
+ 235, 217, 91, 91, 91, 227, 308, 347, 234, 346,
706
+ 228, 85, 236, 91, 91, 91, 92, 241, 241, 241,
707
+ 243, 243, 243, 346, 289, 218, 297, 92, 224, 244,
708
+ 233, 242, 291, 252, 245, 99, 99, 99, 84, 235,
709
+ 235, 235, 156, 229, 100, 313, 279, 384, 240, 101,
710
+ 237, 239, 305, 236, 94, 389, 241, 99, 99, 99,
711
+ 313, 249, 249, 249, 249, 94, 100, 169, 305, 94,
712
+
713
+ 100, 101, 220, 324, 292, 250, 226, 226, 226, 263,
714
+ 263, 263, 270, 156, 247, 163, 91, 91, 91, 346,
715
+ 227, 237, 248, 264, 297, 228, 85, 346, 265, 85,
716
+ 92, 260, 91, 91, 91, 273, 273, 273, 243, 243,
717
+ 243, 157, 99, 99, 99, 325, 92, 244, 289, 274,
718
+ 378, 100, 245, 381, 315, 271, 101, 321, 229, 252,
719
+ 313, 266, 99, 99, 99, 282, 282, 282, 94, 272,
720
+ 299, 100, 256, 291, 283, 279, 101, 226, 386, 284,
721
+ 162, 280, 330, 180, 94, 391, 305, 275, 270, 339,
722
+ 220, 263, 263, 263, 91, 91, 91, 297, 256, 281,
723
+
724
+ 91, 91, 91, 299, 84, 264, 260, 235, 92, 289,
725
+ 265, 85, 300, 185, 92, 319, 256, 256, 273, 273,
726
+ 273, 99, 99, 99, 99, 99, 99, 282, 282, 282,
727
+ 100, 287, 274, 100, 333, 101, 283, 252, 101, 302,
728
+ 307, 284, 285, 266, 162, 328, 94, 315, 315, 315,
729
+ 168, 279, 94, 321, 321, 321, 307, 330, 330, 330,
730
+ 243, 316, 220, 310, 276, 342, 190, 322, 291, 270,
731
+ 275, 331, 339, 339, 339, 168, 334, 324, 201, 256,
732
+ 324, 100, 308, 267, 263, 299, 340, 156, 260, 220,
733
+ 180, 257, 351, 351, 351, 207, 256, 84, 337, 361,
734
+
735
+ 361, 361, 254, 253, 333, 307, 352, 343, 342, 94,
736
+ 350, 353, 85, 362, 162, 213, 333, 252, 168, 325,
737
+ 273, 291, 357, 370, 370, 370, 185, 360, 324, 342,
738
+ 299, 201, 371, 282, 351, 351, 351, 372, 201, 190,
739
+ 207, 361, 361, 361, 354, 220, 334, 369, 352, 333,
740
+ 343, 363, 307, 353, 85, 362, 246, 342, 366, 207,
741
+ 169, 238, 213, 350, 370, 370, 370, 213, 163, 396,
742
+ 383, 375, 360, 371, 230, 346, 157, 324, 372, 156,
743
+ 400, 155, 333, 223, 222, 404, 354, 201, 342, 221,
744
+ 162, 388, 207, 363, 369, 168, 396, 396, 213, 393,
745
+
746
+ 400, 351, 404, 396, 400, 404, 156, 180, 361, 370,
747
+ 162, 397, 168, 201, 185, 190, 346, 220, 400, 383,
748
+ 169, 404, 401, 396, 388, 400, 404, 405, 207, 163,
749
+ 393, 213, 157, 201, 155, 207, 213, 199, 397, 409,
750
+ 198, 197, 401, 117, 405, 418, 412, 415, 169, 163,
751
+ 157, 155, 178, 177, 176, 175, 117, 107, 169, 163,
752
+ 420, 157, 155, 422, 153, 418, 152, 420, 422, 55,
753
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
754
+ 55, 55, 55, 55, 58, 58, 58, 58, 151, 58,
755
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 72,
756
+
757
+ 72, 150, 117, 72, 72, 72, 72, 81, 81, 107,
758
+ 107, 137, 132, 129, 84, 127, 81, 81, 81, 81,
759
+ 84, 84, 125, 124, 123, 84, 84, 84, 84, 84,
760
+ 84, 84, 84, 84, 93, 93, 122, 121, 54, 93,
761
+ 93, 54, 117, 93, 93, 93, 93, 93, 102, 102,
762
+ 107, 423, 102, 102, 102, 76, 75, 102, 102, 102,
763
+ 102, 58, 58, 58, 74, 58, 73, 54, 54, 54,
764
+ 59, 58, 58, 116, 116, 116, 116, 116, 116, 116,
765
+ 116, 116, 116, 116, 116, 116, 116, 116, 118, 118,
766
+ 54, 118, 118, 118, 118, 118, 118, 118, 118, 118,
767
+
768
+ 118, 118, 118, 120, 120, 54, 423, 120, 423, 423,
769
+ 120, 126, 126, 423, 423, 126, 126, 126, 126, 143,
770
+ 143, 423, 423, 143, 423, 423, 143, 144, 144, 423,
771
+ 423, 144, 423, 423, 144, 147, 147, 147, 147, 147,
772
+ 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
773
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
774
+ 154, 154, 154, 154, 154, 156, 156, 156, 156, 156,
775
+ 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
776
+ 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
777
+ 162, 162, 162, 162, 162, 168, 168, 168, 168, 168,
778
+
779
+ 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
780
+ 58, 58, 423, 423, 58, 423, 423, 58, 174, 174,
781
+ 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
782
+ 174, 174, 174, 179, 179, 179, 179, 179, 179, 179,
783
+ 179, 179, 179, 179, 179, 179, 179, 179, 180, 180,
784
+ 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
785
+ 180, 180, 180, 185, 185, 185, 185, 185, 185, 185,
786
+ 185, 185, 185, 185, 185, 185, 185, 185, 190, 190,
787
+ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
788
+ 190, 190, 190, 200, 200, 200, 200, 200, 200, 200,
789
+
790
+ 200, 200, 200, 200, 200, 200, 200, 200, 201, 201,
791
+ 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
792
+ 201, 201, 201, 207, 207, 207, 207, 207, 207, 207,
793
+ 207, 207, 207, 207, 207, 207, 207, 207, 213, 213,
794
+ 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
795
+ 213, 213, 213, 219, 219, 219, 219, 219, 219, 219,
796
+ 219, 219, 423, 219, 219, 219, 219, 219, 251, 251,
797
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
798
+ 251, 251, 251, 255, 255, 255, 255, 255, 255, 255,
799
+ 255, 255, 423, 255, 255, 255, 255, 255, 259, 259,
800
+
801
+ 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
802
+ 259, 259, 259, 269, 269, 269, 269, 269, 269, 269,
803
+ 269, 269, 269, 269, 269, 269, 269, 269, 278, 278,
804
+ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
805
+ 278, 278, 278, 286, 286, 286, 286, 286, 286, 286,
806
+ 286, 286, 286, 286, 286, 286, 286, 286, 288, 288,
807
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
808
+ 288, 288, 288, 290, 290, 290, 290, 290, 290, 290,
809
+ 290, 290, 290, 290, 290, 290, 290, 290, 293, 293,
810
+ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
811
+
812
+ 293, 293, 293, 296, 296, 296, 296, 296, 296, 296,
813
+ 296, 296, 296, 296, 296, 296, 296, 296, 298, 298,
814
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
815
+ 298, 298, 298, 301, 301, 301, 301, 301, 301, 301,
816
+ 301, 301, 301, 301, 301, 301, 301, 301, 304, 304,
817
+ 304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
818
+ 304, 304, 304, 306, 306, 306, 306, 306, 306, 306,
819
+ 306, 306, 306, 306, 306, 306, 306, 306, 309, 309,
820
+ 309, 309, 309, 309, 309, 309, 309, 309, 309, 309,
821
+ 309, 309, 309, 312, 312, 312, 312, 312, 312, 312,
822
+
823
+ 312, 312, 312, 312, 312, 312, 312, 312, 314, 314,
824
+ 314, 314, 314, 314, 314, 314, 314, 314, 314, 314,
825
+ 314, 314, 314, 317, 317, 317, 317, 317, 317, 317,
826
+ 317, 317, 317, 317, 317, 317, 317, 317, 318, 318,
827
+ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
828
+ 318, 318, 318, 320, 320, 320, 320, 320, 320, 320,
829
+ 320, 320, 320, 320, 320, 320, 320, 320, 323, 323,
830
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
831
+ 323, 323, 323, 326, 326, 326, 326, 326, 326, 326,
832
+ 326, 326, 326, 326, 326, 326, 326, 326, 327, 327,
833
+
834
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
835
+ 327, 327, 327, 162, 162, 162, 162, 162, 162, 162,
836
+ 162, 162, 162, 162, 162, 162, 162, 162, 329, 329,
837
+ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329,
838
+ 329, 329, 329, 332, 332, 332, 332, 332, 332, 332,
839
+ 332, 332, 332, 332, 332, 332, 332, 332, 335, 335,
840
+ 335, 335, 335, 335, 335, 335, 335, 335, 335, 335,
841
+ 335, 335, 335, 336, 336, 336, 336, 336, 336, 336,
842
+ 336, 336, 336, 336, 336, 336, 336, 336, 168, 168,
843
+ 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
844
+
845
+ 168, 168, 168, 338, 338, 338, 338, 338, 338, 338,
846
+ 338, 338, 338, 338, 338, 338, 338, 338, 341, 341,
847
+ 341, 341, 341, 341, 341, 341, 341, 341, 341, 341,
848
+ 341, 341, 341, 344, 344, 344, 344, 344, 344, 344,
849
+ 344, 344, 344, 344, 344, 344, 344, 344, 345, 345,
850
+ 345, 345, 345, 345, 345, 345, 345, 423, 345, 345,
851
+ 345, 345, 345, 348, 348, 348, 348, 348, 348, 348,
852
+ 348, 348, 348, 348, 348, 348, 348, 348, 349, 349,
853
+ 349, 349, 349, 349, 349, 349, 349, 349, 349, 349,
854
+ 349, 349, 349, 201, 201, 201, 201, 201, 201, 201,
855
+
856
+ 201, 201, 201, 201, 201, 201, 201, 201, 356, 356,
857
+ 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
858
+ 356, 356, 356, 358, 358, 358, 358, 358, 358, 358,
859
+ 358, 358, 358, 358, 358, 358, 358, 358, 359, 359,
860
+ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359,
861
+ 359, 359, 359, 207, 207, 207, 207, 207, 207, 207,
862
+ 207, 207, 207, 207, 207, 207, 207, 207, 365, 365,
863
+ 365, 365, 365, 365, 365, 365, 365, 365, 365, 365,
864
+ 365, 365, 365, 367, 367, 367, 367, 367, 367, 367,
865
+ 367, 367, 367, 367, 367, 367, 367, 367, 368, 368,
866
+
867
+ 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
868
+ 368, 368, 368, 213, 213, 213, 213, 213, 213, 213,
869
+ 213, 213, 213, 213, 213, 213, 213, 213, 374, 374,
870
+ 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
871
+ 374, 374, 374, 376, 376, 376, 376, 376, 376, 376,
872
+ 376, 376, 376, 376, 376, 376, 376, 376, 377, 377,
873
+ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
874
+ 377, 377, 377, 380, 380, 380, 380, 380, 380, 380,
875
+ 380, 380, 380, 380, 380, 380, 380, 380, 382, 382,
876
+ 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
877
+
878
+ 382, 382, 382, 385, 385, 385, 385, 385, 385, 385,
879
+ 385, 385, 385, 385, 385, 385, 385, 385, 387, 387,
880
+ 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
881
+ 387, 387, 387, 390, 390, 390, 390, 390, 390, 390,
882
+ 390, 390, 390, 390, 390, 390, 390, 390, 392, 392,
883
+ 392, 392, 392, 392, 392, 392, 392, 392, 392, 392,
884
+ 392, 392, 392, 394, 394, 394, 394, 394, 394, 394,
885
+ 394, 394, 394, 394, 394, 394, 394, 394, 395, 395,
886
+ 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
887
+ 395, 395, 395, 398, 398, 398, 398, 398, 398, 398,
888
+
889
+ 398, 398, 398, 398, 398, 398, 398, 398, 399, 399,
890
+ 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
891
+ 399, 399, 399, 402, 402, 402, 402, 402, 402, 402,
892
+ 402, 402, 402, 402, 402, 402, 402, 402, 403, 403,
893
+ 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
894
+ 403, 403, 403, 406, 406, 406, 406, 406, 406, 406,
895
+ 406, 406, 406, 406, 406, 406, 406, 406, 407, 407,
896
+ 407, 407, 407, 407, 407, 407, 407, 407, 407, 407,
897
+ 407, 407, 407, 408, 408, 408, 408, 408, 408, 408,
898
+ 408, 408, 408, 408, 408, 408, 408, 408, 410, 410,
899
+
900
+ 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
901
+ 410, 410, 410, 411, 411, 411, 411, 411, 411, 411,
902
+ 411, 411, 411, 411, 411, 411, 411, 411, 413, 413,
903
+ 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
904
+ 413, 413, 413, 414, 414, 414, 414, 414, 414, 414,
905
+ 414, 414, 414, 414, 414, 414, 414, 414, 416, 416,
906
+ 416, 416, 416, 416, 416, 416, 416, 416, 416, 416,
907
+ 416, 416, 416, 417, 417, 417, 417, 417, 417, 417,
908
+ 417, 417, 417, 417, 417, 417, 417, 417, 419, 419,
909
+ 419, 419, 419, 419, 419, 419, 419, 419, 419, 419,
910
+
911
+ 419, 419, 419, 421, 421, 421, 421, 421, 421, 421,
912
+ 421, 421, 421, 421, 421, 421, 421, 421, 9, 423,
913
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
914
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
915
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
916
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
917
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
918
+ 423, 423, 423, 423
919
+ } ;
920
+
921
+ static yyconst flex_int16_t yy_chk[2675] =
922
+ { 0,
923
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
924
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
925
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
926
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
927
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
928
+ 1, 1, 1, 1, 1, 2, 11, 422, 11, 19,
929
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 420,
930
+ 19, 3, 3, 3, 3, 3, 3, 3, 3, 3,
931
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
932
+ 25, 25, 418, 20, 4, 5, 5, 5, 5, 5,
933
+
934
+ 5, 5, 5, 20, 20, 5, 5, 5, 5, 5,
935
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
936
+ 5, 5, 6, 21, 21, 21, 21, 6, 7, 7,
937
+ 7, 7, 7, 7, 7, 7, 14, 34, 7, 7,
938
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
939
+ 7, 7, 7, 7, 7, 8, 16, 22, 27, 27,
940
+ 8, 22, 35, 90, 35, 14, 90, 35, 34, 22,
941
+ 55, 16, 23, 416, 23, 23, 23, 23, 36, 36,
942
+ 36, 37, 37, 37, 39, 40, 415, 40, 23, 39,
943
+ 23, 23, 36, 41, 53, 37, 53, 89, 41, 55,
944
+
945
+ 37, 37, 89, 23, 64, 38, 38, 38, 87, 23,
946
+ 23, 24, 131, 24, 24, 24, 24, 87, 131, 38,
947
+ 43, 43, 43, 64, 38, 38, 413, 24, 161, 24,
948
+ 44, 44, 44, 37, 43, 161, 45, 45, 45, 46,
949
+ 46, 46, 24, 182, 44, 47, 47, 47, 24, 38,
950
+ 45, 232, 182, 46, 48, 48, 48, 38, 232, 47,
951
+ 59, 59, 59, 48, 49, 49, 49, 159, 48, 66,
952
+ 159, 66, 43, 49, 44, 45, 59, 59, 49, 412,
953
+ 410, 77, 44, 77, 66, 46, 77, 129, 45, 117,
954
+ 66, 46, 129, 117, 47, 59, 59, 47, 50, 50,
955
+
956
+ 50, 51, 51, 51, 52, 52, 52, 50, 49, 69,
957
+ 51, 69, 50, 52, 160, 51, 409, 160, 52, 63,
958
+ 63, 63, 63, 65, 69, 65, 65, 65, 65, 407,
959
+ 69, 78, 78, 78, 79, 79, 79, 50, 91, 91,
960
+ 91, 130, 108, 406, 405, 78, 130, 51, 79, 108,
961
+ 108, 108, 91, 52, 60, 60, 60, 60, 93, 93,
962
+ 93, 82, 82, 82, 205, 60, 60, 128, 120, 60,
963
+ 120, 128, 93, 205, 402, 82, 401, 60, 60, 60,
964
+ 82, 82, 398, 120, 60, 95, 95, 95, 397, 120,
965
+ 91, 96, 96, 96, 155, 97, 97, 97, 155, 95,
966
+
967
+ 157, 98, 98, 98, 157, 96, 394, 158, 163, 97,
968
+ 93, 158, 163, 82, 393, 98, 99, 99, 99, 109,
969
+ 95, 390, 102, 102, 102, 99, 109, 109, 109, 388,
970
+ 99, 102, 103, 103, 103, 96, 102, 95, 133, 133,
971
+ 133, 103, 227, 96, 97, 385, 103, 97, 98, 104,
972
+ 104, 104, 133, 98, 383, 105, 105, 105, 104, 106,
973
+ 106, 106, 169, 104, 105, 380, 169, 103, 106, 105,
974
+ 115, 115, 377, 106, 115, 115, 115, 115, 134, 134,
975
+ 134, 135, 135, 135, 227, 376, 133, 136, 136, 136,
976
+ 133, 375, 134, 104, 373, 135, 138, 138, 138, 183,
977
+
978
+ 371, 136, 369, 183, 105, 138, 106, 139, 139, 139,
979
+ 138, 367, 366, 140, 140, 140, 139, 134, 364, 360,
980
+ 135, 139, 140, 145, 145, 145, 145, 140, 252, 358,
981
+ 134, 236, 252, 135, 141, 141, 141, 136, 149, 136,
982
+ 149, 260, 142, 141, 138, 260, 139, 357, 141, 142,
983
+ 142, 142, 140, 149, 164, 164, 164, 245, 184, 149,
984
+ 165, 165, 165, 184, 166, 166, 166, 204, 164, 175,
985
+ 175, 175, 204, 236, 165, 270, 355, 353, 166, 270,
986
+ 167, 167, 167, 175, 141, 146, 146, 146, 146, 170,
987
+ 170, 170, 231, 264, 167, 350, 146, 231, 170, 245,
988
+
989
+ 146, 165, 164, 170, 258, 279, 164, 348, 146, 279,
990
+ 146, 166, 165, 262, 258, 146, 166, 167, 262, 171,
991
+ 171, 171, 172, 172, 172, 173, 173, 173, 171, 347,
992
+ 345, 172, 167, 171, 173, 264, 172, 170, 344, 173,
993
+ 181, 181, 181, 186, 186, 186, 258, 187, 187, 187,
994
+ 188, 188, 188, 343, 181, 340, 338, 186, 337, 274,
995
+ 171, 187, 173, 335, 188, 189, 189, 189, 334, 172,
996
+ 284, 191, 191, 191, 192, 192, 192, 268, 331, 189,
997
+ 191, 329, 187, 192, 181, 191, 328, 268, 192, 326,
998
+ 188, 193, 193, 193, 277, 186, 199, 199, 199, 187,
999
+
1000
+ 193, 274, 188, 325, 277, 193, 194, 194, 194, 192,
1001
+ 199, 352, 284, 322, 189, 194, 320, 189, 319, 268,
1002
+ 194, 202, 202, 202, 206, 206, 206, 317, 208, 208,
1003
+ 208, 193, 210, 210, 210, 202, 277, 316, 206, 315,
1004
+ 202, 202, 208, 211, 211, 211, 210, 212, 212, 212,
1005
+ 214, 214, 214, 352, 289, 194, 297, 211, 289, 214,
1006
+ 297, 212, 290, 314, 214, 216, 216, 216, 206, 235,
1007
+ 235, 235, 290, 202, 216, 312, 309, 362, 211, 216,
1008
+ 208, 210, 305, 235, 210, 372, 305, 217, 217, 217,
1009
+ 313, 218, 218, 218, 313, 211, 217, 308, 304, 212,
1010
+
1011
+ 218, 217, 214, 295, 290, 218, 226, 226, 226, 233,
1012
+ 233, 233, 301, 295, 216, 300, 239, 239, 239, 362,
1013
+ 226, 235, 217, 233, 296, 226, 226, 372, 233, 233,
1014
+ 239, 293, 240, 240, 240, 241, 241, 241, 243, 243,
1015
+ 243, 292, 247, 247, 247, 295, 240, 243, 288, 241,
1016
+ 378, 247, 243, 381, 378, 239, 247, 381, 226, 286,
1017
+ 285, 233, 248, 248, 248, 249, 249, 249, 239, 240,
1018
+ 298, 248, 283, 291, 249, 278, 248, 291, 386, 249,
1019
+ 298, 247, 386, 291, 240, 391, 276, 241, 269, 391,
1020
+ 243, 263, 263, 263, 271, 271, 271, 267, 265, 248,
1021
+
1022
+ 272, 272, 272, 299, 261, 263, 259, 299, 271, 257,
1023
+ 263, 263, 298, 299, 272, 291, 255, 249, 273, 273,
1024
+ 273, 280, 280, 280, 281, 281, 281, 282, 282, 282,
1025
+ 280, 254, 273, 281, 303, 280, 282, 251, 281, 272,
1026
+ 306, 282, 250, 263, 303, 299, 271, 287, 287, 287,
1027
+ 306, 246, 272, 294, 294, 294, 307, 302, 302, 302,
1028
+ 307, 287, 244, 281, 242, 311, 307, 294, 318, 238,
1029
+ 273, 302, 310, 310, 310, 311, 303, 323, 318, 282,
1030
+ 324, 310, 306, 234, 324, 327, 310, 323, 230, 228,
1031
+ 324, 225, 321, 321, 321, 327, 224, 294, 307, 330,
1032
+
1033
+ 330, 330, 223, 222, 332, 336, 321, 311, 341, 302,
1034
+ 318, 321, 321, 330, 332, 336, 333, 221, 341, 323,
1035
+ 333, 349, 324, 339, 339, 339, 333, 327, 356, 342,
1036
+ 359, 349, 339, 342, 351, 351, 351, 339, 356, 342,
1037
+ 359, 361, 361, 361, 321, 219, 332, 336, 351, 365,
1038
+ 341, 330, 368, 351, 351, 361, 215, 374, 333, 365,
1039
+ 213, 209, 368, 349, 370, 370, 370, 374, 207, 379,
1040
+ 356, 342, 359, 370, 203, 339, 201, 382, 370, 379,
1041
+ 384, 200, 387, 198, 197, 389, 351, 382, 392, 196,
1042
+ 384, 365, 387, 361, 368, 389, 395, 396, 392, 374,
1043
+
1044
+ 399, 396, 403, 408, 400, 404, 395, 396, 400, 404,
1045
+ 399, 379, 403, 408, 400, 404, 370, 195, 411, 382,
1046
+ 190, 414, 384, 417, 387, 419, 421, 389, 411, 185,
1047
+ 392, 414, 180, 417, 179, 419, 421, 178, 395, 396,
1048
+ 177, 176, 399, 174, 403, 408, 400, 404, 168, 162,
1049
+ 156, 154, 153, 152, 151, 150, 147, 143, 137, 132,
1050
+ 411, 127, 125, 414, 124, 417, 123, 419, 421, 424,
1051
+ 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
1052
+ 424, 424, 424, 424, 425, 425, 425, 425, 122, 425,
1053
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 426,
1054
+
1055
+ 426, 121, 116, 426, 426, 426, 426, 427, 427, 113,
1056
+ 112, 101, 92, 88, 84, 83, 427, 427, 427, 427,
1057
+ 428, 428, 80, 76, 75, 428, 428, 428, 428, 428,
1058
+ 428, 428, 428, 428, 429, 429, 74, 73, 71, 429,
1059
+ 429, 70, 61, 429, 429, 429, 429, 429, 430, 430,
1060
+ 58, 57, 430, 430, 430, 33, 32, 430, 430, 430,
1061
+ 430, 431, 431, 431, 31, 431, 30, 29, 26, 18,
1062
+ 17, 431, 431, 432, 432, 432, 432, 432, 432, 432,
1063
+ 432, 432, 432, 432, 432, 432, 432, 432, 433, 433,
1064
+ 15, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1065
+
1066
+ 433, 433, 433, 434, 434, 13, 9, 434, 0, 0,
1067
+ 434, 435, 435, 0, 0, 435, 435, 435, 435, 436,
1068
+ 436, 0, 0, 436, 0, 0, 436, 437, 437, 0,
1069
+ 0, 437, 0, 0, 437, 438, 438, 438, 438, 438,
1070
+ 438, 438, 438, 438, 438, 438, 438, 438, 438, 438,
1071
+ 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
1072
+ 439, 439, 439, 439, 439, 440, 440, 440, 440, 440,
1073
+ 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
1074
+ 441, 441, 441, 441, 441, 441, 441, 441, 441, 441,
1075
+ 441, 441, 441, 441, 441, 442, 442, 442, 442, 442,
1076
+
1077
+ 442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
1078
+ 443, 443, 0, 0, 443, 0, 0, 443, 444, 444,
1079
+ 444, 444, 444, 444, 444, 444, 444, 444, 444, 444,
1080
+ 444, 444, 444, 445, 445, 445, 445, 445, 445, 445,
1081
+ 445, 445, 445, 445, 445, 445, 445, 445, 446, 446,
1082
+ 446, 446, 446, 446, 446, 446, 446, 446, 446, 446,
1083
+ 446, 446, 446, 447, 447, 447, 447, 447, 447, 447,
1084
+ 447, 447, 447, 447, 447, 447, 447, 447, 448, 448,
1085
+ 448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
1086
+ 448, 448, 448, 449, 449, 449, 449, 449, 449, 449,
1087
+
1088
+ 449, 449, 449, 449, 449, 449, 449, 449, 450, 450,
1089
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1090
+ 450, 450, 450, 451, 451, 451, 451, 451, 451, 451,
1091
+ 451, 451, 451, 451, 451, 451, 451, 451, 452, 452,
1092
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
1093
+ 452, 452, 452, 453, 453, 453, 453, 453, 453, 453,
1094
+ 453, 453, 0, 453, 453, 453, 453, 453, 454, 454,
1095
+ 454, 454, 454, 454, 454, 454, 454, 454, 454, 454,
1096
+ 454, 454, 454, 455, 455, 455, 455, 455, 455, 455,
1097
+ 455, 455, 0, 455, 455, 455, 455, 455, 456, 456,
1098
+
1099
+ 456, 456, 456, 456, 456, 456, 456, 456, 456, 456,
1100
+ 456, 456, 456, 457, 457, 457, 457, 457, 457, 457,
1101
+ 457, 457, 457, 457, 457, 457, 457, 457, 458, 458,
1102
+ 458, 458, 458, 458, 458, 458, 458, 458, 458, 458,
1103
+ 458, 458, 458, 459, 459, 459, 459, 459, 459, 459,
1104
+ 459, 459, 459, 459, 459, 459, 459, 459, 460, 460,
1105
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
1106
+ 460, 460, 460, 461, 461, 461, 461, 461, 461, 461,
1107
+ 461, 461, 461, 461, 461, 461, 461, 461, 462, 462,
1108
+ 462, 462, 462, 462, 462, 462, 462, 462, 462, 462,
1109
+
1110
+ 462, 462, 462, 463, 463, 463, 463, 463, 463, 463,
1111
+ 463, 463, 463, 463, 463, 463, 463, 463, 464, 464,
1112
+ 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
1113
+ 464, 464, 464, 465, 465, 465, 465, 465, 465, 465,
1114
+ 465, 465, 465, 465, 465, 465, 465, 465, 466, 466,
1115
+ 466, 466, 466, 466, 466, 466, 466, 466, 466, 466,
1116
+ 466, 466, 466, 467, 467, 467, 467, 467, 467, 467,
1117
+ 467, 467, 467, 467, 467, 467, 467, 467, 468, 468,
1118
+ 468, 468, 468, 468, 468, 468, 468, 468, 468, 468,
1119
+ 468, 468, 468, 469, 469, 469, 469, 469, 469, 469,
1120
+
1121
+ 469, 469, 469, 469, 469, 469, 469, 469, 470, 470,
1122
+ 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
1123
+ 470, 470, 470, 471, 471, 471, 471, 471, 471, 471,
1124
+ 471, 471, 471, 471, 471, 471, 471, 471, 472, 472,
1125
+ 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
1126
+ 472, 472, 472, 473, 473, 473, 473, 473, 473, 473,
1127
+ 473, 473, 473, 473, 473, 473, 473, 473, 474, 474,
1128
+ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
1129
+ 474, 474, 474, 475, 475, 475, 475, 475, 475, 475,
1130
+ 475, 475, 475, 475, 475, 475, 475, 475, 476, 476,
1131
+
1132
+ 476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
1133
+ 476, 476, 476, 477, 477, 477, 477, 477, 477, 477,
1134
+ 477, 477, 477, 477, 477, 477, 477, 477, 478, 478,
1135
+ 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
1136
+ 478, 478, 478, 479, 479, 479, 479, 479, 479, 479,
1137
+ 479, 479, 479, 479, 479, 479, 479, 479, 480, 480,
1138
+ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
1139
+ 480, 480, 480, 481, 481, 481, 481, 481, 481, 481,
1140
+ 481, 481, 481, 481, 481, 481, 481, 481, 482, 482,
1141
+ 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
1142
+
1143
+ 482, 482, 482, 483, 483, 483, 483, 483, 483, 483,
1144
+ 483, 483, 483, 483, 483, 483, 483, 483, 484, 484,
1145
+ 484, 484, 484, 484, 484, 484, 484, 484, 484, 484,
1146
+ 484, 484, 484, 485, 485, 485, 485, 485, 485, 485,
1147
+ 485, 485, 485, 485, 485, 485, 485, 485, 486, 486,
1148
+ 486, 486, 486, 486, 486, 486, 486, 0, 486, 486,
1149
+ 486, 486, 486, 487, 487, 487, 487, 487, 487, 487,
1150
+ 487, 487, 487, 487, 487, 487, 487, 487, 488, 488,
1151
+ 488, 488, 488, 488, 488, 488, 488, 488, 488, 488,
1152
+ 488, 488, 488, 489, 489, 489, 489, 489, 489, 489,
1153
+
1154
+ 489, 489, 489, 489, 489, 489, 489, 489, 490, 490,
1155
+ 490, 490, 490, 490, 490, 490, 490, 490, 490, 490,
1156
+ 490, 490, 490, 491, 491, 491, 491, 491, 491, 491,
1157
+ 491, 491, 491, 491, 491, 491, 491, 491, 492, 492,
1158
+ 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
1159
+ 492, 492, 492, 493, 493, 493, 493, 493, 493, 493,
1160
+ 493, 493, 493, 493, 493, 493, 493, 493, 494, 494,
1161
+ 494, 494, 494, 494, 494, 494, 494, 494, 494, 494,
1162
+ 494, 494, 494, 495, 495, 495, 495, 495, 495, 495,
1163
+ 495, 495, 495, 495, 495, 495, 495, 495, 496, 496,
1164
+
1165
+ 496, 496, 496, 496, 496, 496, 496, 496, 496, 496,
1166
+ 496, 496, 496, 497, 497, 497, 497, 497, 497, 497,
1167
+ 497, 497, 497, 497, 497, 497, 497, 497, 498, 498,
1168
+ 498, 498, 498, 498, 498, 498, 498, 498, 498, 498,
1169
+ 498, 498, 498, 499, 499, 499, 499, 499, 499, 499,
1170
+ 499, 499, 499, 499, 499, 499, 499, 499, 500, 500,
1171
+ 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,
1172
+ 500, 500, 500, 501, 501, 501, 501, 501, 501, 501,
1173
+ 501, 501, 501, 501, 501, 501, 501, 501, 502, 502,
1174
+ 502, 502, 502, 502, 502, 502, 502, 502, 502, 502,
1175
+
1176
+ 502, 502, 502, 503, 503, 503, 503, 503, 503, 503,
1177
+ 503, 503, 503, 503, 503, 503, 503, 503, 504, 504,
1178
+ 504, 504, 504, 504, 504, 504, 504, 504, 504, 504,
1179
+ 504, 504, 504, 505, 505, 505, 505, 505, 505, 505,
1180
+ 505, 505, 505, 505, 505, 505, 505, 505, 506, 506,
1181
+ 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
1182
+ 506, 506, 506, 507, 507, 507, 507, 507, 507, 507,
1183
+ 507, 507, 507, 507, 507, 507, 507, 507, 508, 508,
1184
+ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
1185
+ 508, 508, 508, 509, 509, 509, 509, 509, 509, 509,
1186
+
1187
+ 509, 509, 509, 509, 509, 509, 509, 509, 510, 510,
1188
+ 510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
1189
+ 510, 510, 510, 511, 511, 511, 511, 511, 511, 511,
1190
+ 511, 511, 511, 511, 511, 511, 511, 511, 512, 512,
1191
+ 512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
1192
+ 512, 512, 512, 513, 513, 513, 513, 513, 513, 513,
1193
+ 513, 513, 513, 513, 513, 513, 513, 513, 514, 514,
1194
+ 514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
1195
+ 514, 514, 514, 515, 515, 515, 515, 515, 515, 515,
1196
+ 515, 515, 515, 515, 515, 515, 515, 515, 516, 516,
1197
+
1198
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
1199
+ 516, 516, 516, 517, 517, 517, 517, 517, 517, 517,
1200
+ 517, 517, 517, 517, 517, 517, 517, 517, 518, 518,
1201
+ 518, 518, 518, 518, 518, 518, 518, 518, 518, 518,
1202
+ 518, 518, 518, 519, 519, 519, 519, 519, 519, 519,
1203
+ 519, 519, 519, 519, 519, 519, 519, 519, 520, 520,
1204
+ 520, 520, 520, 520, 520, 520, 520, 520, 520, 520,
1205
+ 520, 520, 520, 521, 521, 521, 521, 521, 521, 521,
1206
+ 521, 521, 521, 521, 521, 521, 521, 521, 522, 522,
1207
+ 522, 522, 522, 522, 522, 522, 522, 522, 522, 522,
1208
+
1209
+ 522, 522, 522, 523, 523, 523, 523, 523, 523, 523,
1210
+ 523, 523, 523, 523, 523, 523, 523, 523, 423, 423,
1211
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
1212
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
1213
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
1214
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
1215
+ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
1216
+ 423, 423, 423, 423
1217
+ } ;
1218
+
1219
+ #define YY_TRAILING_MASK 0x2000
1220
+ #define YY_TRAILING_HEAD_MASK 0x4000
1221
+ #define REJECT \
1222
+ { \
1223
+ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
1224
+ yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
1225
+ yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
1226
+ yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
1227
+ yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
1228
+ ++yyg->yy_lp; \
1229
+ goto find_rule; \
1230
+ }
1231
+
1232
+ #define yymore() yymore_used_but_not_detected
1233
+ #define YY_MORE_ADJ 0
1234
+ #define YY_RESTORE_YY_MORE_OFFSET
1235
+ /*
1236
+ * java.l - a lex rule for C#
1237
+ *
1238
+ * Copyright (C) 2005 Kenichi Ishibashi <bashi at dream.ie.ariake-nct.ac.jp>
1239
+ * All rights reserved.
1240
+ * This is free software with ABSOLUTELY NO WARRANTY.
1241
+ *
1242
+ * You can redistribute it and/or modify it under the terms of
1243
+ * the GNU General Public License version 2.
1244
+ */
1245
+
1246
+ #include "csharp.h"
1247
+
1248
+ #define YY_EXTRA_TYPE langscan_csharp_lex_extra_t *
1249
+
1250
+ #if YY_NULL != 0
1251
+ #error "YY_NULL is not 0."
1252
+ #endif
1253
+
1254
+ #define YY_DECL langscan_csharp_token_t langscan_csharp_lex_lex(yyscan_t yyscanner)
1255
+
1256
+ #define YY_INPUT(buf,result,max_size) \
1257
+ if (!yyextra->eof) { \
1258
+ result = yyextra->user_read(&(yyextra->user_data), (buf), (max_size)); \
1259
+ if (result == 0) \
1260
+ yyextra->eof = 1; \
1261
+ }
1262
+
1263
+ #define UPD update_pos(yyextra, yytext, yyleng)
1264
+ static void update_pos(langscan_csharp_lex_extra_t *, char *, int);
1265
+
1266
+ #define report(token) \
1267
+ do { \
1268
+ yyextra->text = yytext; \
1269
+ yyextra->leng = yyleng; \
1270
+ return langscan_csharp_##token; \
1271
+ } while (0)
1272
+
1273
+ static int ident_length(unsigned char *ptr, int max);
1274
+
1275
+ #define INITIAL 0
1276
+ #define CLASSHEAD 1
1277
+ #define CLASSHEAD_TRAILER 2
1278
+ #define DELEGATE 3
1279
+
1280
+ #ifndef YY_NO_UNISTD_H
1281
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
1282
+ * down here because we want the user's section 1 to have been scanned first.
1283
+ * The user has a chance to override it with an option.
1284
+ */
1285
+ #include <unistd.h>
1286
+ #endif
1287
+
1288
+ #ifndef YY_EXTRA_TYPE
1289
+ #define YY_EXTRA_TYPE void *
1290
+ #endif
1291
+
1292
+ /* Holds the entire state of the reentrant scanner. */
1293
+ struct yyguts_t
1294
+ {
1295
+
1296
+ /* User-defined. Not touched by flex. */
1297
+ YY_EXTRA_TYPE yyextra_r;
1298
+
1299
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
1300
+ FILE *yyin_r, *yyout_r;
1301
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
1302
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
1303
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1304
+ char yy_hold_char;
1305
+ yy_size_t yy_n_chars;
1306
+ yy_size_t yyleng_r;
1307
+ char *yy_c_buf_p;
1308
+ int yy_init;
1309
+ int yy_start;
1310
+ int yy_did_buffer_switch_on_eof;
1311
+ int yy_start_stack_ptr;
1312
+ int yy_start_stack_depth;
1313
+ int *yy_start_stack;
1314
+ yy_state_type yy_last_accepting_state;
1315
+ char* yy_last_accepting_cpos;
1316
+
1317
+ int yylineno_r;
1318
+ int yy_flex_debug_r;
1319
+
1320
+ yy_state_type *yy_state_buf;
1321
+ yy_state_type *yy_state_ptr;
1322
+ char *yy_full_match;
1323
+ int yy_lp;
1324
+
1325
+ /* These are only needed for trailing context rules,
1326
+ * but there's no conditional variable for that yet. */
1327
+ int yy_looking_for_trail_begin;
1328
+ int yy_full_lp;
1329
+ int *yy_full_state;
1330
+
1331
+ char *yytext_r;
1332
+ int yy_more_flag;
1333
+ int yy_more_len;
1334
+
1335
+ }; /* end struct yyguts_t */
1336
+
1337
+ static int yy_init_globals (yyscan_t yyscanner );
1338
+
1339
+ int langscan_csharp_lex_lex_init (yyscan_t* scanner);
1340
+
1341
+ int langscan_csharp_lex_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
1342
+
1343
+ /* Accessor methods to globals.
1344
+ These are made visible to non-reentrant scanners for convenience. */
1345
+
1346
+ int langscan_csharp_lex_lex_destroy (yyscan_t yyscanner );
1347
+
1348
+ int langscan_csharp_lex_get_debug (yyscan_t yyscanner );
1349
+
1350
+ void langscan_csharp_lex_set_debug (int debug_flag ,yyscan_t yyscanner );
1351
+
1352
+ YY_EXTRA_TYPE langscan_csharp_lex_get_extra (yyscan_t yyscanner );
1353
+
1354
+ void langscan_csharp_lex_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1355
+
1356
+ FILE *langscan_csharp_lex_get_in (yyscan_t yyscanner );
1357
+
1358
+ void langscan_csharp_lex_set_in (FILE * in_str ,yyscan_t yyscanner );
1359
+
1360
+ FILE *langscan_csharp_lex_get_out (yyscan_t yyscanner );
1361
+
1362
+ void langscan_csharp_lex_set_out (FILE * out_str ,yyscan_t yyscanner );
1363
+
1364
+ yy_size_t langscan_csharp_lex_get_leng (yyscan_t yyscanner );
1365
+
1366
+ char *langscan_csharp_lex_get_text (yyscan_t yyscanner );
1367
+
1368
+ int langscan_csharp_lex_get_lineno (yyscan_t yyscanner );
1369
+
1370
+ void langscan_csharp_lex_set_lineno (int line_number ,yyscan_t yyscanner );
1371
+
1372
+ /* Macros after this point can all be overridden by user definitions in
1373
+ * section 1.
1374
+ */
1375
+
1376
+ #ifndef YY_SKIP_YYWRAP
1377
+ #ifdef __cplusplus
1378
+ extern "C" int langscan_csharp_lex_wrap (yyscan_t yyscanner );
1379
+ #else
1380
+ extern int langscan_csharp_lex_wrap (yyscan_t yyscanner );
1381
+ #endif
1382
+ #endif
1383
+
1384
+ static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
1385
+
1386
+ #ifndef yytext_ptr
1387
+ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1388
+ #endif
1389
+
1390
+ #ifdef YY_NEED_STRLEN
1391
+ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1392
+ #endif
1393
+
1394
+ #ifndef YY_NO_INPUT
1395
+
1396
+ #ifdef __cplusplus
1397
+ static int yyinput (yyscan_t yyscanner );
1398
+ #else
1399
+ static int input (yyscan_t yyscanner );
1400
+ #endif
1401
+
1402
+ #endif
1403
+
1404
+ /* Amount of stuff to slurp up with each read. */
1405
+ #ifndef YY_READ_BUF_SIZE
1406
+ #define YY_READ_BUF_SIZE 8192
1407
+ #endif
1408
+
1409
+ /* Copy whatever the last rule matched to the standard output. */
1410
+ #ifndef ECHO
1411
+ /* This used to be an fputs(), but since the string might contain NUL's,
1412
+ * we now use fwrite().
1413
+ */
1414
+ #define ECHO fwrite( yytext, yyleng, 1, yyout )
1415
+ #endif
1416
+
1417
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1418
+ * is returned in "result".
1419
+ */
1420
+ #ifndef YY_INPUT
1421
+ #define YY_INPUT(buf,result,max_size) \
1422
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1423
+ { \
1424
+ int c = '*'; \
1425
+ yy_size_t n; \
1426
+ for ( n = 0; n < max_size && \
1427
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1428
+ buf[n] = (char) c; \
1429
+ if ( c == '\n' ) \
1430
+ buf[n++] = (char) c; \
1431
+ if ( c == EOF && ferror( yyin ) ) \
1432
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
1433
+ result = n; \
1434
+ } \
1435
+ else \
1436
+ { \
1437
+ errno=0; \
1438
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1439
+ { \
1440
+ if( errno != EINTR) \
1441
+ { \
1442
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
1443
+ break; \
1444
+ } \
1445
+ errno=0; \
1446
+ clearerr(yyin); \
1447
+ } \
1448
+ }\
1449
+ \
1450
+
1451
+ #endif
1452
+
1453
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
1454
+ * we don't want an extra ';' after the "return" because that will cause
1455
+ * some compilers to complain about unreachable statements.
1456
+ */
1457
+ #ifndef yyterminate
1458
+ #define yyterminate() return YY_NULL
1459
+ #endif
1460
+
1461
+ /* Number of entries by which start-condition stack grows. */
1462
+ #ifndef YY_START_STACK_INCR
1463
+ #define YY_START_STACK_INCR 25
1464
+ #endif
1465
+
1466
+ /* Report a fatal error. */
1467
+ #ifndef YY_FATAL_ERROR
1468
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1469
+ #endif
1470
+
1471
+ /* end tables serialization structures and prototypes */
1472
+
1473
+ /* Default declaration of generated scanner - a define so the user can
1474
+ * easily add parameters.
1475
+ */
1476
+ #ifndef YY_DECL
1477
+ #define YY_DECL_IS_OURS 1
1478
+
1479
+ extern int langscan_csharp_lex_lex (yyscan_t yyscanner);
1480
+
1481
+ #define YY_DECL int langscan_csharp_lex_lex (yyscan_t yyscanner)
1482
+ #endif /* !YY_DECL */
1483
+
1484
+ /* Code executed at the beginning of each rule, after yytext and yyleng
1485
+ * have been set up.
1486
+ */
1487
+ #ifndef YY_USER_ACTION
1488
+ #define YY_USER_ACTION
1489
+ #endif
1490
+
1491
+ /* Code executed at the end of each rule. */
1492
+ #ifndef YY_BREAK
1493
+ #define YY_BREAK break;
1494
+ #endif
1495
+
1496
+ #define YY_RULE_SETUP \
1497
+ if ( yyleng > 0 ) \
1498
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1499
+ (yytext[yyleng - 1] == '\n'); \
1500
+ YY_USER_ACTION
1501
+
1502
+ /** The main scanner function which does all the work.
1503
+ */
1504
+ YY_DECL
1505
+ {
1506
+ register yy_state_type yy_current_state;
1507
+ register char *yy_cp, *yy_bp;
1508
+ register int yy_act;
1509
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1510
+
1511
+ if ( !yyg->yy_init )
1512
+ {
1513
+ yyg->yy_init = 1;
1514
+
1515
+ #ifdef YY_USER_INIT
1516
+ YY_USER_INIT;
1517
+ #endif
1518
+
1519
+ /* Create the reject buffer large enough to save one state per allowed character. */
1520
+ if ( ! yyg->yy_state_buf )
1521
+ yyg->yy_state_buf = (yy_state_type *)langscan_csharp_lex_alloc(YY_STATE_BUF_SIZE ,yyscanner);
1522
+ if ( ! yyg->yy_state_buf )
1523
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex_lex()" );
1524
+
1525
+ if ( ! yyg->yy_start )
1526
+ yyg->yy_start = 1; /* first start state */
1527
+
1528
+ if ( ! yyin )
1529
+ yyin = stdin;
1530
+
1531
+ if ( ! yyout )
1532
+ yyout = stdout;
1533
+
1534
+ if ( ! YY_CURRENT_BUFFER ) {
1535
+ langscan_csharp_lex_ensure_buffer_stack (yyscanner);
1536
+ YY_CURRENT_BUFFER_LVALUE =
1537
+ langscan_csharp_lex__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1538
+ }
1539
+
1540
+ langscan_csharp_lex__load_buffer_state(yyscanner );
1541
+ }
1542
+
1543
+ while ( 1 ) /* loops until end-of-file is reached */
1544
+ {
1545
+ yy_cp = yyg->yy_c_buf_p;
1546
+
1547
+ /* Support of yytext. */
1548
+ *yy_cp = yyg->yy_hold_char;
1549
+
1550
+ /* yy_bp points to the position in yy_ch_buf of the start of
1551
+ * the current run.
1552
+ */
1553
+ yy_bp = yy_cp;
1554
+
1555
+ yy_current_state = yyg->yy_start;
1556
+ yy_current_state += YY_AT_BOL();
1557
+
1558
+ yyg->yy_state_ptr = yyg->yy_state_buf;
1559
+ *yyg->yy_state_ptr++ = yy_current_state;
1560
+
1561
+ yy_match:
1562
+ do
1563
+ {
1564
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1565
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1566
+ {
1567
+ yy_current_state = (int) yy_def[yy_current_state];
1568
+ if ( yy_current_state >= 424 )
1569
+ yy_c = yy_meta[(unsigned int) yy_c];
1570
+ }
1571
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1572
+ *yyg->yy_state_ptr++ = yy_current_state;
1573
+ ++yy_cp;
1574
+ }
1575
+ while ( yy_base[yy_current_state] != 2619 );
1576
+
1577
+ yy_find_action:
1578
+ yy_current_state = *--yyg->yy_state_ptr;
1579
+ yyg->yy_lp = yy_accept[yy_current_state];
1580
+ goto find_rule; /* Shut up GCC warning -Wall */
1581
+ find_rule: /* we branch to this label when backing up */
1582
+ for ( ; ; ) /* until we find what rule we matched */
1583
+ {
1584
+ if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
1585
+ {
1586
+ yy_act = yy_acclist[yyg->yy_lp];
1587
+ if ( yy_act & YY_TRAILING_HEAD_MASK ||
1588
+ yyg->yy_looking_for_trail_begin )
1589
+ {
1590
+ if ( yy_act == yyg->yy_looking_for_trail_begin )
1591
+ {
1592
+ yyg->yy_looking_for_trail_begin = 0;
1593
+ yy_act &= ~YY_TRAILING_HEAD_MASK;
1594
+ break;
1595
+ }
1596
+ }
1597
+ else if ( yy_act & YY_TRAILING_MASK )
1598
+ {
1599
+ yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
1600
+ yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
1601
+ }
1602
+ else
1603
+ {
1604
+ yyg->yy_full_match = yy_cp;
1605
+ yyg->yy_full_state = yyg->yy_state_ptr;
1606
+ yyg->yy_full_lp = yyg->yy_lp;
1607
+ break;
1608
+ }
1609
+ ++yyg->yy_lp;
1610
+ goto find_rule;
1611
+ }
1612
+ --yy_cp;
1613
+ yy_current_state = *--yyg->yy_state_ptr;
1614
+ yyg->yy_lp = yy_accept[yy_current_state];
1615
+ }
1616
+
1617
+ YY_DO_BEFORE_ACTION;
1618
+
1619
+ do_action: /* This label is used only to access EOF actions. */
1620
+
1621
+ switch ( yy_act )
1622
+ { /* beginning of action switch */
1623
+ case 1:
1624
+ /* rule 1 can match eol */
1625
+ YY_RULE_SETUP
1626
+ { UPD; report(preproc); }
1627
+ YY_BREAK
1628
+ case 2:
1629
+ /* rule 2 can match eol */
1630
+ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1631
+ yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
1632
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1633
+ YY_RULE_SETUP
1634
+ { UPD; BEGIN(CLASSHEAD); report(ident); }
1635
+ YY_BREAK
1636
+ case 3:
1637
+ /* rule 3 can match eol */
1638
+ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1639
+ yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
1640
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1641
+ YY_RULE_SETUP
1642
+ { UPD; BEGIN(CLASSHEAD); report(ident); }
1643
+ YY_BREAK
1644
+ case 4:
1645
+ /* rule 4 can match eol */
1646
+ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1647
+ yyg->yy_c_buf_p = yy_cp = yy_bp + 9;
1648
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1649
+ YY_RULE_SETUP
1650
+ { UPD; BEGIN(CLASSHEAD); report(ident); }
1651
+ YY_BREAK
1652
+ case 5:
1653
+ /* rule 5 can match eol */
1654
+ YY_RULE_SETUP
1655
+ {
1656
+ yyless(ident_length(yytext, yyleng));
1657
+ UPD; BEGIN(CLASSHEAD_TRAILER);
1658
+ report(classdef);
1659
+ }
1660
+ YY_BREAK
1661
+ case 6:
1662
+ /* rule 6 can match eol */
1663
+ YY_RULE_SETUP
1664
+ { UPD; report(classref); }
1665
+ YY_BREAK
1666
+ case 7:
1667
+ YY_RULE_SETUP
1668
+ { UPD; BEGIN(INITIAL); report(punct); }
1669
+ YY_BREAK
1670
+ case 8:
1671
+ YY_RULE_SETUP
1672
+ { UPD; BEGIN(DELEGATE); report(ident); }
1673
+ YY_BREAK
1674
+ case 9:
1675
+ /* rule 9 can match eol */
1676
+ YY_RULE_SETUP
1677
+ {UPD; BEGIN(INITIAL); report(delegate); }
1678
+ YY_BREAK
1679
+ case 10:
1680
+ YY_RULE_SETUP
1681
+ { UPD; report(space); }
1682
+ YY_BREAK
1683
+ case 11:
1684
+ /* rule 11 can match eol */
1685
+ YY_RULE_SETUP
1686
+ { UPD; report(space); }
1687
+ YY_BREAK
1688
+ case 12:
1689
+ YY_RULE_SETUP
1690
+ { UPD; report(comment); }
1691
+ YY_BREAK
1692
+ case 13:
1693
+ /* rule 13 can match eol */
1694
+ YY_RULE_SETUP
1695
+ { UPD; report(comment); }
1696
+ YY_BREAK
1697
+ case 14:
1698
+ /* rule 14 can match eol */
1699
+ YY_RULE_SETUP
1700
+ { UPD; report(string); }
1701
+ YY_BREAK
1702
+ case 15:
1703
+ /* rule 15 can match eol */
1704
+ YY_RULE_SETUP
1705
+ { UPD; report(character); }
1706
+ YY_BREAK
1707
+ case 16:
1708
+ YY_RULE_SETUP
1709
+ { UPD; report(ident); }
1710
+ YY_BREAK
1711
+ case 17:
1712
+ YY_RULE_SETUP
1713
+ { UPD; report(integer); }
1714
+ YY_BREAK
1715
+ case 18:
1716
+ YY_RULE_SETUP
1717
+ { UPD; report(integer); }
1718
+ YY_BREAK
1719
+ case 19:
1720
+ YY_RULE_SETUP
1721
+ { UPD; report(integer); }
1722
+ YY_BREAK
1723
+ case 20:
1724
+ YY_RULE_SETUP
1725
+ { UPD; report(floating); }
1726
+ YY_BREAK
1727
+ case 21:
1728
+ YY_RULE_SETUP
1729
+ { UPD; report(punct); }
1730
+ YY_BREAK
1731
+ case 22:
1732
+ YY_RULE_SETUP
1733
+ YY_FATAL_ERROR( "flex scanner jammed" );
1734
+ YY_BREAK
1735
+ case YY_STATE_EOF(INITIAL):
1736
+ case YY_STATE_EOF(CLASSHEAD):
1737
+ case YY_STATE_EOF(CLASSHEAD_TRAILER):
1738
+ case YY_STATE_EOF(DELEGATE):
1739
+ yyterminate();
1740
+
1741
+ case YY_END_OF_BUFFER:
1742
+ {
1743
+ /* Amount of text matched not including the EOB char. */
1744
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1745
+
1746
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1747
+ *yy_cp = yyg->yy_hold_char;
1748
+ YY_RESTORE_YY_MORE_OFFSET
1749
+
1750
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1751
+ {
1752
+ /* We're scanning a new file or input source. It's
1753
+ * possible that this happened because the user
1754
+ * just pointed yyin at a new source and called
1755
+ * langscan_csharp_lex_lex(). If so, then we have to assure
1756
+ * consistency between YY_CURRENT_BUFFER and our
1757
+ * globals. Here is the right place to do so, because
1758
+ * this is the first action (other than possibly a
1759
+ * back-up) that will match for the new input source.
1760
+ */
1761
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1762
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1763
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1764
+ }
1765
+
1766
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1767
+ * of the first EOB in the buffer, since yy_c_buf_p will
1768
+ * already have been incremented past the NUL character
1769
+ * (since all states make transitions on EOB to the
1770
+ * end-of-buffer state). Contrast this with the test
1771
+ * in input().
1772
+ */
1773
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1774
+ { /* This was really a NUL. */
1775
+ yy_state_type yy_next_state;
1776
+
1777
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1778
+
1779
+ yy_current_state = yy_get_previous_state( yyscanner );
1780
+
1781
+ /* Okay, we're now positioned to make the NUL
1782
+ * transition. We couldn't have
1783
+ * yy_get_previous_state() go ahead and do it
1784
+ * for us because it doesn't know how to deal
1785
+ * with the possibility of jamming (and we don't
1786
+ * want to build jamming into it because then it
1787
+ * will run more slowly).
1788
+ */
1789
+
1790
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1791
+
1792
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1793
+
1794
+ if ( yy_next_state )
1795
+ {
1796
+ /* Consume the NUL. */
1797
+ yy_cp = ++yyg->yy_c_buf_p;
1798
+ yy_current_state = yy_next_state;
1799
+ goto yy_match;
1800
+ }
1801
+
1802
+ else
1803
+ {
1804
+ yy_cp = yyg->yy_c_buf_p;
1805
+ goto yy_find_action;
1806
+ }
1807
+ }
1808
+
1809
+ else switch ( yy_get_next_buffer( yyscanner ) )
1810
+ {
1811
+ case EOB_ACT_END_OF_FILE:
1812
+ {
1813
+ yyg->yy_did_buffer_switch_on_eof = 0;
1814
+
1815
+ if ( langscan_csharp_lex_wrap(yyscanner ) )
1816
+ {
1817
+ /* Note: because we've taken care in
1818
+ * yy_get_next_buffer() to have set up
1819
+ * yytext, we can now set up
1820
+ * yy_c_buf_p so that if some total
1821
+ * hoser (like flex itself) wants to
1822
+ * call the scanner after we return the
1823
+ * YY_NULL, it'll still work - another
1824
+ * YY_NULL will get returned.
1825
+ */
1826
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1827
+
1828
+ yy_act = YY_STATE_EOF(YY_START);
1829
+ goto do_action;
1830
+ }
1831
+
1832
+ else
1833
+ {
1834
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1835
+ YY_NEW_FILE;
1836
+ }
1837
+ break;
1838
+ }
1839
+
1840
+ case EOB_ACT_CONTINUE_SCAN:
1841
+ yyg->yy_c_buf_p =
1842
+ yyg->yytext_ptr + yy_amount_of_matched_text;
1843
+
1844
+ yy_current_state = yy_get_previous_state( yyscanner );
1845
+
1846
+ yy_cp = yyg->yy_c_buf_p;
1847
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1848
+ goto yy_match;
1849
+
1850
+ case EOB_ACT_LAST_MATCH:
1851
+ yyg->yy_c_buf_p =
1852
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1853
+
1854
+ yy_current_state = yy_get_previous_state( yyscanner );
1855
+
1856
+ yy_cp = yyg->yy_c_buf_p;
1857
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1858
+ goto yy_find_action;
1859
+ }
1860
+ break;
1861
+ }
1862
+
1863
+ default:
1864
+ YY_FATAL_ERROR(
1865
+ "fatal flex scanner internal error--no action found" );
1866
+ } /* end of action switch */
1867
+ } /* end of scanning one token */
1868
+ } /* end of langscan_csharp_lex_lex */
1869
+
1870
+ /* yy_get_next_buffer - try to read in a new buffer
1871
+ *
1872
+ * Returns a code representing an action:
1873
+ * EOB_ACT_LAST_MATCH -
1874
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1875
+ * EOB_ACT_END_OF_FILE - end of file
1876
+ */
1877
+ static int yy_get_next_buffer (yyscan_t yyscanner)
1878
+ {
1879
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1880
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1881
+ register char *source = yyg->yytext_ptr;
1882
+ register int number_to_move, i;
1883
+ int ret_val;
1884
+
1885
+ if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1886
+ YY_FATAL_ERROR(
1887
+ "fatal flex scanner internal error--end of buffer missed" );
1888
+
1889
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1890
+ { /* Don't try to fill the buffer, so this is an EOF. */
1891
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1892
+ {
1893
+ /* We matched a single character, the EOB, so
1894
+ * treat this as a final EOF.
1895
+ */
1896
+ return EOB_ACT_END_OF_FILE;
1897
+ }
1898
+
1899
+ else
1900
+ {
1901
+ /* We matched some text prior to the EOB, first
1902
+ * process it.
1903
+ */
1904
+ return EOB_ACT_LAST_MATCH;
1905
+ }
1906
+ }
1907
+
1908
+ /* Try to read more data. */
1909
+
1910
+ /* First move last chars to start of buffer. */
1911
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1912
+
1913
+ for ( i = 0; i < number_to_move; ++i )
1914
+ *(dest++) = *(source++);
1915
+
1916
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1917
+ /* don't do the read, it's not guaranteed to return an EOF,
1918
+ * just force an EOF
1919
+ */
1920
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1921
+
1922
+ else
1923
+ {
1924
+ yy_size_t num_to_read =
1925
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1926
+
1927
+ while ( num_to_read <= 0 )
1928
+ { /* Not enough room in the buffer - grow it. */
1929
+
1930
+ YY_FATAL_ERROR(
1931
+ "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1932
+
1933
+ }
1934
+
1935
+ if ( num_to_read > YY_READ_BUF_SIZE )
1936
+ num_to_read = YY_READ_BUF_SIZE;
1937
+
1938
+ /* Read in more data. */
1939
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1940
+ yyg->yy_n_chars, num_to_read );
1941
+
1942
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1943
+ }
1944
+
1945
+ if ( yyg->yy_n_chars == 0 )
1946
+ {
1947
+ if ( number_to_move == YY_MORE_ADJ )
1948
+ {
1949
+ ret_val = EOB_ACT_END_OF_FILE;
1950
+ langscan_csharp_lex_restart(yyin ,yyscanner);
1951
+ }
1952
+
1953
+ else
1954
+ {
1955
+ ret_val = EOB_ACT_LAST_MATCH;
1956
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1957
+ YY_BUFFER_EOF_PENDING;
1958
+ }
1959
+ }
1960
+
1961
+ else
1962
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1963
+
1964
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1965
+ /* Extend the array by 50%, plus the number we really need. */
1966
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1967
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) langscan_csharp_lex_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1968
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1969
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1970
+ }
1971
+
1972
+ yyg->yy_n_chars += number_to_move;
1973
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1974
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1975
+
1976
+ yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1977
+
1978
+ return ret_val;
1979
+ }
1980
+
1981
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1982
+
1983
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1984
+ {
1985
+ register yy_state_type yy_current_state;
1986
+ register char *yy_cp;
1987
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1988
+
1989
+ yy_current_state = yyg->yy_start;
1990
+ yy_current_state += YY_AT_BOL();
1991
+
1992
+ yyg->yy_state_ptr = yyg->yy_state_buf;
1993
+ *yyg->yy_state_ptr++ = yy_current_state;
1994
+
1995
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1996
+ {
1997
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1998
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1999
+ {
2000
+ yy_current_state = (int) yy_def[yy_current_state];
2001
+ if ( yy_current_state >= 424 )
2002
+ yy_c = yy_meta[(unsigned int) yy_c];
2003
+ }
2004
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2005
+ *yyg->yy_state_ptr++ = yy_current_state;
2006
+ }
2007
+
2008
+ return yy_current_state;
2009
+ }
2010
+
2011
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
2012
+ *
2013
+ * synopsis
2014
+ * next_state = yy_try_NUL_trans( current_state );
2015
+ */
2016
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2017
+ {
2018
+ register int yy_is_jam;
2019
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2020
+
2021
+ register YY_CHAR yy_c = 1;
2022
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2023
+ {
2024
+ yy_current_state = (int) yy_def[yy_current_state];
2025
+ if ( yy_current_state >= 424 )
2026
+ yy_c = yy_meta[(unsigned int) yy_c];
2027
+ }
2028
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2029
+ yy_is_jam = (yy_current_state == 423);
2030
+ if ( ! yy_is_jam )
2031
+ *yyg->yy_state_ptr++ = yy_current_state;
2032
+
2033
+ return yy_is_jam ? 0 : yy_current_state;
2034
+ }
2035
+
2036
+ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
2037
+ {
2038
+ register char *yy_cp;
2039
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2040
+
2041
+ yy_cp = yyg->yy_c_buf_p;
2042
+
2043
+ /* undo effects of setting up yytext */
2044
+ *yy_cp = yyg->yy_hold_char;
2045
+
2046
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2047
+ { /* need to shift things up to make room */
2048
+ /* +2 for EOB chars. */
2049
+ register yy_size_t number_to_move = yyg->yy_n_chars + 2;
2050
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2051
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2052
+ register char *source =
2053
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2054
+
2055
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2056
+ *--dest = *--source;
2057
+
2058
+ yy_cp += (int) (dest - source);
2059
+ yy_bp += (int) (dest - source);
2060
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2061
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2062
+
2063
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2064
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
2065
+ }
2066
+
2067
+ *--yy_cp = (char) c;
2068
+
2069
+ yyg->yytext_ptr = yy_bp;
2070
+ yyg->yy_hold_char = *yy_cp;
2071
+ yyg->yy_c_buf_p = yy_cp;
2072
+ }
2073
+
2074
+ #ifndef YY_NO_INPUT
2075
+ #ifdef __cplusplus
2076
+ static int yyinput (yyscan_t yyscanner)
2077
+ #else
2078
+ static int input (yyscan_t yyscanner)
2079
+ #endif
2080
+
2081
+ {
2082
+ int c;
2083
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2084
+
2085
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
2086
+
2087
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2088
+ {
2089
+ /* yy_c_buf_p now points to the character we want to return.
2090
+ * If this occurs *before* the EOB characters, then it's a
2091
+ * valid NUL; if not, then we've hit the end of the buffer.
2092
+ */
2093
+ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2094
+ /* This was really a NUL. */
2095
+ *yyg->yy_c_buf_p = '\0';
2096
+
2097
+ else
2098
+ { /* need more input */
2099
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2100
+ ++yyg->yy_c_buf_p;
2101
+
2102
+ switch ( yy_get_next_buffer( yyscanner ) )
2103
+ {
2104
+ case EOB_ACT_LAST_MATCH:
2105
+ /* This happens because yy_g_n_b()
2106
+ * sees that we've accumulated a
2107
+ * token and flags that we need to
2108
+ * try matching the token before
2109
+ * proceeding. But for input(),
2110
+ * there's no matching to consider.
2111
+ * So convert the EOB_ACT_LAST_MATCH
2112
+ * to EOB_ACT_END_OF_FILE.
2113
+ */
2114
+
2115
+ /* Reset buffer status. */
2116
+ langscan_csharp_lex_restart(yyin ,yyscanner);
2117
+
2118
+ /*FALLTHROUGH*/
2119
+
2120
+ case EOB_ACT_END_OF_FILE:
2121
+ {
2122
+ if ( langscan_csharp_lex_wrap(yyscanner ) )
2123
+ return 0;
2124
+
2125
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
2126
+ YY_NEW_FILE;
2127
+ #ifdef __cplusplus
2128
+ return yyinput(yyscanner);
2129
+ #else
2130
+ return input(yyscanner);
2131
+ #endif
2132
+ }
2133
+
2134
+ case EOB_ACT_CONTINUE_SCAN:
2135
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2136
+ break;
2137
+ }
2138
+ }
2139
+ }
2140
+
2141
+ c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2142
+ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2143
+ yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2144
+
2145
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2146
+
2147
+ return c;
2148
+ }
2149
+ #endif /* ifndef YY_NO_INPUT */
2150
+
2151
+ /** Immediately switch to a different input stream.
2152
+ * @param input_file A readable stream.
2153
+ * @param yyscanner The scanner object.
2154
+ * @note This function does not reset the start condition to @c INITIAL .
2155
+ */
2156
+ void langscan_csharp_lex_restart (FILE * input_file , yyscan_t yyscanner)
2157
+ {
2158
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2159
+
2160
+ if ( ! YY_CURRENT_BUFFER ){
2161
+ langscan_csharp_lex_ensure_buffer_stack (yyscanner);
2162
+ YY_CURRENT_BUFFER_LVALUE =
2163
+ langscan_csharp_lex__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2164
+ }
2165
+
2166
+ langscan_csharp_lex__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2167
+ langscan_csharp_lex__load_buffer_state(yyscanner );
2168
+ }
2169
+
2170
+ /** Switch to a different input buffer.
2171
+ * @param new_buffer The new input buffer.
2172
+ * @param yyscanner The scanner object.
2173
+ */
2174
+ void langscan_csharp_lex__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2175
+ {
2176
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2177
+
2178
+ /* TODO. We should be able to replace this entire function body
2179
+ * with
2180
+ * langscan_csharp_lex_pop_buffer_state();
2181
+ * langscan_csharp_lex_push_buffer_state(new_buffer);
2182
+ */
2183
+ langscan_csharp_lex_ensure_buffer_stack (yyscanner);
2184
+ if ( YY_CURRENT_BUFFER == new_buffer )
2185
+ return;
2186
+
2187
+ if ( YY_CURRENT_BUFFER )
2188
+ {
2189
+ /* Flush out information for old buffer. */
2190
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
2191
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2192
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2193
+ }
2194
+
2195
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2196
+ langscan_csharp_lex__load_buffer_state(yyscanner );
2197
+
2198
+ /* We don't actually know whether we did this switch during
2199
+ * EOF (langscan_csharp_lex_wrap()) processing, but the only time this flag
2200
+ * is looked at is after langscan_csharp_lex_wrap() is called, so it's safe
2201
+ * to go ahead and always set it.
2202
+ */
2203
+ yyg->yy_did_buffer_switch_on_eof = 1;
2204
+ }
2205
+
2206
+ static void langscan_csharp_lex__load_buffer_state (yyscan_t yyscanner)
2207
+ {
2208
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2209
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2210
+ yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2211
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2212
+ yyg->yy_hold_char = *yyg->yy_c_buf_p;
2213
+ }
2214
+
2215
+ /** Allocate and initialize an input buffer state.
2216
+ * @param file A readable stream.
2217
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2218
+ * @param yyscanner The scanner object.
2219
+ * @return the allocated buffer state.
2220
+ */
2221
+ YY_BUFFER_STATE langscan_csharp_lex__create_buffer (FILE * file, int size , yyscan_t yyscanner)
2222
+ {
2223
+ YY_BUFFER_STATE b;
2224
+
2225
+ b = (YY_BUFFER_STATE) langscan_csharp_lex_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2226
+ if ( ! b )
2227
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex__create_buffer()" );
2228
+
2229
+ b->yy_buf_size = size;
2230
+
2231
+ /* yy_ch_buf has to be 2 characters longer than the size given because
2232
+ * we need to put in 2 end-of-buffer characters.
2233
+ */
2234
+ b->yy_ch_buf = (char *) langscan_csharp_lex_alloc(b->yy_buf_size + 2 ,yyscanner );
2235
+ if ( ! b->yy_ch_buf )
2236
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex__create_buffer()" );
2237
+
2238
+ b->yy_is_our_buffer = 1;
2239
+
2240
+ langscan_csharp_lex__init_buffer(b,file ,yyscanner);
2241
+
2242
+ return b;
2243
+ }
2244
+
2245
+ /** Destroy the buffer.
2246
+ * @param b a buffer created with langscan_csharp_lex__create_buffer()
2247
+ * @param yyscanner The scanner object.
2248
+ */
2249
+ void langscan_csharp_lex__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2250
+ {
2251
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2252
+
2253
+ if ( ! b )
2254
+ return;
2255
+
2256
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2257
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2258
+
2259
+ if ( b->yy_is_our_buffer )
2260
+ langscan_csharp_lex_free((void *) b->yy_ch_buf ,yyscanner );
2261
+
2262
+ langscan_csharp_lex_free((void *) b ,yyscanner );
2263
+ }
2264
+
2265
+ #ifndef __cplusplus
2266
+ extern int isatty (int );
2267
+ #endif /* __cplusplus */
2268
+
2269
+ /* Initializes or reinitializes a buffer.
2270
+ * This function is sometimes called more than once on the same buffer,
2271
+ * such as during a langscan_csharp_lex_restart() or at EOF.
2272
+ */
2273
+ static void langscan_csharp_lex__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2274
+
2275
+ {
2276
+ int oerrno = errno;
2277
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2278
+
2279
+ langscan_csharp_lex__flush_buffer(b ,yyscanner);
2280
+
2281
+ b->yy_input_file = file;
2282
+ b->yy_fill_buffer = 1;
2283
+
2284
+ /* If b is the current buffer, then langscan_csharp_lex__init_buffer was _probably_
2285
+ * called from langscan_csharp_lex_restart() or through yy_get_next_buffer.
2286
+ * In that case, we don't want to reset the lineno or column.
2287
+ */
2288
+ if (b != YY_CURRENT_BUFFER){
2289
+ b->yy_bs_lineno = 1;
2290
+ b->yy_bs_column = 0;
2291
+ }
2292
+
2293
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2294
+
2295
+ errno = oerrno;
2296
+ }
2297
+
2298
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2299
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2300
+ * @param yyscanner The scanner object.
2301
+ */
2302
+ void langscan_csharp_lex__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2303
+ {
2304
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2305
+ if ( ! b )
2306
+ return;
2307
+
2308
+ b->yy_n_chars = 0;
2309
+
2310
+ /* We always need two end-of-buffer characters. The first causes
2311
+ * a transition to the end-of-buffer state. The second causes
2312
+ * a jam in that state.
2313
+ */
2314
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2315
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2316
+
2317
+ b->yy_buf_pos = &b->yy_ch_buf[0];
2318
+
2319
+ b->yy_at_bol = 1;
2320
+ b->yy_buffer_status = YY_BUFFER_NEW;
2321
+
2322
+ if ( b == YY_CURRENT_BUFFER )
2323
+ langscan_csharp_lex__load_buffer_state(yyscanner );
2324
+ }
2325
+
2326
+ /** Pushes the new state onto the stack. The new state becomes
2327
+ * the current state. This function will allocate the stack
2328
+ * if necessary.
2329
+ * @param new_buffer The new state.
2330
+ * @param yyscanner The scanner object.
2331
+ */
2332
+ void langscan_csharp_lex_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2333
+ {
2334
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2335
+ if (new_buffer == NULL)
2336
+ return;
2337
+
2338
+ langscan_csharp_lex_ensure_buffer_stack(yyscanner);
2339
+
2340
+ /* This block is copied from langscan_csharp_lex__switch_to_buffer. */
2341
+ if ( YY_CURRENT_BUFFER )
2342
+ {
2343
+ /* Flush out information for old buffer. */
2344
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
2345
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2346
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2347
+ }
2348
+
2349
+ /* Only push if top exists. Otherwise, replace top. */
2350
+ if (YY_CURRENT_BUFFER)
2351
+ yyg->yy_buffer_stack_top++;
2352
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2353
+
2354
+ /* copied from langscan_csharp_lex__switch_to_buffer. */
2355
+ langscan_csharp_lex__load_buffer_state(yyscanner );
2356
+ yyg->yy_did_buffer_switch_on_eof = 1;
2357
+ }
2358
+
2359
+ /** Removes and deletes the top of the stack, if present.
2360
+ * The next element becomes the new top.
2361
+ * @param yyscanner The scanner object.
2362
+ */
2363
+ void langscan_csharp_lex_pop_buffer_state (yyscan_t yyscanner)
2364
+ {
2365
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2366
+ if (!YY_CURRENT_BUFFER)
2367
+ return;
2368
+
2369
+ langscan_csharp_lex__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2370
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2371
+ if (yyg->yy_buffer_stack_top > 0)
2372
+ --yyg->yy_buffer_stack_top;
2373
+
2374
+ if (YY_CURRENT_BUFFER) {
2375
+ langscan_csharp_lex__load_buffer_state(yyscanner );
2376
+ yyg->yy_did_buffer_switch_on_eof = 1;
2377
+ }
2378
+ }
2379
+
2380
+ /* Allocates the stack if it does not exist.
2381
+ * Guarantees space for at least one push.
2382
+ */
2383
+ static void langscan_csharp_lex_ensure_buffer_stack (yyscan_t yyscanner)
2384
+ {
2385
+ yy_size_t num_to_alloc;
2386
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2387
+
2388
+ if (!yyg->yy_buffer_stack) {
2389
+
2390
+ /* First allocation is just for 2 elements, since we don't know if this
2391
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
2392
+ * immediate realloc on the next call.
2393
+ */
2394
+ num_to_alloc = 1;
2395
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)langscan_csharp_lex_alloc
2396
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
2397
+ , yyscanner);
2398
+ if ( ! yyg->yy_buffer_stack )
2399
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex_ensure_buffer_stack()" );
2400
+
2401
+ memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2402
+
2403
+ yyg->yy_buffer_stack_max = num_to_alloc;
2404
+ yyg->yy_buffer_stack_top = 0;
2405
+ return;
2406
+ }
2407
+
2408
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2409
+
2410
+ /* Increase the buffer to prepare for a possible push. */
2411
+ int grow_size = 8 /* arbitrary grow size */;
2412
+
2413
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2414
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)langscan_csharp_lex_realloc
2415
+ (yyg->yy_buffer_stack,
2416
+ num_to_alloc * sizeof(struct yy_buffer_state*)
2417
+ , yyscanner);
2418
+ if ( ! yyg->yy_buffer_stack )
2419
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex_ensure_buffer_stack()" );
2420
+
2421
+ /* zero only the new slots.*/
2422
+ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2423
+ yyg->yy_buffer_stack_max = num_to_alloc;
2424
+ }
2425
+ }
2426
+
2427
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
2428
+ * @param base the character buffer
2429
+ * @param size the size in bytes of the character buffer
2430
+ * @param yyscanner The scanner object.
2431
+ * @return the newly allocated buffer state object.
2432
+ */
2433
+ YY_BUFFER_STATE langscan_csharp_lex__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2434
+ {
2435
+ YY_BUFFER_STATE b;
2436
+
2437
+ if ( size < 2 ||
2438
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
2439
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
2440
+ /* They forgot to leave room for the EOB's. */
2441
+ return 0;
2442
+
2443
+ b = (YY_BUFFER_STATE) langscan_csharp_lex_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2444
+ if ( ! b )
2445
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex__scan_buffer()" );
2446
+
2447
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2448
+ b->yy_buf_pos = b->yy_ch_buf = base;
2449
+ b->yy_is_our_buffer = 0;
2450
+ b->yy_input_file = 0;
2451
+ b->yy_n_chars = b->yy_buf_size;
2452
+ b->yy_is_interactive = 0;
2453
+ b->yy_at_bol = 1;
2454
+ b->yy_fill_buffer = 0;
2455
+ b->yy_buffer_status = YY_BUFFER_NEW;
2456
+
2457
+ langscan_csharp_lex__switch_to_buffer(b ,yyscanner );
2458
+
2459
+ return b;
2460
+ }
2461
+
2462
+ /** Setup the input buffer state to scan a string. The next call to langscan_csharp_lex_lex() will
2463
+ * scan from a @e copy of @a str.
2464
+ * @param yystr a NUL-terminated string to scan
2465
+ * @param yyscanner The scanner object.
2466
+ * @return the newly allocated buffer state object.
2467
+ * @note If you want to scan bytes that may contain NUL values, then use
2468
+ * langscan_csharp_lex__scan_bytes() instead.
2469
+ */
2470
+ YY_BUFFER_STATE langscan_csharp_lex__scan_string (yyconst char * yystr , yyscan_t yyscanner)
2471
+ {
2472
+
2473
+ return langscan_csharp_lex__scan_bytes(yystr,strlen(yystr) ,yyscanner);
2474
+ }
2475
+
2476
+ /** Setup the input buffer state to scan the given bytes. The next call to langscan_csharp_lex_lex() will
2477
+ * scan from a @e copy of @a bytes.
2478
+ * @param bytes the byte buffer to scan
2479
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
2480
+ * @param yyscanner The scanner object.
2481
+ * @return the newly allocated buffer state object.
2482
+ */
2483
+ YY_BUFFER_STATE langscan_csharp_lex__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
2484
+ {
2485
+ YY_BUFFER_STATE b;
2486
+ char *buf;
2487
+ yy_size_t n, i;
2488
+
2489
+ /* Get memory for full buffer, including space for trailing EOB's. */
2490
+ n = _yybytes_len + 2;
2491
+ buf = (char *) langscan_csharp_lex_alloc(n ,yyscanner );
2492
+ if ( ! buf )
2493
+ YY_FATAL_ERROR( "out of dynamic memory in langscan_csharp_lex__scan_bytes()" );
2494
+
2495
+ for ( i = 0; i < _yybytes_len; ++i )
2496
+ buf[i] = yybytes[i];
2497
+
2498
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2499
+
2500
+ b = langscan_csharp_lex__scan_buffer(buf,n ,yyscanner);
2501
+ if ( ! b )
2502
+ YY_FATAL_ERROR( "bad buffer in langscan_csharp_lex__scan_bytes()" );
2503
+
2504
+ /* It's okay to grow etc. this buffer, and we should throw it
2505
+ * away when we're done.
2506
+ */
2507
+ b->yy_is_our_buffer = 1;
2508
+
2509
+ return b;
2510
+ }
2511
+
2512
+ #ifndef YY_EXIT_FAILURE
2513
+ #define YY_EXIT_FAILURE 2
2514
+ #endif
2515
+
2516
+ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2517
+ {
2518
+ (void) fprintf( stderr, "%s\n", msg );
2519
+ exit( YY_EXIT_FAILURE );
2520
+ }
2521
+
2522
+ /* Redefine yyless() so it works in section 3 code. */
2523
+
2524
+ #undef yyless
2525
+ #define yyless(n) \
2526
+ do \
2527
+ { \
2528
+ /* Undo effects of setting up yytext. */ \
2529
+ int yyless_macro_arg = (n); \
2530
+ YY_LESS_LINENO(yyless_macro_arg);\
2531
+ yytext[yyleng] = yyg->yy_hold_char; \
2532
+ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2533
+ yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2534
+ *yyg->yy_c_buf_p = '\0'; \
2535
+ yyleng = yyless_macro_arg; \
2536
+ } \
2537
+ while ( 0 )
2538
+
2539
+ /* Accessor methods (get/set functions) to struct members. */
2540
+
2541
+ /** Get the user-defined data for this scanner.
2542
+ * @param yyscanner The scanner object.
2543
+ */
2544
+ YY_EXTRA_TYPE langscan_csharp_lex_get_extra (yyscan_t yyscanner)
2545
+ {
2546
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2547
+ return yyextra;
2548
+ }
2549
+
2550
+ /** Get the current line number.
2551
+ * @param yyscanner The scanner object.
2552
+ */
2553
+ int langscan_csharp_lex_get_lineno (yyscan_t yyscanner)
2554
+ {
2555
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2556
+
2557
+ if (! YY_CURRENT_BUFFER)
2558
+ return 0;
2559
+
2560
+ return yylineno;
2561
+ }
2562
+
2563
+ /** Get the current column number.
2564
+ * @param yyscanner The scanner object.
2565
+ */
2566
+ int langscan_csharp_lex_get_column (yyscan_t yyscanner)
2567
+ {
2568
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2569
+
2570
+ if (! YY_CURRENT_BUFFER)
2571
+ return 0;
2572
+
2573
+ return yycolumn;
2574
+ }
2575
+
2576
+ /** Get the input stream.
2577
+ * @param yyscanner The scanner object.
2578
+ */
2579
+ FILE *langscan_csharp_lex_get_in (yyscan_t yyscanner)
2580
+ {
2581
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2582
+ return yyin;
2583
+ }
2584
+
2585
+ /** Get the output stream.
2586
+ * @param yyscanner The scanner object.
2587
+ */
2588
+ FILE *langscan_csharp_lex_get_out (yyscan_t yyscanner)
2589
+ {
2590
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2591
+ return yyout;
2592
+ }
2593
+
2594
+ /** Get the length of the current token.
2595
+ * @param yyscanner The scanner object.
2596
+ */
2597
+ yy_size_t langscan_csharp_lex_get_leng (yyscan_t yyscanner)
2598
+ {
2599
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2600
+ return yyleng;
2601
+ }
2602
+
2603
+ /** Get the current token.
2604
+ * @param yyscanner The scanner object.
2605
+ */
2606
+
2607
+ char *langscan_csharp_lex_get_text (yyscan_t yyscanner)
2608
+ {
2609
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2610
+ return yytext;
2611
+ }
2612
+
2613
+ /** Set the user-defined data. This data is never touched by the scanner.
2614
+ * @param user_defined The data to be associated with this scanner.
2615
+ * @param yyscanner The scanner object.
2616
+ */
2617
+ void langscan_csharp_lex_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2618
+ {
2619
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2620
+ yyextra = user_defined ;
2621
+ }
2622
+
2623
+ /** Set the current line number.
2624
+ * @param line_number
2625
+ * @param yyscanner The scanner object.
2626
+ */
2627
+ void langscan_csharp_lex_set_lineno (int line_number , yyscan_t yyscanner)
2628
+ {
2629
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2630
+
2631
+ /* lineno is only valid if an input buffer exists. */
2632
+ if (! YY_CURRENT_BUFFER )
2633
+ yy_fatal_error( "langscan_csharp_lex_set_lineno called with no buffer" , yyscanner);
2634
+
2635
+ yylineno = line_number;
2636
+ }
2637
+
2638
+ /** Set the current column.
2639
+ * @param line_number
2640
+ * @param yyscanner The scanner object.
2641
+ */
2642
+ void langscan_csharp_lex_set_column (int column_no , yyscan_t yyscanner)
2643
+ {
2644
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2645
+
2646
+ /* column is only valid if an input buffer exists. */
2647
+ if (! YY_CURRENT_BUFFER )
2648
+ yy_fatal_error( "langscan_csharp_lex_set_column called with no buffer" , yyscanner);
2649
+
2650
+ yycolumn = column_no;
2651
+ }
2652
+
2653
+ /** Set the input stream. This does not discard the current
2654
+ * input buffer.
2655
+ * @param in_str A readable stream.
2656
+ * @param yyscanner The scanner object.
2657
+ * @see langscan_csharp_lex__switch_to_buffer
2658
+ */
2659
+ void langscan_csharp_lex_set_in (FILE * in_str , yyscan_t yyscanner)
2660
+ {
2661
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2662
+ yyin = in_str ;
2663
+ }
2664
+
2665
+ void langscan_csharp_lex_set_out (FILE * out_str , yyscan_t yyscanner)
2666
+ {
2667
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2668
+ yyout = out_str ;
2669
+ }
2670
+
2671
+ int langscan_csharp_lex_get_debug (yyscan_t yyscanner)
2672
+ {
2673
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2674
+ return yy_flex_debug;
2675
+ }
2676
+
2677
+ void langscan_csharp_lex_set_debug (int bdebug , yyscan_t yyscanner)
2678
+ {
2679
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2680
+ yy_flex_debug = bdebug ;
2681
+ }
2682
+
2683
+ /* Accessor methods for yylval and yylloc */
2684
+
2685
+ /* User-visible API */
2686
+
2687
+ /* langscan_csharp_lex_lex_init is special because it creates the scanner itself, so it is
2688
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
2689
+ * That's why we explicitly handle the declaration, instead of using our macros.
2690
+ */
2691
+
2692
+ int langscan_csharp_lex_lex_init(yyscan_t* ptr_yy_globals)
2693
+
2694
+ {
2695
+ if (ptr_yy_globals == NULL){
2696
+ errno = EINVAL;
2697
+ return 1;
2698
+ }
2699
+
2700
+ *ptr_yy_globals = (yyscan_t) langscan_csharp_lex_alloc ( sizeof( struct yyguts_t ), NULL );
2701
+
2702
+ if (*ptr_yy_globals == NULL){
2703
+ errno = ENOMEM;
2704
+ return 1;
2705
+ }
2706
+
2707
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2708
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2709
+
2710
+ return yy_init_globals ( *ptr_yy_globals );
2711
+ }
2712
+
2713
+ /* langscan_csharp_lex_lex_init_extra has the same functionality as langscan_csharp_lex_lex_init, but follows the
2714
+ * convention of taking the scanner as the last argument. Note however, that
2715
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
2716
+ * is the reason, too, why this function also must handle its own declaration).
2717
+ * The user defined value in the first argument will be available to langscan_csharp_lex_alloc in
2718
+ * the yyextra field.
2719
+ */
2720
+
2721
+ int langscan_csharp_lex_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2722
+
2723
+ {
2724
+ struct yyguts_t dummy_yyguts;
2725
+
2726
+ langscan_csharp_lex_set_extra (yy_user_defined, &dummy_yyguts);
2727
+
2728
+ if (ptr_yy_globals == NULL){
2729
+ errno = EINVAL;
2730
+ return 1;
2731
+ }
2732
+
2733
+ *ptr_yy_globals = (yyscan_t) langscan_csharp_lex_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2734
+
2735
+ if (*ptr_yy_globals == NULL){
2736
+ errno = ENOMEM;
2737
+ return 1;
2738
+ }
2739
+
2740
+ /* By setting to 0xAA, we expose bugs in
2741
+ yy_init_globals. Leave at 0x00 for releases. */
2742
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2743
+
2744
+ langscan_csharp_lex_set_extra (yy_user_defined, *ptr_yy_globals);
2745
+
2746
+ return yy_init_globals ( *ptr_yy_globals );
2747
+ }
2748
+
2749
+ static int yy_init_globals (yyscan_t yyscanner)
2750
+ {
2751
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2752
+ /* Initialization is the same as for the non-reentrant scanner.
2753
+ * This function is called from langscan_csharp_lex_lex_destroy(), so don't allocate here.
2754
+ */
2755
+
2756
+ yyg->yy_buffer_stack = 0;
2757
+ yyg->yy_buffer_stack_top = 0;
2758
+ yyg->yy_buffer_stack_max = 0;
2759
+ yyg->yy_c_buf_p = (char *) 0;
2760
+ yyg->yy_init = 0;
2761
+ yyg->yy_start = 0;
2762
+
2763
+ yyg->yy_start_stack_ptr = 0;
2764
+ yyg->yy_start_stack_depth = 0;
2765
+ yyg->yy_start_stack = NULL;
2766
+
2767
+ yyg->yy_state_buf = 0;
2768
+ yyg->yy_state_ptr = 0;
2769
+ yyg->yy_full_match = 0;
2770
+ yyg->yy_lp = 0;
2771
+
2772
+ /* Defined in main.c */
2773
+ #ifdef YY_STDINIT
2774
+ yyin = stdin;
2775
+ yyout = stdout;
2776
+ #else
2777
+ yyin = (FILE *) 0;
2778
+ yyout = (FILE *) 0;
2779
+ #endif
2780
+
2781
+ /* For future reference: Set errno on error, since we are called by
2782
+ * langscan_csharp_lex_lex_init()
2783
+ */
2784
+ return 0;
2785
+ }
2786
+
2787
+ /* langscan_csharp_lex_lex_destroy is for both reentrant and non-reentrant scanners. */
2788
+ int langscan_csharp_lex_lex_destroy (yyscan_t yyscanner)
2789
+ {
2790
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2791
+
2792
+ /* Pop the buffer stack, destroying each element. */
2793
+ while(YY_CURRENT_BUFFER){
2794
+ langscan_csharp_lex__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2795
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2796
+ langscan_csharp_lex_pop_buffer_state(yyscanner);
2797
+ }
2798
+
2799
+ /* Destroy the stack itself. */
2800
+ langscan_csharp_lex_free(yyg->yy_buffer_stack ,yyscanner);
2801
+ yyg->yy_buffer_stack = NULL;
2802
+
2803
+ /* Destroy the start condition stack. */
2804
+ langscan_csharp_lex_free(yyg->yy_start_stack ,yyscanner );
2805
+ yyg->yy_start_stack = NULL;
2806
+
2807
+ langscan_csharp_lex_free ( yyg->yy_state_buf , yyscanner);
2808
+ yyg->yy_state_buf = NULL;
2809
+
2810
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2811
+ * langscan_csharp_lex_lex() is called, initialization will occur. */
2812
+ yy_init_globals( yyscanner);
2813
+
2814
+ /* Destroy the main struct (reentrant only). */
2815
+ langscan_csharp_lex_free ( yyscanner , yyscanner );
2816
+ yyscanner = NULL;
2817
+ return 0;
2818
+ }
2819
+
2820
+ /*
2821
+ * Internal utility routines.
2822
+ */
2823
+
2824
+ #ifndef yytext_ptr
2825
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2826
+ {
2827
+ register int i;
2828
+ for ( i = 0; i < n; ++i )
2829
+ s1[i] = s2[i];
2830
+ }
2831
+ #endif
2832
+
2833
+ #ifdef YY_NEED_STRLEN
2834
+ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2835
+ {
2836
+ register int n;
2837
+ for ( n = 0; s[n]; ++n )
2838
+ ;
2839
+
2840
+ return n;
2841
+ }
2842
+ #endif
2843
+
2844
+ void *langscan_csharp_lex_alloc (yy_size_t size , yyscan_t yyscanner)
2845
+ {
2846
+ return (void *) malloc( size );
2847
+ }
2848
+
2849
+ void *langscan_csharp_lex_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2850
+ {
2851
+ /* The cast to (char *) in the following accommodates both
2852
+ * implementations that use char* generic pointers, and those
2853
+ * that use void* generic pointers. It works with the latter
2854
+ * because both ANSI C and C++ allow castless assignment from
2855
+ * any pointer type to void*, and deal with argument conversions
2856
+ * as though doing an assignment.
2857
+ */
2858
+ return (void *) realloc( (char *) ptr, size );
2859
+ }
2860
+
2861
+ void langscan_csharp_lex_free (void * ptr , yyscan_t yyscanner)
2862
+ {
2863
+ free( (char *) ptr ); /* see langscan_csharp_lex_realloc() for (char *) cast */
2864
+ }
2865
+
2866
+ #define YYTABLES_NAME "yytables"
2867
+
2868
+ static void update_pos(
2869
+ langscan_csharp_lex_extra_t *extra,
2870
+ char *text,
2871
+ int leng)
2872
+ {
2873
+ int i, j;
2874
+ extra->beg_byteno = extra->end_byteno;
2875
+ extra->beg_lineno = extra->end_lineno;
2876
+ extra->beg_columnno = extra->end_columnno;
2877
+ j = 0;
2878
+ for (i = 0; i < leng; i++) {
2879
+ if (text[i] == '\n') {
2880
+ extra->end_lineno++;
2881
+ j = i + 1;
2882
+ extra->end_columnno = 0;
2883
+ }
2884
+ }
2885
+ extra->end_columnno += leng - j;
2886
+ extra->end_byteno += leng;
2887
+ }
2888
+
2889
+ static int ident_length(unsigned char *ptr, int max)
2890
+ {
2891
+ int len = 0;
2892
+ while (0 < max &&
2893
+ (('0' <= *ptr && *ptr <= '9') ||
2894
+ ('A' <= *ptr && *ptr <= 'Z') ||
2895
+ ('a' <= *ptr && *ptr <= 'z') ||
2896
+ *ptr == '_')) {
2897
+ ptr++;
2898
+ len++;
2899
+ max--;
2900
+ }
2901
+ return len;
2902
+ }
2903
+
2904
+ langscan_csharp_tokenizer_t *langscan_csharp_make_tokenizer(
2905
+ size_t (*user_read)(void **user_data_p, char *buf, size_t maxlen),
2906
+ void *user_data)
2907
+ {
2908
+ langscan_csharp_tokenizer_t *tokenizer;
2909
+ langscan_csharp_lex_extra_t *extra;
2910
+ tokenizer = (langscan_csharp_tokenizer_t *)malloc(sizeof(langscan_csharp_tokenizer_t));
2911
+ if (tokenizer == NULL)
2912
+ return NULL;
2913
+ extra = (langscan_csharp_lex_extra_t *)malloc(sizeof(langscan_csharp_lex_extra_t));
2914
+ if (extra == NULL)
2915
+ return NULL;
2916
+ extra->user_read = user_read;
2917
+ extra->user_data = user_data;
2918
+ extra->beg_lineno = 1;
2919
+ extra->beg_columnno = 0;
2920
+ extra->beg_byteno = 0;
2921
+ extra->end_lineno = 1;
2922
+ extra->end_columnno = 0;
2923
+ extra->end_byteno = 0;
2924
+ extra->eof = 0;
2925
+ tokenizer->extra = extra;
2926
+ langscan_csharp_lex_lex_init(&tokenizer->scanner);
2927
+ langscan_csharp_lex_set_extra(extra, tokenizer->scanner);
2928
+ return tokenizer;
2929
+ }
2930
+
2931
+ langscan_csharp_token_t langscan_csharp_get_token(langscan_csharp_tokenizer_t *tokenizer)
2932
+ {
2933
+ return langscan_csharp_lex_lex(tokenizer->scanner);
2934
+ }
2935
+
2936
+ void langscan_csharp_free_tokenizer(langscan_csharp_tokenizer_t *tokenizer)
2937
+ {
2938
+ langscan_csharp_lex_extra_t *extra = langscan_csharp_lex_get_extra(tokenizer->scanner);
2939
+ free((void *)extra);
2940
+ langscan_csharp_lex_lex_destroy(tokenizer->scanner);
2941
+ free((void *)tokenizer);
2942
+ }
2943
+
2944
+ user_read_t langscan_csharp_tokenizer_get_user_read(langscan_csharp_tokenizer_t *tokenizer)
2945
+ {
2946
+ return tokenizer->extra->user_read;
2947
+ }
2948
+
2949
+ void *langscan_csharp_tokenizer_get_user_data(langscan_csharp_tokenizer_t *tokenizer)
2950
+ {
2951
+ return tokenizer->extra->user_data;
2952
+ }
2953
+
2954
+ const char *langscan_csharp_token_name(langscan_csharp_token_t token)
2955
+ {
2956
+ static char *token_names[] = {
2957
+ "*eof*",
2958
+ #define LANGSCAN_CSHARP_TOKEN(name) #name,
2959
+ LANGSCAN_CSHARP_TOKEN_LIST
2960
+ #undef LANGSCAN_CSHARP_TOKEN
2961
+ };
2962
+
2963
+ return token_names[token];
2964
+ }
2965
+