breakout_parser 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ wiki
2
+ pkg
3
+ lex.yy.c
4
+ *.tab.c
5
+ *.tab.h
6
+ *.tmp
7
+ ext/breakout_parser/*.so
8
+ *.o
9
+ *.def
10
+ *.exp
11
+ *.lib
12
+ *.pdb
13
+ *.obj
14
+ *.manifest
15
+ *.gemspec
16
+ Makefile
data/LICENSE ADDED
@@ -0,0 +1,39 @@
1
+ Copyright (c) 2010 Assembla, Inc.
2
+
3
+ SINGLETON DEVELOPMENT LICENSE
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * This is a license for research and development use only, and does not
9
+ include a license for commercial use. If you desire a license for commercial
10
+ use, you must contact the copyright owner for a commercial use license,
11
+ which would supersede the terms of this license. "Commercial Use" means any
12
+ use (internal or external), copying, sublicensing or distribution
13
+ (internal or external), directly or indirectly, for commercial or strategic
14
+ gain or advantage, including use in internal operations or in providing
15
+ products or services to any third party. Research and development for
16
+ eventual commercial use is not "Commercial Use" so long as a commercial
17
+ use license is obtained prior to commercial use. Redistribution to others
18
+ for their research and development use is not "Commercial Use".
19
+
20
+ * Redistributions of source code must retain the above copyright notice,
21
+ this list of conditions and the following disclaimer.
22
+
23
+ * Redistributions in binary form must reproduce the above copyright notice,
24
+ this list of conditions and the following disclaimer in the documentation
25
+ and/or other materials provided with the distribution. Redistribution in
26
+ binary form does not require redistribution of source code.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38
+ THE POSSIBILITY OF SUCH DAMAGE.
39
+
data/Rakefile ADDED
@@ -0,0 +1,99 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+
7
+ def gen_tasks
8
+ Jeweler::Tasks.new do |gem|
9
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
10
+ gem.name = "breakout_parser"
11
+ gem.platform = ENV['PLATFORM'] if ENV['PLATFORM']
12
+ gem.summary = %Q{BreakoutParser}
13
+ gem.description = %Q{BreakoutParser}
14
+ gem.email = "zed.0xff@gmail.com"
15
+ gem.homepage = "http://assembla.com"
16
+ gem.authors = ["Andrey \"Zed\" Zaikin"]
17
+ gem.add_development_dependency "rspec", ">= 1.2.9"
18
+ gem.test_files.delete 'spec/parser_examples_spec.rb'
19
+ gem.files.delete_if{ |f| f[0..8] == 'examples/' }
20
+ gem.files.delete_if{ |f| f[0..4] == 'misc/' }
21
+ if gem.platform == 'ruby'
22
+ gem.files.include 'ext/**/*'
23
+ gem.files.delete "ext/breakout_parser/Makefile"
24
+ gem.files.delete_if{ |f| f[-3..-1] == '.so' }
25
+ else
26
+ gem.files.include 'lib/**/*.so'
27
+ gem.extensions = '.' # HACK: package no extensions
28
+ end
29
+ end
30
+ Jeweler::GemcutterTasks.new
31
+ end
32
+ gen_tasks
33
+ rescue LoadError
34
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
35
+ end
36
+
37
+ require 'spec/rake/spectask'
38
+ Spec::Rake::SpecTask.new(:spec) do |spec|
39
+ spec.libs << 'lib' << 'spec'
40
+ spec.spec_files = FileList['spec/**/*_spec.rb']
41
+ end
42
+
43
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
44
+ spec.libs << 'lib' << 'spec'
45
+ spec.pattern = 'spec/**/*_spec.rb'
46
+ spec.rcov = true
47
+ end
48
+
49
+ task :spec => :check_dependencies
50
+
51
+ task :default => :spec
52
+
53
+ require 'rake/rdoctask'
54
+ Rake::RDocTask.new do |rdoc|
55
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
56
+
57
+ rdoc.rdoc_dir = 'rdoc'
58
+ rdoc.title = "breakout_parser #{version}"
59
+ # rdoc.rdoc_files.include('README*')
60
+ rdoc.rdoc_files.include('lib/**/*.rb')
61
+ end
62
+
63
+ ######################
64
+
65
+ namespace :build do
66
+ desc "Build all gem variants"
67
+ task :all do
68
+ Rake::Task[ :build ].execute
69
+
70
+ @gems_to_push = []
71
+ @gems_to_push << Rake.application.jeweler.gemspec_helper.gem_path
72
+
73
+ gem = Rake.application.jeweler_tasks.gemspec
74
+ gem.files.delete_if{ |f| f[0..3] == 'ext/' }
75
+ gem.extensions = []
76
+ gem.files.include 'lib/**/*.so'
77
+
78
+ gem.original_platform = nil
79
+ gem.platform = 'x86-mingw32'
80
+ Rake::Task[ :build ].execute
81
+ @gems_to_push << Rake.application.jeweler.gemspec_helper.gem_path
82
+
83
+ gem.original_platform = nil
84
+ gem.platform = 'x86-mswin32'
85
+ Rake::Task[ :build ].execute
86
+ @gems_to_push << Rake.application.jeweler.gemspec_helper.gem_path
87
+ end
88
+ end
89
+
90
+ namespace 'gemcutter:release' do
91
+ desc "Release all gem variants"
92
+ task :all => 'build:all' do
93
+ @gems_to_push.each do |fname|
94
+ command = "gem push #{fname}"
95
+ puts "Executing #{command.inspect}:"
96
+ sh command
97
+ end
98
+ end
99
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+ rm parser
3
+ bison -d parser.y && \
4
+ lex parser.l && \
5
+ gcc -g main.c lex.yy.c parser.tab.c yywrap.c -o parser #&& \
6
+ #./_test.sh
7
+
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'mkmf'
4
+ extension_name = 'breakout_parser'
5
+
6
+ $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
7
+ $srcs = %w'lex.yy.c main.c parser.tab.c ruby_ext.c yywrap.c'
8
+
9
+ dir_config(extension_name)
10
+ if RUBY_PLATFORM['mswin32']
11
+ $defs << "-MT" # link statically - avoid usage of MSVCR90.dll
12
+ end
13
+ create_makefile(([extension_name]*2).join('/'))
14
+
15
+ p $objs
16
+ p $srcs
@@ -0,0 +1,2449 @@
1
+
2
+ #line 3 "lex.yy.c"
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
+ /* Enter a start condition. This macro really ought to take a parameter,
121
+ * but we do it the disgusting crufty way forced on us by the ()-less
122
+ * definition of BEGIN.
123
+ */
124
+ #define BEGIN (yy_start) = 1 + 2 *
125
+
126
+ /* Translate the current start state into a value that can be later handed
127
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
128
+ * compatibility.
129
+ */
130
+ #define YY_START (((yy_start) - 1) / 2)
131
+ #define YYSTATE YY_START
132
+
133
+ /* Action number for EOF rule of a given start state. */
134
+ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
+
136
+ /* Special action meaning "start processing a new file". */
137
+ #define YY_NEW_FILE yyrestart(yyin )
138
+
139
+ #define YY_END_OF_BUFFER_CHAR 0
140
+
141
+ /* Size of default input buffer. */
142
+ #ifndef YY_BUF_SIZE
143
+ #define YY_BUF_SIZE 16384
144
+ #endif
145
+
146
+ /* The state buf must be large enough to hold one state per character in the main buffer.
147
+ */
148
+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
+
150
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151
+ #define YY_TYPEDEF_YY_BUFFER_STATE
152
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
153
+ #endif
154
+
155
+ extern int yyleng;
156
+
157
+ extern FILE *yyin, *yyout;
158
+
159
+ #define EOB_ACT_CONTINUE_SCAN 0
160
+ #define EOB_ACT_END_OF_FILE 1
161
+ #define EOB_ACT_LAST_MATCH 2
162
+
163
+ #define YY_LESS_LINENO(n)
164
+
165
+ /* Return all but the first "n" matched characters back to the input stream. */
166
+ #define yyless(n) \
167
+ do \
168
+ { \
169
+ /* Undo effects of setting up yytext. */ \
170
+ int yyless_macro_arg = (n); \
171
+ YY_LESS_LINENO(yyless_macro_arg);\
172
+ *yy_cp = (yy_hold_char); \
173
+ YY_RESTORE_YY_MORE_OFFSET \
174
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
175
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
176
+ } \
177
+ while ( 0 )
178
+
179
+ #define unput(c) yyunput( c, (yytext_ptr) )
180
+
181
+ #ifndef YY_TYPEDEF_YY_SIZE_T
182
+ #define YY_TYPEDEF_YY_SIZE_T
183
+ typedef size_t yy_size_t;
184
+ #endif
185
+
186
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
187
+ #define YY_STRUCT_YY_BUFFER_STATE
188
+ struct yy_buffer_state
189
+ {
190
+ FILE *yy_input_file;
191
+
192
+ char *yy_ch_buf; /* input buffer */
193
+ char *yy_buf_pos; /* current position in input buffer */
194
+
195
+ /* Size of input buffer in bytes, not including room for EOB
196
+ * characters.
197
+ */
198
+ yy_size_t yy_buf_size;
199
+
200
+ /* Number of characters read into yy_ch_buf, not including EOB
201
+ * characters.
202
+ */
203
+ int yy_n_chars;
204
+
205
+ /* Whether we "own" the buffer - i.e., we know we created it,
206
+ * and can realloc() it to grow it, and should free() it to
207
+ * delete it.
208
+ */
209
+ int yy_is_our_buffer;
210
+
211
+ /* Whether this is an "interactive" input source; if so, and
212
+ * if we're using stdio for input, then we want to use getc()
213
+ * instead of fread(), to make sure we stop fetching input after
214
+ * each newline.
215
+ */
216
+ int yy_is_interactive;
217
+
218
+ /* Whether we're considered to be at the beginning of a line.
219
+ * If so, '^' rules will be active on the next match, otherwise
220
+ * not.
221
+ */
222
+ int yy_at_bol;
223
+
224
+ int yy_bs_lineno; /**< The line count. */
225
+ int yy_bs_column; /**< The column count. */
226
+
227
+ /* Whether to try to fill the input buffer when we reach the
228
+ * end of it.
229
+ */
230
+ int yy_fill_buffer;
231
+
232
+ int yy_buffer_status;
233
+
234
+ #define YY_BUFFER_NEW 0
235
+ #define YY_BUFFER_NORMAL 1
236
+ /* When an EOF's been seen but there's still some text to process
237
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
238
+ * shouldn't try reading from the input source any more. We might
239
+ * still have a bunch of tokens to match, though, because of
240
+ * possible backing-up.
241
+ *
242
+ * When we actually see the EOF, we change the status to "new"
243
+ * (via yyrestart()), so that the user can continue scanning by
244
+ * just pointing yyin at a new input file.
245
+ */
246
+ #define YY_BUFFER_EOF_PENDING 2
247
+
248
+ };
249
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
250
+
251
+ /* Stack of input buffers. */
252
+ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253
+ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254
+ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
255
+
256
+ /* We provide macros for accessing buffer states in case in the
257
+ * future we want to put the buffer states in a more general
258
+ * "scanner state".
259
+ *
260
+ * Returns the top of the stack, or NULL.
261
+ */
262
+ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
264
+ : NULL)
265
+
266
+ /* Same as previous macro, but useful when we know that the buffer stack is not
267
+ * NULL or when we need an lvalue. For internal use only.
268
+ */
269
+ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
270
+
271
+ /* yy_hold_char holds the character lost when yytext is formed. */
272
+ static char yy_hold_char;
273
+ static int yy_n_chars; /* number of characters read into yy_ch_buf */
274
+ int yyleng;
275
+
276
+ /* Points to current character in buffer. */
277
+ static char *yy_c_buf_p = (char *) 0;
278
+ static int yy_init = 0; /* whether we need to initialize */
279
+ static int yy_start = 0; /* start state number */
280
+
281
+ /* Flag which is used to allow yywrap()'s to do buffer switches
282
+ * instead of setting up a fresh yyin. A bit of a hack ...
283
+ */
284
+ static int yy_did_buffer_switch_on_eof;
285
+
286
+ void yyrestart (FILE *input_file );
287
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
288
+ YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
289
+ void yy_delete_buffer (YY_BUFFER_STATE b );
290
+ void yy_flush_buffer (YY_BUFFER_STATE b );
291
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
292
+ void yypop_buffer_state (void );
293
+
294
+ static void yyensure_buffer_stack (void );
295
+ static void yy_load_buffer_state (void );
296
+ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
297
+
298
+ #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
299
+
300
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
301
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
302
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
303
+
304
+ void *yyalloc (yy_size_t );
305
+ void *yyrealloc (void *,yy_size_t );
306
+ void yyfree (void * );
307
+
308
+ #define yy_new_buffer yy_create_buffer
309
+
310
+ #define yy_set_interactive(is_interactive) \
311
+ { \
312
+ if ( ! YY_CURRENT_BUFFER ){ \
313
+ yyensure_buffer_stack (); \
314
+ YY_CURRENT_BUFFER_LVALUE = \
315
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
316
+ } \
317
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
318
+ }
319
+
320
+ #define yy_set_bol(at_bol) \
321
+ { \
322
+ if ( ! YY_CURRENT_BUFFER ){\
323
+ yyensure_buffer_stack (); \
324
+ YY_CURRENT_BUFFER_LVALUE = \
325
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
326
+ } \
327
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
328
+ }
329
+
330
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
331
+
332
+ /* Begin user sect3 */
333
+
334
+ typedef unsigned char YY_CHAR;
335
+
336
+ FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
337
+
338
+ typedef int yy_state_type;
339
+
340
+ extern int yylineno;
341
+
342
+ int yylineno = 1;
343
+
344
+ extern char *yytext;
345
+ #define yytext_ptr yytext
346
+
347
+ static yy_state_type yy_get_previous_state (void );
348
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
349
+ static int yy_get_next_buffer (void );
350
+ static void yy_fatal_error (yyconst char msg[] );
351
+
352
+ /* Done after the current pattern has been matched and before the
353
+ * corresponding action - sets up yytext.
354
+ */
355
+ #define YY_DO_BEFORE_ACTION \
356
+ (yytext_ptr) = yy_bp; \
357
+ yyleng = (size_t) (yy_cp - yy_bp); \
358
+ (yy_hold_char) = *yy_cp; \
359
+ *yy_cp = '\0'; \
360
+ (yy_c_buf_p) = yy_cp;
361
+
362
+ #define YY_NUM_RULES 39
363
+ #define YY_END_OF_BUFFER 40
364
+ /* This struct is not used in this scanner,
365
+ but its presence is necessary. */
366
+ struct yy_trans_info
367
+ {
368
+ flex_int32_t yy_verify;
369
+ flex_int32_t yy_nxt;
370
+ };
371
+ static yyconst flex_int16_t yy_acclist[140] =
372
+ { 0,
373
+ 40, 31, 39, 29, 31, 39, 6, 39, 6, 31,
374
+ 39, 31, 39, 30, 31, 39, 31, 39, 31, 39,
375
+ 30, 31, 39, 1, 31, 39, 28, 29, 31, 39,
376
+ 31, 39, 31, 39, 31, 39, 30, 31, 39, 34,
377
+ 39, 34, 39, 34, 39, 33, 34, 39, 29, 31,
378
+ 39, 31, 39, 28, 29, 31, 39, 31, 39, 29,
379
+ 31, 39, 31, 39, 28, 29, 31, 39, 31, 39,
380
+ 29, 6, 6, 2, 3, 6, 4, 30, 30, 28,
381
+ 29, 14, 8, 13, 10, 30, 33, 29,16419, 36,
382
+ 28, 29,16419, 13, 36, 8, 36, 29,16421, 38,
383
+
384
+ 28, 29, 10, 38, 9, 11, 3, 4, 16, 30,
385
+ 8227, 13, 8227, 8229, 5, 30, 30, 5, 27, 26,
386
+ 12, 12, 20, 21, 21, 24, 15, 23, 24, 25,
387
+ 7, 7, 17, 22, 24, 32, 18, 19, 19
388
+ } ;
389
+
390
+ static yyconst flex_int16_t yy_accept[211] =
391
+ { 0,
392
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
393
+ 4, 7, 9, 12, 14, 17, 19, 21, 24, 27,
394
+ 31, 33, 35, 37, 40, 42, 44, 46, 49, 52,
395
+ 54, 58, 60, 63, 65, 69, 71, 72, 73, 74,
396
+ 74, 74, 75, 75, 76, 76, 76, 77, 78, 78,
397
+ 79, 79, 79, 80, 82, 82, 82, 83, 84, 85,
398
+ 86, 87, 87, 87, 88, 88, 89, 90, 91, 93,
399
+ 94, 96, 98, 99, 100, 101, 103, 105, 106, 107,
400
+ 107, 108, 108, 108, 108, 109, 110, 110, 110, 110,
401
+ 110, 110, 110, 110, 111, 111, 111, 112, 114, 115,
402
+
403
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
404
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
405
+ 117, 117, 117, 117, 117, 118, 118, 118, 119, 119,
406
+ 119, 120, 121, 121, 121, 121, 121, 121, 121, 121,
407
+ 121, 121, 121, 121, 122, 123, 123, 123, 125, 125,
408
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
409
+ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
410
+ 126, 126, 126, 127, 127, 127, 127, 128, 128, 128,
411
+ 128, 128, 130, 130, 131, 131, 132, 132, 132, 132,
412
+ 132, 132, 133, 133, 133, 134, 134, 134, 134, 134,
413
+
414
+ 134, 134, 134, 136, 137, 139, 139, 140, 140, 140
415
+ } ;
416
+
417
+ static yyconst flex_int32_t yy_ec[256] =
418
+ { 0,
419
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
420
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
421
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422
+ 1, 5, 1, 6, 7, 1, 1, 1, 8, 9,
423
+ 9, 10, 1, 11, 12, 13, 14, 15, 16, 16,
424
+ 16, 16, 16, 15, 15, 15, 15, 17, 18, 19,
425
+ 1, 20, 1, 1, 21, 21, 21, 21, 21, 21,
426
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
427
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
428
+ 22, 1, 23, 1, 24, 1, 25, 25, 26, 27,
429
+
430
+ 28, 25, 29, 30, 31, 29, 32, 33, 29, 34,
431
+ 35, 36, 29, 37, 38, 39, 40, 41, 42, 29,
432
+ 29, 29, 6, 43, 6, 1, 1, 1, 1, 1,
433
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440
+
441
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446
+ 1, 1, 1, 1, 44
447
+ } ;
448
+
449
+ static yyconst flex_int32_t yy_meta[45] =
450
+ { 0,
451
+ 1, 2, 3, 3, 4, 5, 6, 7, 8, 9,
452
+ 10, 6, 11, 1, 12, 12, 1, 13, 5, 5,
453
+ 14, 15, 16, 17, 14, 14, 14, 14, 14, 14,
454
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
455
+ 14, 14, 1, 1
456
+ } ;
457
+
458
+ static yyconst flex_int16_t yy_base[235] =
459
+ { 0,
460
+ 0, 43, 52, 56, 60, 67, 44, 74, 522, 902,
461
+ 103, 84, 90, 36, 0, 485, 498, 480, 902, 107,
462
+ 105, 512, 0, 62, 902, 120, 502, 902, 80, 0,
463
+ 127, 163, 78, 0, 114, 175, 0, 138, 146, 0,
464
+ 0, 902, 150, 154, 158, 201, 205, 209, 48, 0,
465
+ 478, 178, 475, 0, 508, 507, 506, 902, 505, 902,
466
+ 496, 219, 494, 902, 481, 0, 113, 902, 0, 128,
467
+ 501, 902, 0, 167, 902, 0, 902, 902, 902, 223,
468
+ 227, 231, 237, 252, 256, 902, 477, 0, 0, 118,
469
+ 468, 458, 463, 457, 168, 457, 179, 187, 191, 274,
470
+
471
+ 451, 446, 88, 257, 221, 225, 247, 263, 178, 195,
472
+ 441, 289, 299, 303, 444, 443, 0, 329, 294, 276,
473
+ 288, 298, 293, 451, 447, 243, 435, 323, 327, 436,
474
+ 902, 902, 426, 424, 0, 423, 0, 315, 246, 372,
475
+ 317, 423, 414, 902, 416, 416, 360, 902, 347, 902,
476
+ 346, 316, 325, 447, 343, 348, 0, 0, 419, 336,
477
+ 307, 405, 338, 328, 335, 312, 412, 424, 309, 286,
478
+ 407, 129, 902, 290, 298, 265, 429, 216, 230, 410,
479
+ 416, 902, 220, 902, 200, 262, 429, 196, 0, 168,
480
+ 159, 294, 475, 481, 902, 152, 113, 106, 80, 0,
481
+
482
+ 76, 0, 902, 902, 902, 43, 902, 24, 902, 524,
483
+ 187, 541, 558, 573, 583, 594, 611, 626, 634, 651,
484
+ 663, 680, 697, 714, 731, 748, 765, 782, 799, 816,
485
+ 833, 850, 867, 884
486
+ } ;
487
+
488
+ static yyconst flex_int16_t yy_def[235] =
489
+ { 0,
490
+ 209, 1, 210, 210, 1, 1, 1, 1, 209, 209,
491
+ 209, 209, 209, 209, 211, 209, 209, 211, 209, 11,
492
+ 209, 212, 213, 211, 209, 209, 209, 209, 11, 214,
493
+ 20, 212, 11, 215, 20, 213, 11, 209, 209, 216,
494
+ 217, 209, 209, 209, 209, 209, 209, 209, 218, 211,
495
+ 209, 219, 211, 20, 209, 216, 209, 209, 209, 209,
496
+ 211, 209, 209, 209, 209, 29, 216, 209, 31, 216,
497
+ 209, 209, 33, 217, 209, 35, 209, 209, 209, 209,
498
+ 209, 209, 209, 209, 209, 209, 209, 220, 221, 221,
499
+ 221, 221, 221, 211, 209, 209, 209, 209, 209, 209,
500
+
501
+ 209, 220, 221, 209, 221, 221, 221, 221, 211, 222,
502
+ 209, 209, 209, 209, 209, 209, 223, 209, 118, 221,
503
+ 221, 221, 221, 209, 211, 224, 209, 209, 209, 209,
504
+ 209, 209, 223, 209, 225, 209, 226, 221, 221, 209,
505
+ 221, 209, 224, 209, 224, 209, 209, 209, 225, 209,
506
+ 226, 221, 221, 140, 227, 140, 228, 229, 209, 209,
507
+ 221, 221, 209, 227, 154, 228, 230, 209, 209, 209,
508
+ 221, 209, 209, 209, 154, 209, 230, 209, 209, 221,
509
+ 209, 209, 231, 209, 209, 209, 209, 209, 232, 231,
510
+ 209, 209, 209, 193, 209, 232, 209, 209, 209, 233,
511
+
512
+ 209, 234, 209, 209, 209, 233, 209, 234, 0, 209,
513
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
514
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
515
+ 209, 209, 209, 209
516
+ } ;
517
+
518
+ static yyconst flex_int16_t yy_nxt[947] =
519
+ { 0,
520
+ 10, 11, 12, 13, 11, 10, 14, 10, 10, 10,
521
+ 10, 10, 10, 10, 15, 15, 10, 10, 16, 10,
522
+ 15, 17, 10, 10, 15, 15, 15, 15, 15, 18,
523
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
524
+ 15, 15, 10, 19, 20, 33, 201, 20, 33, 21,
525
+ 49, 49, 22, 26, 26, 26, 26, 26, 26, 26,
526
+ 26, 29, 49, 49, 29, 199, 23, 34, 31, 30,
527
+ 27, 31, 24, 21, 27, 35, 32, 61, 35, 73,
528
+ 21, 66, 73, 22, 66, 43, 44, 45, 43, 67,
529
+ 23, 46, 47, 48, 46, 28, 24, 36, 207, 28,
530
+
531
+ 53, 74, 205, 24, 37, 38, 39, 37, 54, 57,
532
+ 116, 54, 40, 55, 97, 76, 56, 97, 76, 49,
533
+ 49, 62, 62, 62, 62, 204, 41, 42, 69, 97,
534
+ 117, 69, 98, 42, 104, 203, 70, 74, 63, 43,
535
+ 44, 45, 43, 181, 181, 105, 42, 46, 47, 48,
536
+ 46, 43, 44, 45, 43, 80, 81, 45, 80, 45,
537
+ 45, 45, 45, 64, 68, 68, 68, 71, 99, 110,
538
+ 72, 99, 110, 72, 188, 68, 75, 75, 75, 75,
539
+ 97, 42, 77, 97, 88, 77, 198, 77, 97, 42,
540
+ 197, 98, 99, 42, 124, 99, 110, 42, 50, 110,
541
+
542
+ 50, 42, 46, 45, 48, 46, 82, 45, 83, 82,
543
+ 84, 45, 85, 84, 90, 125, 91, 92, 195, 93,
544
+ 62, 62, 62, 62, 80, 81, 45, 80, 80, 81,
545
+ 45, 80, 82, 45, 83, 82, 191, 63, 45, 100,
546
+ 45, 45, 163, 116, 42, 144, 144, 116, 42, 186,
547
+ 121, 185, 42, 84, 45, 85, 84, 84, 45, 85,
548
+ 84, 120, 64, 117, 192, 192, 42, 117, 116, 116,
549
+ 42, 118, 118, 153, 42, 112, 45, 113, 112, 122,
550
+ 42, 119, 119, 119, 119, 116, 145, 184, 117, 117,
551
+ 112, 45, 113, 112, 123, 42, 192, 192, 116, 42,
552
+
553
+ 45, 128, 45, 45, 129, 117, 138, 129, 119, 119,
554
+ 116, 183, 182, 179, 140, 116, 136, 42, 117, 139,
555
+ 116, 130, 178, 141, 112, 45, 113, 112, 129, 116,
556
+ 117, 129, 42, 157, 176, 117, 137, 116, 116, 116,
557
+ 117, 171, 42, 118, 118, 130, 161, 116, 175, 117,
558
+ 174, 134, 152, 119, 119, 119, 119, 117, 117, 117,
559
+ 173, 154, 170, 162, 165, 163, 42, 117, 136, 134,
560
+ 163, 135, 154, 154, 154, 154, 154, 154, 154, 154,
561
+ 154, 154, 154, 154, 154, 155, 154, 154, 154, 154,
562
+ 154, 154, 154, 154, 160, 154, 156, 156, 156, 156,
563
+
564
+ 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
565
+ 156, 156, 156, 156, 154, 154, 144, 144, 144, 144,
566
+ 168, 172, 167, 168, 167, 168, 187, 116, 168, 116,
567
+ 181, 181, 116, 167, 167, 159, 158, 169, 188, 167,
568
+ 180, 167, 169, 193, 193, 150, 148, 117, 116, 117,
569
+ 167, 167, 117, 194, 194, 194, 194, 145, 189, 145,
570
+ 154, 147, 146, 124, 142, 132, 131, 127, 115, 163,
571
+ 114, 154, 154, 154, 154, 154, 154, 154, 154, 154,
572
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 193,
573
+ 193, 111, 109, 108, 107, 194, 194, 199, 106, 194,
574
+
575
+ 194, 194, 194, 201, 101, 59, 96, 65, 95, 59,
576
+ 57, 59, 57, 94, 87, 65, 59, 200, 53, 52,
577
+ 51, 209, 209, 202, 25, 25, 25, 25, 25, 25,
578
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
579
+ 25, 58, 209, 209, 58, 58, 58, 58, 58, 209,
580
+ 58, 209, 58, 58, 58, 58, 58, 58, 60, 209,
581
+ 209, 209, 60, 60, 60, 60, 60, 60, 60, 60,
582
+ 60, 60, 60, 60, 68, 68, 68, 209, 209, 68,
583
+ 209, 209, 68, 68, 75, 75, 75, 209, 209, 75,
584
+ 209, 209, 75, 75, 78, 209, 209, 209, 78, 78,
585
+
586
+ 78, 78, 209, 78, 209, 78, 78, 78, 78, 78,
587
+ 78, 79, 209, 209, 209, 79, 79, 79, 79, 79,
588
+ 79, 79, 79, 79, 79, 79, 79, 86, 86, 86,
589
+ 209, 209, 209, 86, 209, 86, 86, 86, 86, 89,
590
+ 209, 209, 209, 209, 209, 89, 209, 89, 209, 209,
591
+ 89, 102, 102, 209, 102, 102, 102, 102, 102, 102,
592
+ 102, 102, 102, 102, 102, 209, 209, 102, 103, 209,
593
+ 209, 209, 209, 209, 103, 209, 103, 209, 209, 103,
594
+ 126, 126, 209, 126, 126, 126, 126, 126, 126, 126,
595
+ 126, 126, 126, 126, 126, 126, 126, 133, 133, 133,
596
+
597
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
598
+ 133, 209, 209, 133, 143, 143, 143, 143, 143, 143,
599
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
600
+ 143, 149, 149, 149, 149, 149, 149, 149, 149, 149,
601
+ 149, 149, 149, 149, 149, 209, 209, 149, 151, 151,
602
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
603
+ 151, 151, 209, 209, 151, 164, 164, 164, 164, 164,
604
+ 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
605
+ 164, 164, 166, 166, 166, 166, 166, 166, 166, 166,
606
+ 166, 166, 166, 166, 166, 166, 166, 209, 166, 167,
607
+
608
+ 167, 209, 209, 209, 167, 167, 209, 209, 167, 167,
609
+ 167, 167, 167, 167, 167, 167, 177, 177, 209, 209,
610
+ 209, 177, 177, 209, 209, 177, 177, 177, 177, 177,
611
+ 177, 177, 177, 190, 190, 190, 190, 190, 190, 190,
612
+ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
613
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
614
+ 196, 196, 196, 196, 209, 209, 196, 206, 206, 206,
615
+ 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
616
+ 206, 209, 209, 206, 208, 208, 208, 208, 208, 208,
617
+ 208, 208, 208, 208, 208, 208, 208, 208, 209, 209,
618
+
619
+ 208, 9, 209, 209, 209, 209, 209, 209, 209, 209,
620
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
621
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
622
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
623
+ 209, 209, 209, 209, 209, 209
624
+ } ;
625
+
626
+ static yyconst flex_int16_t yy_chk[947] =
627
+ { 0,
628
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
629
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
630
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
631
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
632
+ 1, 1, 1, 1, 2, 7, 208, 2, 7, 2,
633
+ 14, 14, 2, 3, 3, 3, 3, 4, 4, 4,
634
+ 4, 5, 49, 49, 5, 206, 2, 7, 6, 5,
635
+ 3, 6, 2, 6, 4, 8, 6, 24, 8, 33,
636
+ 8, 29, 33, 8, 29, 12, 12, 12, 12, 29,
637
+ 6, 13, 13, 13, 13, 3, 6, 8, 201, 4,
638
+
639
+ 24, 33, 199, 8, 11, 11, 11, 11, 20, 21,
640
+ 103, 20, 11, 20, 67, 35, 20, 67, 35, 21,
641
+ 21, 26, 26, 26, 26, 198, 11, 12, 31, 70,
642
+ 103, 31, 70, 13, 90, 197, 31, 35, 26, 38,
643
+ 38, 38, 38, 172, 172, 90, 11, 39, 39, 39,
644
+ 39, 43, 43, 43, 43, 44, 44, 44, 44, 45,
645
+ 45, 45, 45, 26, 32, 32, 32, 32, 74, 95,
646
+ 32, 74, 95, 32, 196, 32, 36, 36, 36, 36,
647
+ 97, 38, 36, 97, 52, 36, 191, 36, 98, 39,
648
+ 190, 98, 99, 43, 109, 99, 110, 44, 211, 110,
649
+
650
+ 211, 45, 46, 46, 46, 46, 47, 47, 47, 47,
651
+ 48, 48, 48, 48, 52, 109, 52, 52, 188, 52,
652
+ 62, 62, 62, 62, 80, 80, 80, 80, 81, 81,
653
+ 81, 81, 82, 82, 82, 82, 185, 62, 83, 83,
654
+ 83, 83, 183, 105, 46, 126, 126, 106, 47, 179,
655
+ 106, 178, 48, 84, 84, 84, 84, 85, 85, 85,
656
+ 85, 105, 62, 105, 186, 186, 80, 106, 139, 107,
657
+ 81, 104, 104, 139, 82, 100, 100, 100, 100, 107,
658
+ 83, 104, 104, 104, 104, 108, 126, 176, 139, 107,
659
+ 112, 112, 112, 112, 108, 84, 192, 192, 120, 85,
660
+
661
+ 113, 113, 113, 113, 114, 108, 120, 114, 119, 119,
662
+ 121, 175, 174, 170, 122, 123, 119, 100, 120, 121,
663
+ 122, 114, 169, 123, 128, 128, 128, 128, 129, 161,
664
+ 121, 129, 112, 141, 166, 123, 119, 138, 152, 141,
665
+ 122, 161, 113, 118, 118, 129, 152, 153, 165, 161,
666
+ 164, 118, 138, 118, 118, 118, 118, 138, 152, 141,
667
+ 163, 156, 160, 153, 156, 155, 128, 153, 151, 149,
668
+ 156, 118, 140, 140, 140, 140, 140, 140, 140, 140,
669
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
670
+ 140, 140, 140, 140, 147, 140, 140, 140, 140, 140,
671
+
672
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
673
+ 140, 140, 140, 140, 140, 140, 143, 143, 145, 145,
674
+ 159, 162, 167, 159, 167, 168, 180, 162, 168, 171,
675
+ 181, 181, 180, 167, 167, 146, 142, 159, 181, 177,
676
+ 171, 177, 168, 187, 187, 136, 134, 162, 133, 171,
677
+ 177, 177, 180, 187, 187, 187, 187, 143, 181, 145,
678
+ 154, 130, 127, 125, 124, 116, 115, 111, 102, 154,
679
+ 101, 154, 154, 154, 154, 154, 154, 154, 154, 154,
680
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 193,
681
+ 193, 96, 94, 93, 92, 194, 194, 193, 91, 193,
682
+
683
+ 193, 193, 193, 194, 87, 71, 65, 63, 61, 59,
684
+ 57, 56, 55, 53, 51, 27, 22, 193, 18, 17,
685
+ 16, 9, 0, 194, 210, 210, 210, 210, 210, 210,
686
+ 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
687
+ 210, 212, 0, 0, 212, 212, 212, 212, 212, 0,
688
+ 212, 0, 212, 212, 212, 212, 212, 212, 213, 0,
689
+ 0, 0, 213, 213, 213, 213, 213, 213, 213, 213,
690
+ 213, 213, 213, 213, 214, 214, 214, 0, 0, 214,
691
+ 0, 0, 214, 214, 215, 215, 215, 0, 0, 215,
692
+ 0, 0, 215, 215, 216, 0, 0, 0, 216, 216,
693
+
694
+ 216, 216, 0, 216, 0, 216, 216, 216, 216, 216,
695
+ 216, 217, 0, 0, 0, 217, 217, 217, 217, 217,
696
+ 217, 217, 217, 217, 217, 217, 217, 218, 218, 218,
697
+ 0, 0, 0, 218, 0, 218, 218, 218, 218, 219,
698
+ 0, 0, 0, 0, 0, 219, 0, 219, 0, 0,
699
+ 219, 220, 220, 0, 220, 220, 220, 220, 220, 220,
700
+ 220, 220, 220, 220, 220, 0, 0, 220, 221, 0,
701
+ 0, 0, 0, 0, 221, 0, 221, 0, 0, 221,
702
+ 222, 222, 0, 222, 222, 222, 222, 222, 222, 222,
703
+ 222, 222, 222, 222, 222, 222, 222, 223, 223, 223,
704
+
705
+ 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
706
+ 223, 0, 0, 223, 224, 224, 224, 224, 224, 224,
707
+ 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
708
+ 224, 225, 225, 225, 225, 225, 225, 225, 225, 225,
709
+ 225, 225, 225, 225, 225, 0, 0, 225, 226, 226,
710
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
711
+ 226, 226, 0, 0, 226, 227, 227, 227, 227, 227,
712
+ 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
713
+ 227, 227, 228, 228, 228, 228, 228, 228, 228, 228,
714
+ 228, 228, 228, 228, 228, 228, 228, 0, 228, 229,
715
+
716
+ 229, 0, 0, 0, 229, 229, 0, 0, 229, 229,
717
+ 229, 229, 229, 229, 229, 229, 230, 230, 0, 0,
718
+ 0, 230, 230, 0, 0, 230, 230, 230, 230, 230,
719
+ 230, 230, 230, 231, 231, 231, 231, 231, 231, 231,
720
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
721
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
722
+ 232, 232, 232, 232, 0, 0, 232, 233, 233, 233,
723
+ 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
724
+ 233, 0, 0, 233, 234, 234, 234, 234, 234, 234,
725
+ 234, 234, 234, 234, 234, 234, 234, 234, 0, 0,
726
+
727
+ 234, 209, 209, 209, 209, 209, 209, 209, 209, 209,
728
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
729
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
730
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
731
+ 209, 209, 209, 209, 209, 209
732
+ } ;
733
+
734
+ extern int yy_flex_debug;
735
+ int yy_flex_debug = 0;
736
+
737
+ static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
738
+ static char *yy_full_match;
739
+ static int yy_lp;
740
+ static int yy_looking_for_trail_begin = 0;
741
+ static int yy_full_lp;
742
+ static int *yy_full_state;
743
+ #define YY_TRAILING_MASK 0x2000
744
+ #define YY_TRAILING_HEAD_MASK 0x4000
745
+ #define REJECT \
746
+ { \
747
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
748
+ yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
749
+ (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
750
+ (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
751
+ yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
752
+ ++(yy_lp); \
753
+ goto find_rule; \
754
+ }
755
+
756
+ #define yymore() yymore_used_but_not_detected
757
+ #define YY_MORE_ADJ 0
758
+ #define YY_RESTORE_YY_MORE_OFFSET
759
+ char *yytext;
760
+ #line 1 "parser.l"
761
+ #line 2 "parser.l"
762
+ #include <stdlib.h>
763
+ #include "parser.tab.h"
764
+
765
+ // HACK for parsing end of bold/italic text at EOF
766
+ // see http://flex.sourceforge.net/manual/How-can-I-match-text-only-at-the-end-of-a-file_003f.html#How-can-I-match-text-only-at-the-end-of-a-file_003f
767
+ int was_fake_br = 0;
768
+
769
+ extern char* in_buf;
770
+ extern char* in_pos;
771
+ extern size_t in_buf_len;
772
+
773
+ #undef YY_BUF_SIZE
774
+ #define YY_BUF_SIZE 1300000
775
+ #undef YY_READ_BUF_SIZE
776
+ #define YY_READ_BUF_SIZE 1200000
777
+
778
+ #define YY_NO_UNISTD_H
779
+
780
+
781
+ #define MIN(a,b) ((a) < (b)) ? (a) : (b)
782
+
783
+ #ifdef RUBY_VERSION
784
+
785
+ #define YY_INPUT(buf,result,max_size) \
786
+ { \
787
+ size_t unread_size = in_buf_len - (in_pos - in_buf); \
788
+ if( unread_size > 0 ){ \
789
+ size_t blocksize = MIN(max_size, unread_size); \
790
+ was_fake_br = 0; \
791
+ memcpy(buf,in_pos,blocksize); \
792
+ in_pos += blocksize; \
793
+ result = blocksize; \
794
+ } else if ( !was_fake_br ){ \
795
+ memcpy(buf,"\n\xff",2); result = 2; was_fake_br = 1; \
796
+ } else { \
797
+ result = 0; \
798
+ } \
799
+ }
800
+
801
+ #else
802
+
803
+ #define YY_INPUT(buf,result,max_size) \
804
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
805
+ { \
806
+ int c = '*'; \
807
+ int n; \
808
+ for ( n = 0; n < max_size && \
809
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
810
+ buf[n] = (char) c; \
811
+ if ( c == '\n' ) \
812
+ buf[n++] = (char) c; \
813
+ if ( c == EOF && ferror( yyin ) ) \
814
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
815
+ result = n; \
816
+ } \
817
+ else \
818
+ { \
819
+ errno=0; \
820
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
821
+ { \
822
+ if( errno != EINTR) \
823
+ { \
824
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
825
+ break; \
826
+ } \
827
+ errno=0; \
828
+ clearerr(yyin); \
829
+ } \
830
+ }\
831
+ if( result == 0 && errno == 0 && was_fake_br == 0 ){\
832
+ strcpy(buf,"\n\xff"); result = 2; was_fake_br = 1; \
833
+ }
834
+
835
+ #endif // ifdef RUBY_VERSION
836
+
837
+
838
+
839
+ #line 840 "lex.yy.c"
840
+
841
+ #define INITIAL 0
842
+ #define _PRE 1
843
+ #define _BOLD 2
844
+ #define _ITALIC 3
845
+
846
+ #ifndef YY_NO_UNISTD_H
847
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
848
+ * down here because we want the user's section 1 to have been scanned first.
849
+ * The user has a chance to override it with an option.
850
+ */
851
+ #include <unistd.h>
852
+ #endif
853
+
854
+ #ifndef YY_EXTRA_TYPE
855
+ #define YY_EXTRA_TYPE void *
856
+ #endif
857
+
858
+ static int yy_init_globals (void );
859
+
860
+ /* Accessor methods to globals.
861
+ These are made visible to non-reentrant scanners for convenience. */
862
+
863
+ int yylex_destroy (void );
864
+
865
+ int yyget_debug (void );
866
+
867
+ void yyset_debug (int debug_flag );
868
+
869
+ YY_EXTRA_TYPE yyget_extra (void );
870
+
871
+ void yyset_extra (YY_EXTRA_TYPE user_defined );
872
+
873
+ FILE *yyget_in (void );
874
+
875
+ void yyset_in (FILE * in_str );
876
+
877
+ FILE *yyget_out (void );
878
+
879
+ void yyset_out (FILE * out_str );
880
+
881
+ int yyget_leng (void );
882
+
883
+ char *yyget_text (void );
884
+
885
+ int yyget_lineno (void );
886
+
887
+ void yyset_lineno (int line_number );
888
+
889
+ /* Macros after this point can all be overridden by user definitions in
890
+ * section 1.
891
+ */
892
+
893
+ #ifndef YY_SKIP_YYWRAP
894
+ #ifdef __cplusplus
895
+ extern "C" int yywrap (void );
896
+ #else
897
+ extern int yywrap (void );
898
+ #endif
899
+ #endif
900
+
901
+ static void yyunput (int c,char *buf_ptr );
902
+
903
+ #ifndef yytext_ptr
904
+ static void yy_flex_strncpy (char *,yyconst char *,int );
905
+ #endif
906
+
907
+ #ifdef YY_NEED_STRLEN
908
+ static int yy_flex_strlen (yyconst char * );
909
+ #endif
910
+
911
+ #ifndef YY_NO_INPUT
912
+
913
+ #ifdef __cplusplus
914
+ static int yyinput (void );
915
+ #else
916
+ static int input (void );
917
+ #endif
918
+
919
+ #endif
920
+
921
+ static int yy_start_stack_ptr = 0;
922
+ static int yy_start_stack_depth = 0;
923
+ static int *yy_start_stack = NULL;
924
+
925
+ static void yy_push_state (int new_state );
926
+
927
+ static void yy_pop_state (void );
928
+
929
+ static int yy_top_state (void );
930
+
931
+ /* Amount of stuff to slurp up with each read. */
932
+ #ifndef YY_READ_BUF_SIZE
933
+ #define YY_READ_BUF_SIZE 8192
934
+ #endif
935
+
936
+ /* Copy whatever the last rule matched to the standard output. */
937
+ #ifndef ECHO
938
+ /* This used to be an fputs(), but since the string might contain NUL's,
939
+ * we now use fwrite().
940
+ */
941
+ #define ECHO fwrite( yytext, yyleng, 1, yyout )
942
+ #endif
943
+
944
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
945
+ * is returned in "result".
946
+ */
947
+ #ifndef YY_INPUT
948
+ #define YY_INPUT(buf,result,max_size) \
949
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
950
+ { \
951
+ int c = '*'; \
952
+ int n; \
953
+ for ( n = 0; n < max_size && \
954
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
955
+ buf[n] = (char) c; \
956
+ if ( c == '\n' ) \
957
+ buf[n++] = (char) c; \
958
+ if ( c == EOF && ferror( yyin ) ) \
959
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
960
+ result = n; \
961
+ } \
962
+ else \
963
+ { \
964
+ errno=0; \
965
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
966
+ { \
967
+ if( errno != EINTR) \
968
+ { \
969
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
970
+ break; \
971
+ } \
972
+ errno=0; \
973
+ clearerr(yyin); \
974
+ } \
975
+ }\
976
+ \
977
+
978
+ #endif
979
+
980
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
981
+ * we don't want an extra ';' after the "return" because that will cause
982
+ * some compilers to complain about unreachable statements.
983
+ */
984
+ #ifndef yyterminate
985
+ #define yyterminate() return YY_NULL
986
+ #endif
987
+
988
+ /* Number of entries by which start-condition stack grows. */
989
+ #ifndef YY_START_STACK_INCR
990
+ #define YY_START_STACK_INCR 25
991
+ #endif
992
+
993
+ /* Report a fatal error. */
994
+ #ifndef YY_FATAL_ERROR
995
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
996
+ #endif
997
+
998
+ /* end tables serialization structures and prototypes */
999
+
1000
+ /* Default declaration of generated scanner - a define so the user can
1001
+ * easily add parameters.
1002
+ */
1003
+ #ifndef YY_DECL
1004
+ #define YY_DECL_IS_OURS 1
1005
+
1006
+ extern int yylex (void);
1007
+
1008
+ #define YY_DECL int yylex (void)
1009
+ #endif /* !YY_DECL */
1010
+
1011
+ /* Code executed at the beginning of each rule, after yytext and yyleng
1012
+ * have been set up.
1013
+ */
1014
+ #ifndef YY_USER_ACTION
1015
+ #define YY_USER_ACTION
1016
+ #endif
1017
+
1018
+ /* Code executed at the end of each rule. */
1019
+ #ifndef YY_BREAK
1020
+ #define YY_BREAK break;
1021
+ #endif
1022
+
1023
+ #define YY_RULE_SETUP \
1024
+ if ( yyleng > 0 ) \
1025
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1026
+ (yytext[yyleng - 1] == '\n'); \
1027
+ YY_USER_ACTION
1028
+
1029
+ /** The main scanner function which does all the work.
1030
+ */
1031
+ YY_DECL
1032
+ {
1033
+ register yy_state_type yy_current_state;
1034
+ register char *yy_cp, *yy_bp;
1035
+ register int yy_act;
1036
+
1037
+ #line 85 "parser.l"
1038
+
1039
+
1040
+ #line 1041 "lex.yy.c"
1041
+
1042
+ if ( !(yy_init) )
1043
+ {
1044
+ (yy_init) = 1;
1045
+
1046
+ #ifdef YY_USER_INIT
1047
+ YY_USER_INIT;
1048
+ #endif
1049
+
1050
+ /* Create the reject buffer large enough to save one state per allowed character. */
1051
+ if ( ! (yy_state_buf) )
1052
+ (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
1053
+ if ( ! (yy_state_buf) )
1054
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1055
+
1056
+ if ( ! (yy_start) )
1057
+ (yy_start) = 1; /* first start state */
1058
+
1059
+ if ( ! yyin )
1060
+ yyin = stdin;
1061
+
1062
+ if ( ! yyout )
1063
+ yyout = stdout;
1064
+
1065
+ if ( ! YY_CURRENT_BUFFER ) {
1066
+ yyensure_buffer_stack ();
1067
+ YY_CURRENT_BUFFER_LVALUE =
1068
+ yy_create_buffer(yyin,YY_BUF_SIZE );
1069
+ }
1070
+
1071
+ yy_load_buffer_state( );
1072
+ }
1073
+
1074
+ while ( 1 ) /* loops until end-of-file is reached */
1075
+ {
1076
+ yy_cp = (yy_c_buf_p);
1077
+
1078
+ /* Support of yytext. */
1079
+ *yy_cp = (yy_hold_char);
1080
+
1081
+ /* yy_bp points to the position in yy_ch_buf of the start of
1082
+ * the current run.
1083
+ */
1084
+ yy_bp = yy_cp;
1085
+
1086
+ yy_current_state = (yy_start);
1087
+ yy_current_state += YY_AT_BOL();
1088
+
1089
+ (yy_state_ptr) = (yy_state_buf);
1090
+ *(yy_state_ptr)++ = yy_current_state;
1091
+
1092
+ yy_match:
1093
+ do
1094
+ {
1095
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1096
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1097
+ {
1098
+ yy_current_state = (int) yy_def[yy_current_state];
1099
+ if ( yy_current_state >= 210 )
1100
+ yy_c = yy_meta[(unsigned int) yy_c];
1101
+ }
1102
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1103
+ *(yy_state_ptr)++ = yy_current_state;
1104
+ ++yy_cp;
1105
+ }
1106
+ while ( yy_base[yy_current_state] != 902 );
1107
+
1108
+ yy_find_action:
1109
+ yy_current_state = *--(yy_state_ptr);
1110
+ (yy_lp) = yy_accept[yy_current_state];
1111
+ find_rule: /* we branch to this label when backing up */
1112
+ for ( ; ; ) /* until we find what rule we matched */
1113
+ {
1114
+ if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1115
+ {
1116
+ yy_act = yy_acclist[(yy_lp)];
1117
+ if ( yy_act & YY_TRAILING_HEAD_MASK ||
1118
+ (yy_looking_for_trail_begin) )
1119
+ {
1120
+ if ( yy_act == (yy_looking_for_trail_begin) )
1121
+ {
1122
+ (yy_looking_for_trail_begin) = 0;
1123
+ yy_act &= ~YY_TRAILING_HEAD_MASK;
1124
+ break;
1125
+ }
1126
+ }
1127
+ else if ( yy_act & YY_TRAILING_MASK )
1128
+ {
1129
+ (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1130
+ (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1131
+ }
1132
+ else
1133
+ {
1134
+ (yy_full_match) = yy_cp;
1135
+ (yy_full_state) = (yy_state_ptr);
1136
+ (yy_full_lp) = (yy_lp);
1137
+ break;
1138
+ }
1139
+ ++(yy_lp);
1140
+ goto find_rule;
1141
+ }
1142
+ --yy_cp;
1143
+ yy_current_state = *--(yy_state_ptr);
1144
+ (yy_lp) = yy_accept[yy_current_state];
1145
+ }
1146
+
1147
+ YY_DO_BEFORE_ACTION;
1148
+
1149
+ do_action: /* This label is used only to access EOF actions. */
1150
+
1151
+ switch ( yy_act )
1152
+ { /* beginning of action switch */
1153
+ case 1:
1154
+ YY_RULE_SETUP
1155
+ #line 87 "parser.l"
1156
+ ; /* EOF mark. should not appear in valid UTF8 text */
1157
+ YY_BREAK
1158
+ case 2:
1159
+ /* rule 2 can match eol */
1160
+ YY_RULE_SETUP
1161
+ #line 88 "parser.l"
1162
+ ; /* EOF + skip tailing whitespace */
1163
+ YY_BREAK
1164
+ case 3:
1165
+ /* rule 3 can match eol */
1166
+ YY_RULE_SETUP
1167
+ #line 91 "parser.l"
1168
+ { return BRBR; }
1169
+ YY_BREAK
1170
+ case 4:
1171
+ YY_RULE_SETUP
1172
+ #line 92 "parser.l"
1173
+ { return BRBR; }
1174
+ YY_BREAK
1175
+ case 5:
1176
+ /* rule 5 can match eol */
1177
+ YY_RULE_SETUP
1178
+ #line 93 "parser.l"
1179
+ { return BRBR; }
1180
+ YY_BREAK
1181
+ case 6:
1182
+ /* rule 6 can match eol */
1183
+ YY_RULE_SETUP
1184
+ #line 95 "parser.l"
1185
+ { return BR; }
1186
+ YY_BREAK
1187
+ case 7:
1188
+ /* rule 7 can match eol */
1189
+ YY_RULE_SETUP
1190
+ #line 97 "parser.l"
1191
+ { BEGIN _PRE; return PRE_START; }
1192
+ YY_BREAK
1193
+ case 8:
1194
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1195
+ (yy_c_buf_p) = yy_cp = yy_bp + 1;
1196
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1197
+ YY_RULE_SETUP
1198
+ #line 99 "parser.l"
1199
+ { yylval.ivalue=0; yy_push_state(_BOLD); return BOLD_START; }
1200
+ YY_BREAK
1201
+ case 9:
1202
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1203
+ (yy_c_buf_p) = yy_cp -= 1;
1204
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1205
+ YY_RULE_SETUP
1206
+ #line 100 "parser.l"
1207
+ { yylval.ivalue=1; yy_push_state(_BOLD); return BOLD_START; }
1208
+ YY_BREAK
1209
+ case 10:
1210
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1211
+ (yy_c_buf_p) = yy_cp = yy_bp + 1;
1212
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1213
+ YY_RULE_SETUP
1214
+ #line 102 "parser.l"
1215
+ { yylval.ivalue=0; yy_push_state(_ITALIC); return ITALIC_START; }
1216
+ YY_BREAK
1217
+ case 11:
1218
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1219
+ (yy_c_buf_p) = yy_cp -= 1;
1220
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1221
+ YY_RULE_SETUP
1222
+ #line 103 "parser.l"
1223
+ { yylval.ivalue=1; yy_push_state(_ITALIC); return ITALIC_START; }
1224
+ YY_BREAK
1225
+ case 12:
1226
+ /* rule 12 can match eol */
1227
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1228
+ (yy_c_buf_p) = yy_cp -= 1;
1229
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1230
+ YY_RULE_SETUP
1231
+ #line 105 "parser.l"
1232
+ {
1233
+ yylval.svalue = yytext+4;
1234
+ switch(yytext[1]){
1235
+ case '1': return H1;
1236
+ case '2': return H2;
1237
+ case '3': return H3;
1238
+ case '4': return H4;
1239
+ case '5': return H5;
1240
+ }
1241
+ return H1;
1242
+ }
1243
+ YY_BREAK
1244
+ case 13:
1245
+ YY_RULE_SETUP
1246
+ #line 117 "parser.l"
1247
+ { return ULI; }
1248
+ YY_BREAK
1249
+ case 14:
1250
+ YY_RULE_SETUP
1251
+ #line 118 "parser.l"
1252
+ { return OLI; }
1253
+ YY_BREAK
1254
+ case 15:
1255
+ YY_RULE_SETUP
1256
+ #line 120 "parser.l"
1257
+ { yylval.svalue = yytext; return URL; }
1258
+ YY_BREAK
1259
+ case 16:
1260
+ /* rule 16 can match eol */
1261
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1262
+ (yy_c_buf_p) = yy_cp -= 1;
1263
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1264
+ YY_RULE_SETUP
1265
+ #line 122 "parser.l"
1266
+ { yylval.svalue = yytext; return TICKET_LINK; }
1267
+ YY_BREAK
1268
+ case 17:
1269
+ /* rule 17 can match eol */
1270
+ YY_RULE_SETUP
1271
+ #line 123 "parser.l"
1272
+ { yylval.svalue = yytext; return TICKET_LINK; }
1273
+ YY_BREAK
1274
+ case 18:
1275
+ /* rule 18 can match eol */
1276
+ YY_RULE_SETUP
1277
+ #line 125 "parser.l"
1278
+ { yylval.svalue = yytext+11; return SVN_REVISION_LINK; }
1279
+ YY_BREAK
1280
+ case 19:
1281
+ /* rule 19 can match eol */
1282
+ YY_RULE_SETUP
1283
+ #line 126 "parser.l"
1284
+ { yylval.svalue = yytext+11; return GIT_REVISION_LINK; }
1285
+ YY_BREAK
1286
+ case 20:
1287
+ /* rule 20 can match eol */
1288
+ YY_RULE_SETUP
1289
+ #line 127 "parser.l"
1290
+ { yylval.svalue = yytext+4; return SVN_REVISION_LINK; }
1291
+ YY_BREAK
1292
+ case 21:
1293
+ /* rule 21 can match eol */
1294
+ YY_RULE_SETUP
1295
+ #line 128 "parser.l"
1296
+ { yylval.svalue = yytext+4; return GIT_REVISION_LINK; }
1297
+ YY_BREAK
1298
+ case 22:
1299
+ /* rule 22 can match eol */
1300
+ YY_RULE_SETUP
1301
+ #line 130 "parser.l"
1302
+ { yylval.svalue = yytext+6; return URL_WITH_PROTO_LINK; }
1303
+ YY_BREAK
1304
+ case 23:
1305
+ /* rule 23 can match eol */
1306
+ YY_RULE_SETUP
1307
+ #line 131 "parser.l"
1308
+ { yylval.svalue = yytext+6; return URL_WITH_PROTO_LINK; }
1309
+ YY_BREAK
1310
+ case 24:
1311
+ /* rule 24 can match eol */
1312
+ YY_RULE_SETUP
1313
+ #line 132 "parser.l"
1314
+ { yylval.svalue = yytext+6; return URL_WITHOUT_PROTO_LINK; }
1315
+ YY_BREAK
1316
+ case 25:
1317
+ /* rule 25 can match eol */
1318
+ YY_RULE_SETUP
1319
+ #line 134 "parser.l"
1320
+ { yylval.svalue = yytext+7; return WIKI_LINK; }
1321
+ YY_BREAK
1322
+ case 26:
1323
+ /* rule 26 can match eol */
1324
+ YY_RULE_SETUP
1325
+ #line 135 "parser.l"
1326
+ { yylval.svalue = yytext+2; return WIKI_LINK; }
1327
+ YY_BREAK
1328
+ case 27:
1329
+ YY_RULE_SETUP
1330
+ #line 137 "parser.l"
1331
+ { yylval.svalue = yytext+3; return ANCHOR_LINK; }
1332
+ YY_BREAK
1333
+ case 28:
1334
+ YY_RULE_SETUP
1335
+ #line 139 "parser.l"
1336
+ ; /* skip spaces at line start */
1337
+ YY_BREAK
1338
+ case 29:
1339
+ YY_RULE_SETUP
1340
+ #line 140 "parser.l"
1341
+ { yylval.ivalue = ' '; return T_CHAR; }
1342
+ YY_BREAK
1343
+ case 30:
1344
+ YY_RULE_SETUP
1345
+ #line 142 "parser.l"
1346
+ { yylval.svalue = yytext; return T_WORD; }
1347
+ YY_BREAK
1348
+ case 31:
1349
+ YY_RULE_SETUP
1350
+ #line 144 "parser.l"
1351
+ { yylval.ivalue = yytext[0]; return T_CHAR; }
1352
+ YY_BREAK
1353
+ case 32:
1354
+ /* rule 32 can match eol */
1355
+ YY_RULE_SETUP
1356
+ #line 148 "parser.l"
1357
+ { BEGIN INITIAL; return PRE_END; }
1358
+ YY_BREAK
1359
+ case 33:
1360
+ /* rule 33 can match eol */
1361
+ YY_RULE_SETUP
1362
+ #line 149 "parser.l"
1363
+ { BEGIN INITIAL; return PRE_END; }
1364
+ YY_BREAK
1365
+ case 34:
1366
+ YY_RULE_SETUP
1367
+ #line 150 "parser.l"
1368
+ { yylval.ivalue = yytext[0]; return T_CHAR; }
1369
+ YY_BREAK
1370
+ case YY_STATE_EOF(_PRE):
1371
+ #line 151 "parser.l"
1372
+ { BEGIN INITIAL; return PRE_END; }
1373
+ YY_BREAK
1374
+ case 35:
1375
+ YY_RULE_SETUP
1376
+ #line 153 "parser.l"
1377
+ { yylval.svalue = " *"; return T_WORD; } /* skip lone star */
1378
+ YY_BREAK
1379
+ case 36:
1380
+ /* rule 36 can match eol */
1381
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1382
+ (yy_c_buf_p) = yy_cp = yy_bp + 1;
1383
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1384
+ YY_RULE_SETUP
1385
+ #line 154 "parser.l"
1386
+ { yy_pop_state(); return BOLD_END; }
1387
+ YY_BREAK
1388
+ case YY_STATE_EOF(_BOLD):
1389
+ #line 155 "parser.l"
1390
+ { yy_pop_state(); return BOLD_END; }
1391
+ YY_BREAK
1392
+ case 37:
1393
+ YY_RULE_SETUP
1394
+ #line 157 "parser.l"
1395
+ { yylval.svalue = " _"; return T_WORD; } /* skip lone underscore */
1396
+ YY_BREAK
1397
+ case 38:
1398
+ /* rule 38 can match eol */
1399
+ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1400
+ (yy_c_buf_p) = yy_cp = yy_bp + 1;
1401
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
1402
+ YY_RULE_SETUP
1403
+ #line 158 "parser.l"
1404
+ { yy_pop_state(); return ITALIC_END; }
1405
+ YY_BREAK
1406
+ case YY_STATE_EOF(_ITALIC):
1407
+ #line 159 "parser.l"
1408
+ { yy_pop_state(); return ITALIC_END; }
1409
+ YY_BREAK
1410
+ case 39:
1411
+ YY_RULE_SETUP
1412
+ #line 161 "parser.l"
1413
+ ECHO;
1414
+ YY_BREAK
1415
+ #line 1416 "lex.yy.c"
1416
+ case YY_STATE_EOF(INITIAL):
1417
+ yyterminate();
1418
+
1419
+ case YY_END_OF_BUFFER:
1420
+ {
1421
+ /* Amount of text matched not including the EOB char. */
1422
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1423
+
1424
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1425
+ *yy_cp = (yy_hold_char);
1426
+ YY_RESTORE_YY_MORE_OFFSET
1427
+
1428
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1429
+ {
1430
+ /* We're scanning a new file or input source. It's
1431
+ * possible that this happened because the user
1432
+ * just pointed yyin at a new source and called
1433
+ * yylex(). If so, then we have to assure
1434
+ * consistency between YY_CURRENT_BUFFER and our
1435
+ * globals. Here is the right place to do so, because
1436
+ * this is the first action (other than possibly a
1437
+ * back-up) that will match for the new input source.
1438
+ */
1439
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1440
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1441
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1442
+ }
1443
+
1444
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1445
+ * of the first EOB in the buffer, since yy_c_buf_p will
1446
+ * already have been incremented past the NUL character
1447
+ * (since all states make transitions on EOB to the
1448
+ * end-of-buffer state). Contrast this with the test
1449
+ * in input().
1450
+ */
1451
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1452
+ { /* This was really a NUL. */
1453
+ yy_state_type yy_next_state;
1454
+
1455
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1456
+
1457
+ yy_current_state = yy_get_previous_state( );
1458
+
1459
+ /* Okay, we're now positioned to make the NUL
1460
+ * transition. We couldn't have
1461
+ * yy_get_previous_state() go ahead and do it
1462
+ * for us because it doesn't know how to deal
1463
+ * with the possibility of jamming (and we don't
1464
+ * want to build jamming into it because then it
1465
+ * will run more slowly).
1466
+ */
1467
+
1468
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
1469
+
1470
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1471
+
1472
+ if ( yy_next_state )
1473
+ {
1474
+ /* Consume the NUL. */
1475
+ yy_cp = ++(yy_c_buf_p);
1476
+ yy_current_state = yy_next_state;
1477
+ goto yy_match;
1478
+ }
1479
+
1480
+ else
1481
+ {
1482
+ yy_cp = (yy_c_buf_p);
1483
+ goto yy_find_action;
1484
+ }
1485
+ }
1486
+
1487
+ else switch ( yy_get_next_buffer( ) )
1488
+ {
1489
+ case EOB_ACT_END_OF_FILE:
1490
+ {
1491
+ (yy_did_buffer_switch_on_eof) = 0;
1492
+
1493
+ if ( yywrap( ) )
1494
+ {
1495
+ /* Note: because we've taken care in
1496
+ * yy_get_next_buffer() to have set up
1497
+ * yytext, we can now set up
1498
+ * yy_c_buf_p so that if some total
1499
+ * hoser (like flex itself) wants to
1500
+ * call the scanner after we return the
1501
+ * YY_NULL, it'll still work - another
1502
+ * YY_NULL will get returned.
1503
+ */
1504
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1505
+
1506
+ yy_act = YY_STATE_EOF(YY_START);
1507
+ goto do_action;
1508
+ }
1509
+
1510
+ else
1511
+ {
1512
+ if ( ! (yy_did_buffer_switch_on_eof) )
1513
+ YY_NEW_FILE;
1514
+ }
1515
+ break;
1516
+ }
1517
+
1518
+ case EOB_ACT_CONTINUE_SCAN:
1519
+ (yy_c_buf_p) =
1520
+ (yytext_ptr) + yy_amount_of_matched_text;
1521
+
1522
+ yy_current_state = yy_get_previous_state( );
1523
+
1524
+ yy_cp = (yy_c_buf_p);
1525
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1526
+ goto yy_match;
1527
+
1528
+ case EOB_ACT_LAST_MATCH:
1529
+ (yy_c_buf_p) =
1530
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1531
+
1532
+ yy_current_state = yy_get_previous_state( );
1533
+
1534
+ yy_cp = (yy_c_buf_p);
1535
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1536
+ goto yy_find_action;
1537
+ }
1538
+ break;
1539
+ }
1540
+
1541
+ default:
1542
+ YY_FATAL_ERROR(
1543
+ "fatal flex scanner internal error--no action found" );
1544
+ } /* end of action switch */
1545
+ } /* end of scanning one token */
1546
+ } /* end of yylex */
1547
+
1548
+ /* yy_get_next_buffer - try to read in a new buffer
1549
+ *
1550
+ * Returns a code representing an action:
1551
+ * EOB_ACT_LAST_MATCH -
1552
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1553
+ * EOB_ACT_END_OF_FILE - end of file
1554
+ */
1555
+ static int yy_get_next_buffer (void)
1556
+ {
1557
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1558
+ register char *source = (yytext_ptr);
1559
+ register int number_to_move, i;
1560
+ int ret_val;
1561
+
1562
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1563
+ YY_FATAL_ERROR(
1564
+ "fatal flex scanner internal error--end of buffer missed" );
1565
+
1566
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1567
+ { /* Don't try to fill the buffer, so this is an EOF. */
1568
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1569
+ {
1570
+ /* We matched a single character, the EOB, so
1571
+ * treat this as a final EOF.
1572
+ */
1573
+ return EOB_ACT_END_OF_FILE;
1574
+ }
1575
+
1576
+ else
1577
+ {
1578
+ /* We matched some text prior to the EOB, first
1579
+ * process it.
1580
+ */
1581
+ return EOB_ACT_LAST_MATCH;
1582
+ }
1583
+ }
1584
+
1585
+ /* Try to read more data. */
1586
+
1587
+ /* First move last chars to start of buffer. */
1588
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1589
+
1590
+ for ( i = 0; i < number_to_move; ++i )
1591
+ *(dest++) = *(source++);
1592
+
1593
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1594
+ /* don't do the read, it's not guaranteed to return an EOF,
1595
+ * just force an EOF
1596
+ */
1597
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1598
+
1599
+ else
1600
+ {
1601
+ int num_to_read =
1602
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1603
+
1604
+ while ( num_to_read <= 0 )
1605
+ { /* Not enough room in the buffer - grow it. */
1606
+
1607
+ YY_FATAL_ERROR(
1608
+ "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1609
+
1610
+ }
1611
+
1612
+ if ( num_to_read > YY_READ_BUF_SIZE )
1613
+ num_to_read = YY_READ_BUF_SIZE;
1614
+
1615
+ /* Read in more data. */
1616
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1617
+ (yy_n_chars), (size_t) num_to_read );
1618
+
1619
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1620
+ }
1621
+
1622
+ if ( (yy_n_chars) == 0 )
1623
+ {
1624
+ if ( number_to_move == YY_MORE_ADJ )
1625
+ {
1626
+ ret_val = EOB_ACT_END_OF_FILE;
1627
+ yyrestart(yyin );
1628
+ }
1629
+
1630
+ else
1631
+ {
1632
+ ret_val = EOB_ACT_LAST_MATCH;
1633
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1634
+ YY_BUFFER_EOF_PENDING;
1635
+ }
1636
+ }
1637
+
1638
+ else
1639
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1640
+
1641
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1642
+ /* Extend the array by 50%, plus the number we really need. */
1643
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1644
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1645
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1646
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1647
+ }
1648
+
1649
+ (yy_n_chars) += number_to_move;
1650
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1651
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1652
+
1653
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1654
+
1655
+ return ret_val;
1656
+ }
1657
+
1658
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1659
+
1660
+ static yy_state_type yy_get_previous_state (void)
1661
+ {
1662
+ register yy_state_type yy_current_state;
1663
+ register char *yy_cp;
1664
+
1665
+ yy_current_state = (yy_start);
1666
+ yy_current_state += YY_AT_BOL();
1667
+
1668
+ (yy_state_ptr) = (yy_state_buf);
1669
+ *(yy_state_ptr)++ = yy_current_state;
1670
+
1671
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1672
+ {
1673
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1674
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1675
+ {
1676
+ yy_current_state = (int) yy_def[yy_current_state];
1677
+ if ( yy_current_state >= 210 )
1678
+ yy_c = yy_meta[(unsigned int) yy_c];
1679
+ }
1680
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1681
+ *(yy_state_ptr)++ = yy_current_state;
1682
+ }
1683
+
1684
+ return yy_current_state;
1685
+ }
1686
+
1687
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1688
+ *
1689
+ * synopsis
1690
+ * next_state = yy_try_NUL_trans( current_state );
1691
+ */
1692
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1693
+ {
1694
+ register int yy_is_jam;
1695
+
1696
+ register YY_CHAR yy_c = 1;
1697
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1698
+ {
1699
+ yy_current_state = (int) yy_def[yy_current_state];
1700
+ if ( yy_current_state >= 210 )
1701
+ yy_c = yy_meta[(unsigned int) yy_c];
1702
+ }
1703
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1704
+ yy_is_jam = (yy_current_state == 209);
1705
+ if ( ! yy_is_jam )
1706
+ *(yy_state_ptr)++ = yy_current_state;
1707
+
1708
+ return yy_is_jam ? 0 : yy_current_state;
1709
+ }
1710
+
1711
+ static void yyunput (int c, register char * yy_bp )
1712
+ {
1713
+ register char *yy_cp;
1714
+
1715
+ yy_cp = (yy_c_buf_p);
1716
+
1717
+ /* undo effects of setting up yytext */
1718
+ *yy_cp = (yy_hold_char);
1719
+
1720
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1721
+ { /* need to shift things up to make room */
1722
+ /* +2 for EOB chars. */
1723
+ register int number_to_move = (yy_n_chars) + 2;
1724
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1725
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1726
+ register char *source =
1727
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1728
+
1729
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1730
+ *--dest = *--source;
1731
+
1732
+ yy_cp += (int) (dest - source);
1733
+ yy_bp += (int) (dest - source);
1734
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1735
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1736
+
1737
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1738
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
1739
+ }
1740
+
1741
+ *--yy_cp = (char) c;
1742
+
1743
+ (yytext_ptr) = yy_bp;
1744
+ (yy_hold_char) = *yy_cp;
1745
+ (yy_c_buf_p) = yy_cp;
1746
+ }
1747
+
1748
+ #ifndef YY_NO_INPUT
1749
+ #ifdef __cplusplus
1750
+ static int yyinput (void)
1751
+ #else
1752
+ static int input (void)
1753
+ #endif
1754
+
1755
+ {
1756
+ int c;
1757
+
1758
+ *(yy_c_buf_p) = (yy_hold_char);
1759
+
1760
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1761
+ {
1762
+ /* yy_c_buf_p now points to the character we want to return.
1763
+ * If this occurs *before* the EOB characters, then it's a
1764
+ * valid NUL; if not, then we've hit the end of the buffer.
1765
+ */
1766
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1767
+ /* This was really a NUL. */
1768
+ *(yy_c_buf_p) = '\0';
1769
+
1770
+ else
1771
+ { /* need more input */
1772
+ int offset = (yy_c_buf_p) - (yytext_ptr);
1773
+ ++(yy_c_buf_p);
1774
+
1775
+ switch ( yy_get_next_buffer( ) )
1776
+ {
1777
+ case EOB_ACT_LAST_MATCH:
1778
+ /* This happens because yy_g_n_b()
1779
+ * sees that we've accumulated a
1780
+ * token and flags that we need to
1781
+ * try matching the token before
1782
+ * proceeding. But for input(),
1783
+ * there's no matching to consider.
1784
+ * So convert the EOB_ACT_LAST_MATCH
1785
+ * to EOB_ACT_END_OF_FILE.
1786
+ */
1787
+
1788
+ /* Reset buffer status. */
1789
+ yyrestart(yyin );
1790
+
1791
+ /*FALLTHROUGH*/
1792
+
1793
+ case EOB_ACT_END_OF_FILE:
1794
+ {
1795
+ if ( yywrap( ) )
1796
+ return EOF;
1797
+
1798
+ if ( ! (yy_did_buffer_switch_on_eof) )
1799
+ YY_NEW_FILE;
1800
+ #ifdef __cplusplus
1801
+ return yyinput();
1802
+ #else
1803
+ return input();
1804
+ #endif
1805
+ }
1806
+
1807
+ case EOB_ACT_CONTINUE_SCAN:
1808
+ (yy_c_buf_p) = (yytext_ptr) + offset;
1809
+ break;
1810
+ }
1811
+ }
1812
+ }
1813
+
1814
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1815
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
1816
+ (yy_hold_char) = *++(yy_c_buf_p);
1817
+
1818
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1819
+
1820
+ return c;
1821
+ }
1822
+ #endif /* ifndef YY_NO_INPUT */
1823
+
1824
+ /** Immediately switch to a different input stream.
1825
+ * @param input_file A readable stream.
1826
+ *
1827
+ * @note This function does not reset the start condition to @c INITIAL .
1828
+ */
1829
+ void yyrestart (FILE * input_file )
1830
+ {
1831
+
1832
+ if ( ! YY_CURRENT_BUFFER ){
1833
+ yyensure_buffer_stack ();
1834
+ YY_CURRENT_BUFFER_LVALUE =
1835
+ yy_create_buffer(yyin,YY_BUF_SIZE );
1836
+ }
1837
+
1838
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1839
+ yy_load_buffer_state( );
1840
+ }
1841
+
1842
+ /** Switch to a different input buffer.
1843
+ * @param new_buffer The new input buffer.
1844
+ *
1845
+ */
1846
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1847
+ {
1848
+
1849
+ /* TODO. We should be able to replace this entire function body
1850
+ * with
1851
+ * yypop_buffer_state();
1852
+ * yypush_buffer_state(new_buffer);
1853
+ */
1854
+ yyensure_buffer_stack ();
1855
+ if ( YY_CURRENT_BUFFER == new_buffer )
1856
+ return;
1857
+
1858
+ if ( YY_CURRENT_BUFFER )
1859
+ {
1860
+ /* Flush out information for old buffer. */
1861
+ *(yy_c_buf_p) = (yy_hold_char);
1862
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1863
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1864
+ }
1865
+
1866
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1867
+ yy_load_buffer_state( );
1868
+
1869
+ /* We don't actually know whether we did this switch during
1870
+ * EOF (yywrap()) processing, but the only time this flag
1871
+ * is looked at is after yywrap() is called, so it's safe
1872
+ * to go ahead and always set it.
1873
+ */
1874
+ (yy_did_buffer_switch_on_eof) = 1;
1875
+ }
1876
+
1877
+ static void yy_load_buffer_state (void)
1878
+ {
1879
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1880
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1881
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1882
+ (yy_hold_char) = *(yy_c_buf_p);
1883
+ }
1884
+
1885
+ /** Allocate and initialize an input buffer state.
1886
+ * @param file A readable stream.
1887
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1888
+ *
1889
+ * @return the allocated buffer state.
1890
+ */
1891
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1892
+ {
1893
+ YY_BUFFER_STATE b;
1894
+
1895
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1896
+ if ( ! b )
1897
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1898
+
1899
+ b->yy_buf_size = size;
1900
+
1901
+ /* yy_ch_buf has to be 2 characters longer than the size given because
1902
+ * we need to put in 2 end-of-buffer characters.
1903
+ */
1904
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1905
+ if ( ! b->yy_ch_buf )
1906
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1907
+
1908
+ b->yy_is_our_buffer = 1;
1909
+
1910
+ yy_init_buffer(b,file );
1911
+
1912
+ return b;
1913
+ }
1914
+
1915
+ /** Destroy the buffer.
1916
+ * @param b a buffer created with yy_create_buffer()
1917
+ *
1918
+ */
1919
+ void yy_delete_buffer (YY_BUFFER_STATE b )
1920
+ {
1921
+
1922
+ if ( ! b )
1923
+ return;
1924
+
1925
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1926
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1927
+
1928
+ if ( b->yy_is_our_buffer )
1929
+ yyfree((void *) b->yy_ch_buf );
1930
+
1931
+ yyfree((void *) b );
1932
+ }
1933
+
1934
+ #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
1935
+ #ifdef __cplusplus
1936
+ extern "C" {
1937
+ #endif
1938
+ #ifdef __THROW /* this is a gnuism */
1939
+ extern int isatty (int ) __THROW;
1940
+ #else
1941
+ extern int isatty (int );
1942
+ #endif
1943
+ #ifdef __cplusplus
1944
+ }
1945
+ #endif
1946
+ #endif
1947
+
1948
+ /* Initializes or reinitializes a buffer.
1949
+ * This function is sometimes called more than once on the same buffer,
1950
+ * such as during a yyrestart() or at EOF.
1951
+ */
1952
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1953
+
1954
+ {
1955
+ int oerrno = errno;
1956
+
1957
+ yy_flush_buffer(b );
1958
+
1959
+ b->yy_input_file = file;
1960
+ b->yy_fill_buffer = 1;
1961
+
1962
+ /* If b is the current buffer, then yy_init_buffer was _probably_
1963
+ * called from yyrestart() or through yy_get_next_buffer.
1964
+ * In that case, we don't want to reset the lineno or column.
1965
+ */
1966
+ if (b != YY_CURRENT_BUFFER){
1967
+ b->yy_bs_lineno = 1;
1968
+ b->yy_bs_column = 0;
1969
+ }
1970
+
1971
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1972
+
1973
+ errno = oerrno;
1974
+ }
1975
+
1976
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1977
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1978
+ *
1979
+ */
1980
+ void yy_flush_buffer (YY_BUFFER_STATE b )
1981
+ {
1982
+ if ( ! b )
1983
+ return;
1984
+
1985
+ b->yy_n_chars = 0;
1986
+
1987
+ /* We always need two end-of-buffer characters. The first causes
1988
+ * a transition to the end-of-buffer state. The second causes
1989
+ * a jam in that state.
1990
+ */
1991
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1992
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1993
+
1994
+ b->yy_buf_pos = &b->yy_ch_buf[0];
1995
+
1996
+ b->yy_at_bol = 1;
1997
+ b->yy_buffer_status = YY_BUFFER_NEW;
1998
+
1999
+ if ( b == YY_CURRENT_BUFFER )
2000
+ yy_load_buffer_state( );
2001
+ }
2002
+
2003
+ /** Pushes the new state onto the stack. The new state becomes
2004
+ * the current state. This function will allocate the stack
2005
+ * if necessary.
2006
+ * @param new_buffer The new state.
2007
+ *
2008
+ */
2009
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2010
+ {
2011
+ if (new_buffer == NULL)
2012
+ return;
2013
+
2014
+ yyensure_buffer_stack();
2015
+
2016
+ /* This block is copied from yy_switch_to_buffer. */
2017
+ if ( YY_CURRENT_BUFFER )
2018
+ {
2019
+ /* Flush out information for old buffer. */
2020
+ *(yy_c_buf_p) = (yy_hold_char);
2021
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2022
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2023
+ }
2024
+
2025
+ /* Only push if top exists. Otherwise, replace top. */
2026
+ if (YY_CURRENT_BUFFER)
2027
+ (yy_buffer_stack_top)++;
2028
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2029
+
2030
+ /* copied from yy_switch_to_buffer. */
2031
+ yy_load_buffer_state( );
2032
+ (yy_did_buffer_switch_on_eof) = 1;
2033
+ }
2034
+
2035
+ /** Removes and deletes the top of the stack, if present.
2036
+ * The next element becomes the new top.
2037
+ *
2038
+ */
2039
+ void yypop_buffer_state (void)
2040
+ {
2041
+ if (!YY_CURRENT_BUFFER)
2042
+ return;
2043
+
2044
+ yy_delete_buffer(YY_CURRENT_BUFFER );
2045
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2046
+ if ((yy_buffer_stack_top) > 0)
2047
+ --(yy_buffer_stack_top);
2048
+
2049
+ if (YY_CURRENT_BUFFER) {
2050
+ yy_load_buffer_state( );
2051
+ (yy_did_buffer_switch_on_eof) = 1;
2052
+ }
2053
+ }
2054
+
2055
+ /* Allocates the stack if it does not exist.
2056
+ * Guarantees space for at least one push.
2057
+ */
2058
+ static void yyensure_buffer_stack (void)
2059
+ {
2060
+ int num_to_alloc;
2061
+
2062
+ if (!(yy_buffer_stack)) {
2063
+
2064
+ /* First allocation is just for 2 elements, since we don't know if this
2065
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
2066
+ * immediate realloc on the next call.
2067
+ */
2068
+ num_to_alloc = 1;
2069
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2070
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
2071
+ );
2072
+ if ( ! (yy_buffer_stack) )
2073
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2074
+
2075
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2076
+
2077
+ (yy_buffer_stack_max) = num_to_alloc;
2078
+ (yy_buffer_stack_top) = 0;
2079
+ return;
2080
+ }
2081
+
2082
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2083
+
2084
+ /* Increase the buffer to prepare for a possible push. */
2085
+ int grow_size = 8 /* arbitrary grow size */;
2086
+
2087
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
2088
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2089
+ ((yy_buffer_stack),
2090
+ num_to_alloc * sizeof(struct yy_buffer_state*)
2091
+ );
2092
+ if ( ! (yy_buffer_stack) )
2093
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2094
+
2095
+ /* zero only the new slots.*/
2096
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2097
+ (yy_buffer_stack_max) = num_to_alloc;
2098
+ }
2099
+ }
2100
+
2101
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
2102
+ * @param base the character buffer
2103
+ * @param size the size in bytes of the character buffer
2104
+ *
2105
+ * @return the newly allocated buffer state object.
2106
+ */
2107
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2108
+ {
2109
+ YY_BUFFER_STATE b;
2110
+
2111
+ if ( size < 2 ||
2112
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
2113
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
2114
+ /* They forgot to leave room for the EOB's. */
2115
+ return 0;
2116
+
2117
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2118
+ if ( ! b )
2119
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2120
+
2121
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2122
+ b->yy_buf_pos = b->yy_ch_buf = base;
2123
+ b->yy_is_our_buffer = 0;
2124
+ b->yy_input_file = 0;
2125
+ b->yy_n_chars = b->yy_buf_size;
2126
+ b->yy_is_interactive = 0;
2127
+ b->yy_at_bol = 1;
2128
+ b->yy_fill_buffer = 0;
2129
+ b->yy_buffer_status = YY_BUFFER_NEW;
2130
+
2131
+ yy_switch_to_buffer(b );
2132
+
2133
+ return b;
2134
+ }
2135
+
2136
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
2137
+ * scan from a @e copy of @a str.
2138
+ * @param yystr a NUL-terminated string to scan
2139
+ *
2140
+ * @return the newly allocated buffer state object.
2141
+ * @note If you want to scan bytes that may contain NUL values, then use
2142
+ * yy_scan_bytes() instead.
2143
+ */
2144
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2145
+ {
2146
+
2147
+ return yy_scan_bytes(yystr,strlen(yystr) );
2148
+ }
2149
+
2150
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2151
+ * scan from a @e copy of @a bytes.
2152
+ * @param bytes the byte buffer to scan
2153
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
2154
+ *
2155
+ * @return the newly allocated buffer state object.
2156
+ */
2157
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2158
+ {
2159
+ YY_BUFFER_STATE b;
2160
+ char *buf;
2161
+ yy_size_t n;
2162
+ int i;
2163
+
2164
+ /* Get memory for full buffer, including space for trailing EOB's. */
2165
+ n = _yybytes_len + 2;
2166
+ buf = (char *) yyalloc(n );
2167
+ if ( ! buf )
2168
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2169
+
2170
+ for ( i = 0; i < _yybytes_len; ++i )
2171
+ buf[i] = yybytes[i];
2172
+
2173
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2174
+
2175
+ b = yy_scan_buffer(buf,n );
2176
+ if ( ! b )
2177
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2178
+
2179
+ /* It's okay to grow etc. this buffer, and we should throw it
2180
+ * away when we're done.
2181
+ */
2182
+ b->yy_is_our_buffer = 1;
2183
+
2184
+ return b;
2185
+ }
2186
+
2187
+ static void yy_push_state (int new_state )
2188
+ {
2189
+ if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2190
+ {
2191
+ yy_size_t new_size;
2192
+
2193
+ (yy_start_stack_depth) += YY_START_STACK_INCR;
2194
+ new_size = (yy_start_stack_depth) * sizeof( int );
2195
+
2196
+ if ( ! (yy_start_stack) )
2197
+ (yy_start_stack) = (int *) yyalloc(new_size );
2198
+
2199
+ else
2200
+ (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
2201
+
2202
+ if ( ! (yy_start_stack) )
2203
+ YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
2204
+ }
2205
+
2206
+ (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
2207
+
2208
+ BEGIN(new_state);
2209
+ }
2210
+
2211
+ static void yy_pop_state (void)
2212
+ {
2213
+ if ( --(yy_start_stack_ptr) < 0 )
2214
+ YY_FATAL_ERROR( "start-condition stack underflow" );
2215
+
2216
+ BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
2217
+ }
2218
+
2219
+ static int yy_top_state (void)
2220
+ {
2221
+ return (yy_start_stack)[(yy_start_stack_ptr) - 1];
2222
+ }
2223
+
2224
+ #ifndef YY_EXIT_FAILURE
2225
+ #define YY_EXIT_FAILURE 2
2226
+ #endif
2227
+
2228
+ static void yy_fatal_error (yyconst char* msg )
2229
+ {
2230
+ (void) fprintf( stderr, "%s\n", msg );
2231
+ exit( YY_EXIT_FAILURE );
2232
+ }
2233
+
2234
+ /* Redefine yyless() so it works in section 3 code. */
2235
+
2236
+ #undef yyless
2237
+ #define yyless(n) \
2238
+ do \
2239
+ { \
2240
+ /* Undo effects of setting up yytext. */ \
2241
+ int yyless_macro_arg = (n); \
2242
+ YY_LESS_LINENO(yyless_macro_arg);\
2243
+ yytext[yyleng] = (yy_hold_char); \
2244
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
2245
+ (yy_hold_char) = *(yy_c_buf_p); \
2246
+ *(yy_c_buf_p) = '\0'; \
2247
+ yyleng = yyless_macro_arg; \
2248
+ } \
2249
+ while ( 0 )
2250
+
2251
+ /* Accessor methods (get/set functions) to struct members. */
2252
+
2253
+ /** Get the current line number.
2254
+ *
2255
+ */
2256
+ int yyget_lineno (void)
2257
+ {
2258
+
2259
+ return yylineno;
2260
+ }
2261
+
2262
+ /** Get the input stream.
2263
+ *
2264
+ */
2265
+ FILE *yyget_in (void)
2266
+ {
2267
+ return yyin;
2268
+ }
2269
+
2270
+ /** Get the output stream.
2271
+ *
2272
+ */
2273
+ FILE *yyget_out (void)
2274
+ {
2275
+ return yyout;
2276
+ }
2277
+
2278
+ /** Get the length of the current token.
2279
+ *
2280
+ */
2281
+ int yyget_leng (void)
2282
+ {
2283
+ return yyleng;
2284
+ }
2285
+
2286
+ /** Get the current token.
2287
+ *
2288
+ */
2289
+
2290
+ char *yyget_text (void)
2291
+ {
2292
+ return yytext;
2293
+ }
2294
+
2295
+ /** Set the current line number.
2296
+ * @param line_number
2297
+ *
2298
+ */
2299
+ void yyset_lineno (int line_number )
2300
+ {
2301
+
2302
+ yylineno = line_number;
2303
+ }
2304
+
2305
+ /** Set the input stream. This does not discard the current
2306
+ * input buffer.
2307
+ * @param in_str A readable stream.
2308
+ *
2309
+ * @see yy_switch_to_buffer
2310
+ */
2311
+ void yyset_in (FILE * in_str )
2312
+ {
2313
+ yyin = in_str ;
2314
+ }
2315
+
2316
+ void yyset_out (FILE * out_str )
2317
+ {
2318
+ yyout = out_str ;
2319
+ }
2320
+
2321
+ int yyget_debug (void)
2322
+ {
2323
+ return yy_flex_debug;
2324
+ }
2325
+
2326
+ void yyset_debug (int bdebug )
2327
+ {
2328
+ yy_flex_debug = bdebug ;
2329
+ }
2330
+
2331
+ static int yy_init_globals (void)
2332
+ {
2333
+ /* Initialization is the same as for the non-reentrant scanner.
2334
+ * This function is called from yylex_destroy(), so don't allocate here.
2335
+ */
2336
+
2337
+ (yy_buffer_stack) = 0;
2338
+ (yy_buffer_stack_top) = 0;
2339
+ (yy_buffer_stack_max) = 0;
2340
+ (yy_c_buf_p) = (char *) 0;
2341
+ (yy_init) = 0;
2342
+ (yy_start) = 0;
2343
+
2344
+ (yy_start_stack_ptr) = 0;
2345
+ (yy_start_stack_depth) = 0;
2346
+ (yy_start_stack) = NULL;
2347
+
2348
+ (yy_state_buf) = 0;
2349
+ (yy_state_ptr) = 0;
2350
+ (yy_full_match) = 0;
2351
+ (yy_lp) = 0;
2352
+
2353
+ /* Defined in main.c */
2354
+ #ifdef YY_STDINIT
2355
+ yyin = stdin;
2356
+ yyout = stdout;
2357
+ #else
2358
+ yyin = (FILE *) 0;
2359
+ yyout = (FILE *) 0;
2360
+ #endif
2361
+
2362
+ /* For future reference: Set errno on error, since we are called by
2363
+ * yylex_init()
2364
+ */
2365
+ return 0;
2366
+ }
2367
+
2368
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2369
+ int yylex_destroy (void)
2370
+ {
2371
+
2372
+ /* Pop the buffer stack, destroying each element. */
2373
+ while(YY_CURRENT_BUFFER){
2374
+ yy_delete_buffer(YY_CURRENT_BUFFER );
2375
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2376
+ yypop_buffer_state();
2377
+ }
2378
+
2379
+ /* Destroy the stack itself. */
2380
+ yyfree((yy_buffer_stack) );
2381
+ (yy_buffer_stack) = NULL;
2382
+
2383
+ /* Destroy the start condition stack. */
2384
+ yyfree((yy_start_stack) );
2385
+ (yy_start_stack) = NULL;
2386
+
2387
+ yyfree ( (yy_state_buf) );
2388
+ (yy_state_buf) = NULL;
2389
+
2390
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2391
+ * yylex() is called, initialization will occur. */
2392
+ yy_init_globals( );
2393
+
2394
+ return 0;
2395
+ }
2396
+
2397
+ /*
2398
+ * Internal utility routines.
2399
+ */
2400
+
2401
+ #ifndef yytext_ptr
2402
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2403
+ {
2404
+ register int i;
2405
+ for ( i = 0; i < n; ++i )
2406
+ s1[i] = s2[i];
2407
+ }
2408
+ #endif
2409
+
2410
+ #ifdef YY_NEED_STRLEN
2411
+ static int yy_flex_strlen (yyconst char * s )
2412
+ {
2413
+ register int n;
2414
+ for ( n = 0; s[n]; ++n )
2415
+ ;
2416
+
2417
+ return n;
2418
+ }
2419
+ #endif
2420
+
2421
+ void *yyalloc (yy_size_t size )
2422
+ {
2423
+ return (void *) malloc( size );
2424
+ }
2425
+
2426
+ void *yyrealloc (void * ptr, yy_size_t size )
2427
+ {
2428
+ /* The cast to (char *) in the following accommodates both
2429
+ * implementations that use char* generic pointers, and those
2430
+ * that use void* generic pointers. It works with the latter
2431
+ * because both ANSI C and C++ allow castless assignment from
2432
+ * any pointer type to void*, and deal with argument conversions
2433
+ * as though doing an assignment.
2434
+ */
2435
+ return (void *) realloc( (char *) ptr, size );
2436
+ }
2437
+
2438
+ void yyfree (void * ptr )
2439
+ {
2440
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2441
+ }
2442
+
2443
+ #define YYTABLES_NAME "yytables"
2444
+
2445
+ #line 161 "parser.l"
2446
+
2447
+
2448
+
2449
+