PostGIS  2.2.7dev-r@@SVN_REVISION@@
lwin_wkt_lex.c
Go to the documentation of this file.
1 #line 2 "lwin_wkt_lex.c"
2 
3 #line 4 "lwin_wkt_lex.c"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer wkt_yy_create_buffer
10 #define yy_delete_buffer wkt_yy_delete_buffer
11 #define yy_flex_debug wkt_yy_flex_debug
12 #define yy_init_buffer wkt_yy_init_buffer
13 #define yy_flush_buffer wkt_yy_flush_buffer
14 #define yy_load_buffer_state wkt_yy_load_buffer_state
15 #define yy_switch_to_buffer wkt_yy_switch_to_buffer
16 #define yyin wkt_yyin
17 #define yyleng wkt_yyleng
18 #define yylex wkt_yylex
19 #define yylineno wkt_yylineno
20 #define yyout wkt_yyout
21 #define yyrestart wkt_yyrestart
22 #define yytext wkt_yytext
23 #define yywrap wkt_yywrap
24 #define yyalloc wkt_yyalloc
25 #define yyrealloc wkt_yyrealloc
26 #define yyfree wkt_yyfree
27 
28 #define FLEX_SCANNER
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 37
32 #if YY_FLEX_SUBMINOR_VERSION > 0
33 #define FLEX_BETA
34 #endif
35 
36 /* First, we deal with platform-specific or compiler-specific issues. */
37 
38 /* begin standard C headers. */
39 #include <stdio.h>
40 #include <string.h>
41 #include <errno.h>
42 #include <stdlib.h>
43 
44 /* end standard C headers. */
45 
46 /* flex integer type definitions */
47 
48 #ifndef FLEXINT_H
49 #define FLEXINT_H
50 
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56  * if you want the limit (max/min) macros for int types.
57  */
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
60 #endif
61 
62 #include <inttypes.h>
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
69 #else
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
76 
77 /* Limits of integral types. */
78 #ifndef INT8_MIN
79 #define INT8_MIN (-128)
80 #endif
81 #ifndef INT16_MIN
82 #define INT16_MIN (-32767-1)
83 #endif
84 #ifndef INT32_MIN
85 #define INT32_MIN (-2147483647-1)
86 #endif
87 #ifndef INT8_MAX
88 #define INT8_MAX (127)
89 #endif
90 #ifndef INT16_MAX
91 #define INT16_MAX (32767)
92 #endif
93 #ifndef INT32_MAX
94 #define INT32_MAX (2147483647)
95 #endif
96 #ifndef UINT8_MAX
97 #define UINT8_MAX (255U)
98 #endif
99 #ifndef UINT16_MAX
100 #define UINT16_MAX (65535U)
101 #endif
102 #ifndef UINT32_MAX
103 #define UINT32_MAX (4294967295U)
104 #endif
105 
106 #endif /* ! C99 */
107 
108 #endif /* ! FLEXINT_H */
109 
110 #ifdef __cplusplus
111 
112 /* The "const" storage-class-modifier is valid. */
113 #define YY_USE_CONST
114 
115 #else /* ! __cplusplus */
116 
117 /* C99 requires __STDC__ to be defined as 1. */
118 #if defined (__STDC__)
119 
120 #define YY_USE_CONST
121 
122 #endif /* defined (__STDC__) */
123 #endif /* ! __cplusplus */
124 
125 #ifdef YY_USE_CONST
126 #define yyconst const
127 #else
128 #define yyconst
129 #endif
130 
131 /* Returned upon end-of-file. */
132 #define YY_NULL 0
133 
134 /* Promotes a possibly negative, possibly signed char to an unsigned
135  * integer for use as an array index. If the signed char is negative,
136  * we want to instead treat it as an 8-bit unsigned char, hence the
137  * double cast.
138  */
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 
141 /* Enter a start condition. This macro really ought to take a parameter,
142  * but we do it the disgusting crufty way forced on us by the ()-less
143  * definition of BEGIN.
144  */
145 #define BEGIN (yy_start) = 1 + 2 *
146 
147 /* Translate the current start state into a value that can be later handed
148  * to BEGIN to return to the state. The YYSTATE alias is for lex
149  * compatibility.
150  */
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
153 
154 /* Action number for EOF rule of a given start state. */
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 
157 /* Special action meaning "start processing a new file". */
158 #define YY_NEW_FILE wkt_yyrestart(wkt_yyin )
159 
160 #define YY_END_OF_BUFFER_CHAR 0
161 
162 /* Size of default input buffer. */
163 #ifndef YY_BUF_SIZE
164 #define YY_BUF_SIZE 16384
165 #endif
166 
167 /* The state buf must be large enough to hold one state per character in the main buffer.
168  */
169 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 
171 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
172 #define YY_TYPEDEF_YY_BUFFER_STATE
174 #endif
175 
176 #ifndef YY_TYPEDEF_YY_SIZE_T
177 #define YY_TYPEDEF_YY_SIZE_T
178 typedef size_t yy_size_t;
179 #endif
180 
181 extern yy_size_t wkt_yyleng;
182 
183 extern FILE *wkt_yyin, *wkt_yyout;
184 
185 #define EOB_ACT_CONTINUE_SCAN 0
186 #define EOB_ACT_END_OF_FILE 1
187 #define EOB_ACT_LAST_MATCH 2
188 
189  #define YY_LESS_LINENO(n)
190 
191 /* Return all but the first "n" matched characters back to the input stream. */
192 #define yyless(n) \
193  do \
194  { \
195  /* Undo effects of setting up wkt_yytext. */ \
196  int yyless_macro_arg = (n); \
197  YY_LESS_LINENO(yyless_macro_arg);\
198  *yy_cp = (yy_hold_char); \
199  YY_RESTORE_YY_MORE_OFFSET \
200  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
201  YY_DO_BEFORE_ACTION; /* set up wkt_yytext again */ \
202  } \
203  while ( 0 )
204 
205 #define unput(c) yyunput( c, (yytext_ptr) )
206 
207 #ifndef YY_STRUCT_YY_BUFFER_STATE
208 #define YY_STRUCT_YY_BUFFER_STATE
210  {
212 
213  char *yy_ch_buf; /* input buffer */
214  char *yy_buf_pos; /* current position in input buffer */
215 
216  /* Size of input buffer in bytes, not including room for EOB
217  * characters.
218  */
220 
221  /* Number of characters read into yy_ch_buf, not including EOB
222  * characters.
223  */
225 
226  /* Whether we "own" the buffer - i.e., we know we created it,
227  * and can realloc() it to grow it, and should free() it to
228  * delete it.
229  */
231 
232  /* Whether this is an "interactive" input source; if so, and
233  * if we're using stdio for input, then we want to use getc()
234  * instead of fread(), to make sure we stop fetching input after
235  * each newline.
236  */
238 
239  /* Whether we're considered to be at the beginning of a line.
240  * If so, '^' rules will be active on the next match, otherwise
241  * not.
242  */
244 
248  /* Whether to try to fill the input buffer when we reach the
249  * end of it.
250  */
252 
254 
255 #define YY_BUFFER_NEW 0
256 #define YY_BUFFER_NORMAL 1
257  /* When an EOF's been seen but there's still some text to process
258  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
259  * shouldn't try reading from the input source any more. We might
260  * still have a bunch of tokens to match, though, because of
261  * possible backing-up.
262  *
263  * When we actually see the EOF, we change the status to "new"
264  * (via wkt_yyrestart()), so that the user can continue scanning by
265  * just pointing wkt_yyin at a new input file.
266  */
267 #define YY_BUFFER_EOF_PENDING 2
268 
269  };
270 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 
272 /* Stack of input buffers. */
273 static size_t yy_buffer_stack_top = 0;
274 static size_t yy_buffer_stack_max = 0;
275 static YY_BUFFER_STATE * yy_buffer_stack = 0;
277 /* We provide macros for accessing buffer states in case in the
278  * future we want to put the buffer states in a more general
279  * "scanner state".
280  *
281  * Returns the top of the stack, or NULL.
282  */
283 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
284  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
285  : NULL)
286 
287 /* Same as previous macro, but useful when we know that the buffer stack is not
288  * NULL or when we need an lvalue. For internal use only.
289  */
290 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
291 
292 /* yy_hold_char holds the character lost when wkt_yytext is formed. */
293 static char yy_hold_char;
294 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
296 
297 /* Points to current character in buffer. */
298 static char *yy_c_buf_p = (char *) 0;
299 static int yy_init = 0; /* whether we need to initialize */
300 static int yy_start = 0; /* start state number */
301 
302 /* Flag which is used to allow wkt_yywrap()'s to do buffer switches
303  * instead of setting up a fresh wkt_yyin. A bit of a hack ...
304  */
306 
307 void wkt_yyrestart (FILE *input_file );
308 void wkt_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
309 YY_BUFFER_STATE wkt_yy_create_buffer (FILE *file,int size );
310 void wkt_yy_delete_buffer (YY_BUFFER_STATE b );
311 void wkt_yy_flush_buffer (YY_BUFFER_STATE b );
312 void wkt_yypush_buffer_state (YY_BUFFER_STATE new_buffer );
313 void wkt_yypop_buffer_state (void );
314 
315 static void wkt_yyensure_buffer_stack (void );
316 static void wkt_yy_load_buffer_state (void );
317 static void wkt_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
318 
319 #define YY_FLUSH_BUFFER wkt_yy_flush_buffer(YY_CURRENT_BUFFER )
320 
321 YY_BUFFER_STATE wkt_yy_scan_buffer (char *base,yy_size_t size );
322 YY_BUFFER_STATE wkt_yy_scan_string (yyconst char *yy_str );
323 YY_BUFFER_STATE wkt_yy_scan_bytes (yyconst char *bytes,yy_size_t len );
324 
325 void *wkt_yyalloc (yy_size_t );
326 void *wkt_yyrealloc (void *,yy_size_t );
327 void wkt_yyfree (void * );
328 
329 #define yy_new_buffer wkt_yy_create_buffer
330 
331 #define yy_set_interactive(is_interactive) \
332  { \
333  if ( ! YY_CURRENT_BUFFER ){ \
334  wkt_yyensure_buffer_stack (); \
335  YY_CURRENT_BUFFER_LVALUE = \
336  wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); \
337  } \
338  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
339  }
340 
341 #define yy_set_bol(at_bol) \
342  { \
343  if ( ! YY_CURRENT_BUFFER ){\
344  wkt_yyensure_buffer_stack (); \
345  YY_CURRENT_BUFFER_LVALUE = \
346  wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); \
347  } \
348  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
349  }
350 
351 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
352 
353 /* Begin user sect3 */
354 
355 #define wkt_yywrap() 1
356 #define YY_SKIP_YYWRAP
357 
358 typedef unsigned char YY_CHAR;
359 
360 FILE *wkt_yyin = (FILE *) 0, *wkt_yyout = (FILE *) 0;
361 
362 typedef int yy_state_type;
363 
364 extern int wkt_yylineno;
365 
366 int wkt_yylineno = 1;
367 
368 extern char *wkt_yytext;
369 #define yytext_ptr wkt_yytext
370 
371 static yy_state_type yy_get_previous_state (void );
372 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
373 static int yy_get_next_buffer (void );
374 static void yy_fatal_error (yyconst char msg[] );
375 
376 /* Done after the current pattern has been matched and before the
377  * corresponding action - sets up wkt_yytext.
378  */
379 #define YY_DO_BEFORE_ACTION \
380  (yytext_ptr) = yy_bp; \
381  wkt_yyleng = (size_t) (yy_cp - yy_bp); \
382  (yy_hold_char) = *yy_cp; \
383  *yy_cp = '\0'; \
384  (yy_c_buf_p) = yy_cp;
385 
386 #define YY_NUM_RULES 26
387 #define YY_END_OF_BUFFER 27
388 /* This struct is not used in this scanner,
389  but its presence is necessary. */
391  {
394  };
396  { 0,
397  0, 0, 27, 25, 24, 24, 20, 21, 22, 25,
398  25, 1, 23, 25, 25, 25, 25, 19, 25, 25,
399  25, 19, 24, 0, 1, 1, 1, 0, 0, 0,
400  0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
401  0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
402  0, 0, 16, 0, 0, 0, 0, 0, 0, 0,
403  0, 0, 0, 0, 0, 0, 0, 0, 18, 0,
404  0, 0, 17, 0, 0, 0, 0, 0, 0, 0,
405  0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
406  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
407 
408  10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
409  0, 0, 0, 0, 15, 0, 0, 0, 0, 0,
410  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
411  13, 6, 0, 8, 0, 0, 0, 0, 0, 0,
412  0, 0, 0, 0, 0, 0, 0, 9, 0, 0,
413  5, 4, 0, 0, 11, 0, 0, 0, 12, 0,
414  0, 0, 0, 7, 0, 0, 0, 0, 14, 3,
415  0
416  } ;
417 
419  { 0,
420  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
421  1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
422  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423  1, 2, 1, 1, 1, 1, 1, 1, 1, 4,
424  5, 1, 6, 7, 8, 9, 1, 10, 10, 10,
425  10, 10, 10, 10, 10, 10, 10, 1, 11, 1,
426  12, 1, 1, 1, 13, 1, 14, 15, 16, 17,
427  18, 19, 20, 1, 1, 21, 22, 23, 24, 25,
428  1, 26, 27, 28, 29, 30, 1, 1, 31, 32,
429  1, 1, 1, 1, 1, 1, 33, 1, 34, 35,
430 
431  36, 37, 38, 39, 40, 1, 1, 41, 42, 43,
432  44, 45, 1, 46, 47, 48, 49, 50, 1, 1,
433  51, 52, 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  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 
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, 1, 1, 1, 1, 1, 1,
447  1, 1, 1, 1, 1
448  } ;
449 
451  { 0,
452  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457  1, 1
458  } ;
459 
461  { 0,
462  0, 0, 353, 366, 51, 53, 366, 366, 366, 48,
463  342, 50, 366, 41, 40, 47, 44, 38, 44, 43,
464  51, 50, 71, 341, 84, 85, 340, 70, 53, 74,
465  72, 77, 79, 81, 84, 86, 88, 86, 90, 366,
466  339, 338, 97, 87, 83, 86, 93, 101, 91, 113,
467  107, 125, 366, 128, 113, 119, 128, 114, 130, 120,
468  128, 121, 132, 335, 129, 132, 125, 130, 366, 129,
469  131, 166, 366, 152, 162, 173, 164, 171, 162, 162,
470  162, 163, 161, 172, 170, 166, 174, 184, 336, 65,
471  180, 177, 201, 197, 189, 202, 198, 202, 206, 202,
472 
473  366, 203, 214, 204, 218, 202, 220, 212, 207, 223,
474  218, 212, 239, 245, 366, 232, 233, 246, 241, 248,
475  251, 241, 241, 252, 258, 251, 247, 248, 251, 256,
476  366, 366, 251, 366, 257, 269, 269, 278, 270, 279,
477  283, 279, 283, 291, 279, 286, 294, 366, 295, 292,
478  366, 366, 287, 296, 366, 301, 294, 302, 366, 293,
479  305, 323, 318, 366, 326, 318, 328, 322, 366, 366,
480  366
481  } ;
482 
484  { 0,
485  171, 1, 171, 171, 171, 171, 171, 171, 171, 171,
486  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
487  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
488  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
489  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
490  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
491  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
492  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
493  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
494  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
495 
496  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
497  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
498  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
499  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
500  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
501  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
502  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
503  0
504  } ;
505 
507  { 0,
508  4, 5, 6, 7, 8, 4, 9, 10, 11, 12,
509  13, 4, 4, 14, 4, 15, 4, 16, 4, 4,
510  17, 18, 4, 4, 19, 4, 20, 21, 4, 4,
511  4, 22, 4, 14, 4, 15, 4, 16, 4, 4,
512  17, 18, 4, 4, 19, 4, 20, 21, 4, 4,
513  4, 22, 23, 23, 23, 23, 24, 25, 27, 25,
514  29, 32, 33, 34, 30, 28, 35, 36, 37, 31,
515  38, 40, 23, 23, 90, 41, 39, 41, 43, 42,
516  29, 32, 33, 34, 30, 28, 35, 36, 37, 31,
517  38, 40, 27, 25, 26, 44, 39, 45, 43, 28,
518 
519  28, 46, 47, 48, 49, 50, 51, 52, 53, 54,
520  55, 56, 57, 58, 59, 44, 60, 45, 61, 28,
521  28, 46, 47, 48, 49, 50, 51, 52, 53, 54,
522  55, 56, 57, 58, 59, 62, 60, 63, 61, 64,
523  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
524  75, 77, 78, 79, 80, 62, 81, 63, 82, 64,
525  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
526  75, 77, 78, 79, 80, 87, 81, 88, 82, 83,
527  89, 91, 90, 92, 93, 94, 84, 95, 96, 97,
528  85, 98, 86, 99, 100, 87, 101, 88, 102, 83,
529 
530  103, 91, 104, 92, 93, 94, 84, 95, 96, 97,
531  85, 98, 86, 99, 100, 105, 101, 106, 102, 107,
532  103, 108, 104, 109, 110, 111, 112, 113, 114, 115,
533  116, 117, 118, 119, 120, 105, 121, 106, 122, 107,
534  123, 108, 124, 109, 110, 111, 112, 113, 114, 115,
535  116, 117, 118, 119, 120, 125, 121, 126, 122, 127,
536  123, 128, 124, 129, 130, 131, 132, 133, 134, 135,
537  136, 137, 138, 139, 140, 125, 141, 126, 142, 127,
538  143, 128, 144, 129, 130, 131, 132, 133, 134, 135,
539  136, 137, 138, 139, 140, 145, 141, 146, 142, 147,
540 
541  143, 148, 144, 149, 150, 151, 152, 153, 154, 155,
542  156, 157, 158, 159, 160, 145, 161, 146, 162, 147,
543  163, 148, 164, 149, 150, 151, 152, 153, 154, 155,
544  156, 157, 158, 159, 160, 165, 161, 166, 162, 167,
545  163, 168, 164, 169, 170, 90, 76, 42, 42, 26,
546  26, 26, 171, 171, 171, 165, 171, 166, 171, 167,
547  171, 168, 171, 169, 170, 3, 171, 171, 171, 171,
548  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
549  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
550  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
551 
552  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
553  171, 171, 171, 171, 171, 171, 171, 171
554  } ;
555 
557  { 0,
558  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
559  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
560  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
561  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563  1, 1, 5, 5, 6, 6, 10, 10, 12, 12,
564  14, 15, 16, 17, 14, 12, 18, 19, 20, 14,
565  21, 22, 23, 23, 90, 28, 21, 28, 29, 28,
566  14, 15, 16, 17, 14, 12, 18, 19, 20, 14,
567  21, 22, 25, 25, 26, 30, 21, 31, 29, 25,
568 
569  26, 32, 33, 34, 35, 36, 36, 37, 38, 39,
570  43, 44, 45, 46, 47, 30, 48, 31, 49, 25,
571  26, 32, 33, 34, 35, 36, 36, 37, 38, 39,
572  43, 44, 45, 46, 47, 50, 48, 51, 49, 52,
573  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
574  63, 65, 66, 67, 68, 50, 70, 51, 71, 52,
575  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
576  63, 65, 66, 67, 68, 74, 70, 75, 71, 72,
577  76, 77, 76, 78, 79, 80, 72, 81, 82, 83,
578  72, 84, 72, 85, 86, 74, 87, 75, 88, 72,
579 
580  91, 77, 92, 78, 79, 80, 72, 81, 82, 83,
581  72, 84, 72, 85, 86, 93, 87, 94, 88, 95,
582  91, 96, 92, 97, 98, 99, 99, 100, 102, 103,
583  104, 105, 106, 107, 108, 93, 109, 94, 110, 95,
584  111, 96, 112, 97, 98, 99, 99, 100, 102, 103,
585  104, 105, 106, 107, 108, 113, 109, 114, 110, 116,
586  111, 117, 112, 118, 119, 120, 121, 122, 123, 124,
587  125, 126, 127, 128, 129, 113, 130, 114, 133, 116,
588  135, 117, 136, 118, 119, 120, 121, 122, 123, 124,
589  125, 126, 127, 128, 129, 137, 130, 138, 133, 139,
590 
591  135, 140, 136, 141, 142, 143, 144, 145, 146, 147,
592  149, 150, 153, 154, 156, 137, 157, 138, 158, 139,
593  160, 140, 161, 141, 142, 143, 144, 145, 146, 147,
594  149, 150, 153, 154, 156, 162, 157, 163, 158, 165,
595  160, 166, 161, 167, 168, 89, 64, 42, 41, 27,
596  24, 11, 3, 0, 0, 162, 0, 163, 0, 165,
597  0, 166, 0, 167, 168, 171, 171, 171, 171, 171,
598  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
599  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
600  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
601 
602  171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
603  171, 171, 171, 171, 171, 171, 171, 171
604  } ;
605 
606 static yy_state_type yy_last_accepting_state;
608 
609 extern int wkt_yy_flex_debug;
610 int wkt_yy_flex_debug = 0;
611 
612 /* The intent behind this definition is that it'll catch
613  * any uses of REJECT which flex missed.
614  */
615 #define REJECT reject_used_but_not_detected
616 #define yymore() yymore_used_but_not_detected
617 #define YY_MORE_ADJ 0
618 #define YY_RESTORE_YY_MORE_OFFSET
620 #line 1 "lwin_wkt_lex.l"
621 #line 2 "lwin_wkt_lex.l"
622 
623 /* The lexer */
624 
625 #include <stdio.h>
626 #include <string.h>
627 #include "lwin_wkt.h"
628 #include "lwin_wkt_parse.h"
629 #include "lwgeom_log.h"
630 
631 static YY_BUFFER_STATE wkt_yy_buf_state;
632 
633 
634 /*
635 * Set up the lexer!
636 */
637 void wkt_lexer_init(char *src)
638 {
639  wkt_yy_buf_state = wkt_yy_scan_string(src);
640 }
641 
642 /*
643 * Clean up the lexer!
644 */
646 {
647  wkt_yy_delete_buffer(wkt_yy_buf_state);
648 }
649 
650 /*
651 * Handle errors due to unexpected junk in WKT strings.
652 */
653 static void wkt_lexer_unknown()
654 {
655  /* Set the global error state */
659 }
660 
661 
662 /*
663 * This macro is magically run after a rule is found but before the main
664 * action is run. We use it to update the parse location information
665 * so we can report on where things fail. Also optionally to dump
666 * debugging info.
667 */
668 #define YY_USER_ACTION do { \
669  wkt_yylloc.first_line = wkt_yylloc.last_line = wkt_yylineno; \
670  wkt_yylloc.first_column = wkt_yylloc.last_column; \
671  wkt_yylloc.last_column += wkt_yyleng; \
672  LWDEBUGF(5,"lex: %s", wkt_yytext); \
673  } while (0);
674 
675 
676 #define YY_NO_INPUT 1
677 /* Suppress the default implementations. */
678 #line 679 "lwin_wkt_lex.c"
679 
680 #define INITIAL 0
681 
682 #ifndef YY_NO_UNISTD_H
683 /* Special case for "unistd.h", since it is non-ANSI. We include it way
684  * down here because we want the user's section 1 to have been scanned first.
685  * The user has a chance to override it with an option.
686  */
687 #include <unistd.h>
688 #endif
689 
690 #ifndef YY_EXTRA_TYPE
691 #define YY_EXTRA_TYPE void *
692 #endif
693 
694 static int yy_init_globals (void );
695 
696 /* Accessor methods to globals.
697  These are made visible to non-reentrant scanners for convenience. */
698 
699 int wkt_yylex_destroy (void );
700 
701 int wkt_yyget_debug (void );
702 
703 void wkt_yyset_debug (int debug_flag );
704 
706 
707 void wkt_yyset_extra (YY_EXTRA_TYPE user_defined );
708 
709 FILE *wkt_yyget_in (void );
710 
711 void wkt_yyset_in (FILE * in_str );
712 
713 FILE *wkt_yyget_out (void );
714 
715 void wkt_yyset_out (FILE * out_str );
716 
717 yy_size_t wkt_yyget_leng (void );
718 
719 char *wkt_yyget_text (void );
720 
721 int wkt_yyget_lineno (void );
722 
723 void wkt_yyset_lineno (int line_number );
724 
725 /* Macros after this point can all be overridden by user definitions in
726  * section 1.
727  */
728 
729 #ifndef YY_SKIP_YYWRAP
730 #ifdef __cplusplus
731 extern "C" int wkt_yywrap (void );
732 #else
733 extern int wkt_yywrap (void );
734 #endif
735 #endif
736 
737 #ifndef yytext_ptr
738 static void yy_flex_strncpy (char *,yyconst char *,int );
739 #endif
740 
741 #ifdef YY_NEED_STRLEN
742 static int yy_flex_strlen (yyconst char * );
743 #endif
744 
745 #ifndef YY_NO_INPUT
746 
747 #ifdef __cplusplus
748 static int yyinput (void );
749 #else
750 static int input (void );
751 #endif
752 
753 #endif
754 
755 /* Amount of stuff to slurp up with each read. */
756 #ifndef YY_READ_BUF_SIZE
757 #define YY_READ_BUF_SIZE 8192
758 #endif
759 
760 /* Copy whatever the last rule matched to the standard output. */
761 #ifndef ECHO
762 /* This used to be an fputs(), but since the string might contain NUL's,
763  * we now use fwrite().
764  */
765 #define ECHO do { if (fwrite( wkt_yytext, wkt_yyleng, 1, wkt_yyout )) {} } while (0)
766 #endif
767 
768 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
769  * is returned in "result".
770  */
771 #ifndef YY_INPUT
772 #define YY_INPUT(buf,result,max_size) \
773  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
774  { \
775  int c = '*'; \
776  size_t n; \
777  for ( n = 0; n < max_size && \
778  (c = getc( wkt_yyin )) != EOF && c != '\n'; ++n ) \
779  buf[n] = (char) c; \
780  if ( c == '\n' ) \
781  buf[n++] = (char) c; \
782  if ( c == EOF && ferror( wkt_yyin ) ) \
783  YY_FATAL_ERROR( "input in flex scanner failed" ); \
784  result = n; \
785  } \
786  else \
787  { \
788  errno=0; \
789  while ( (result = fread(buf, 1, max_size, wkt_yyin))==0 && ferror(wkt_yyin)) \
790  { \
791  if( errno != EINTR) \
792  { \
793  YY_FATAL_ERROR( "input in flex scanner failed" ); \
794  break; \
795  } \
796  errno=0; \
797  clearerr(wkt_yyin); \
798  } \
799  }\
800 \
801 
802 #endif
803 
804 /* No semi-colon after return; correct usage is to write "yyterminate();" -
805  * we don't want an extra ';' after the "return" because that will cause
806  * some compilers to complain about unreachable statements.
807  */
808 #ifndef yyterminate
809 #define yyterminate() return YY_NULL
810 #endif
811 
812 /* Number of entries by which start-condition stack grows. */
813 #ifndef YY_START_STACK_INCR
814 #define YY_START_STACK_INCR 25
815 #endif
816 
817 /* Report a fatal error. */
818 #ifndef YY_FATAL_ERROR
819 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
820 #endif
821 
822 /* end tables serialization structures and prototypes */
823 
824 /* Default declaration of generated scanner - a define so the user can
825  * easily add parameters.
826  */
827 #ifndef YY_DECL
828 #define YY_DECL_IS_OURS 1
829 
830 extern int wkt_yylex (void);
831 
832 #define YY_DECL int wkt_yylex (void)
833 #endif /* !YY_DECL */
834 
835 /* Code executed at the beginning of each rule, after wkt_yytext and wkt_yyleng
836  * have been set up.
837  */
838 #ifndef YY_USER_ACTION
839 #define YY_USER_ACTION
840 #endif
841 
842 /* Code executed at the end of each rule. */
843 #ifndef YY_BREAK
844 #define YY_BREAK break;
845 #endif
846 
847 #define YY_RULE_SETUP \
848  YY_USER_ACTION
849 
852 YY_DECL
853 {
854  register yy_state_type yy_current_state;
855  register char *yy_cp, *yy_bp;
856  register int yy_act;
857 
858 #line 67 "lwin_wkt_lex.l"
859 
860 
861 #line 862 "lwin_wkt_lex.c"
862 
863  if ( !(yy_init) )
864  {
865  (yy_init) = 1;
866 
867 #ifdef YY_USER_INIT
868  YY_USER_INIT;
869 #endif
870 
871  if ( ! (yy_start) )
872  (yy_start) = 1; /* first start state */
873 
874  if ( ! wkt_yyin )
875  wkt_yyin = stdin;
876 
877  if ( ! wkt_yyout )
878  wkt_yyout = stdout;
879 
880  if ( ! YY_CURRENT_BUFFER ) {
884  }
885 
887  }
888 
889  while ( 1 ) /* loops until end-of-file is reached */
890  {
891  yy_cp = (yy_c_buf_p);
892 
893  /* Support of wkt_yytext. */
894  *yy_cp = (yy_hold_char);
895 
896  /* yy_bp points to the position in yy_ch_buf of the start of
897  * the current run.
898  */
899  yy_bp = yy_cp;
900 
901  yy_current_state = (yy_start);
902 yy_match:
903  do
904  {
905  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
906  if ( yy_accept[yy_current_state] )
907  {
908  (yy_last_accepting_state) = yy_current_state;
909  (yy_last_accepting_cpos) = yy_cp;
910  }
911  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
912  {
913  yy_current_state = (int) yy_def[yy_current_state];
914  if ( yy_current_state >= 172 )
915  yy_c = yy_meta[(unsigned int) yy_c];
916  }
917  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
918  ++yy_cp;
919  }
920  while ( yy_current_state != 171 );
921  yy_cp = (yy_last_accepting_cpos);
922  yy_current_state = (yy_last_accepting_state);
923 
924 yy_find_action:
925  yy_act = yy_accept[yy_current_state];
926 
928 
929 do_action: /* This label is used only to access EOF actions. */
930 
931  switch ( yy_act )
932  { /* beginning of action switch */
933  case 0: /* must back up */
934  /* undo the effects of YY_DO_BEFORE_ACTION */
935  *yy_cp = (yy_hold_char);
936  yy_cp = (yy_last_accepting_cpos);
937  yy_current_state = (yy_last_accepting_state);
938  goto yy_find_action;
939 
940 case 1:
942 #line 69 "lwin_wkt_lex.l"
943 {
944  LWDEBUG(5,"DOUBLE");
945  wkt_yylval.doublevalue = atof(wkt_yytext);
946  return DOUBLE_TOK;
947  }
948  YY_BREAK
949 case 2:
951 #line 75 "lwin_wkt_lex.l"
952 {
953  LWDEBUG(5,"SRID");
955  return SRID_TOK;
956  }
957  YY_BREAK
958 case 3:
960 #line 81 "lwin_wkt_lex.l"
961 { return COLLECTION_TOK; }
962  YY_BREAK
963 case 4:
965 #line 82 "lwin_wkt_lex.l"
966 { return MSURFACE_TOK; }
967  YY_BREAK
968 case 5:
970 #line 83 "lwin_wkt_lex.l"
971 { return MPOLYGON_TOK; }
972  YY_BREAK
973 case 6:
975 #line 84 "lwin_wkt_lex.l"
976 { return MCURVE_TOK; }
977  YY_BREAK
978 case 7:
980 #line 85 "lwin_wkt_lex.l"
981 { return MLINESTRING_TOK; }
982  YY_BREAK
983 case 8:
985 #line 86 "lwin_wkt_lex.l"
986 { return MPOINT_TOK; }
987  YY_BREAK
988 case 9:
990 #line 87 "lwin_wkt_lex.l"
991 { return CURVEPOLYGON_TOK; }
992  YY_BREAK
993 case 10:
995 #line 88 "lwin_wkt_lex.l"
996 { return POLYGON_TOK; }
997  YY_BREAK
998 case 11:
1000 #line 89 "lwin_wkt_lex.l"
1001 { return COMPOUNDCURVE_TOK; }
1002  YY_BREAK
1003 case 12:
1005 #line 90 "lwin_wkt_lex.l"
1006 { return CIRCULARSTRING_TOK; }
1007  YY_BREAK
1008 case 13:
1010 #line 91 "lwin_wkt_lex.l"
1011 { return LINESTRING_TOK; }
1012  YY_BREAK
1013 case 14:
1015 #line 92 "lwin_wkt_lex.l"
1016 { return POLYHEDRALSURFACE_TOK; }
1017  YY_BREAK
1018 case 15:
1020 #line 93 "lwin_wkt_lex.l"
1021 { return TRIANGLE_TOK; }
1022  YY_BREAK
1023 case 16:
1025 #line 94 "lwin_wkt_lex.l"
1026 { return TIN_TOK; }
1027  YY_BREAK
1028 case 17:
1030 #line 95 "lwin_wkt_lex.l"
1031 { return POINT_TOK; }
1032  YY_BREAK
1033 case 18:
1035 #line 96 "lwin_wkt_lex.l"
1036 { return EMPTY_TOK; }
1037  YY_BREAK
1038 case 19:
1040 #line 98 "lwin_wkt_lex.l"
1041 {
1042  LWDEBUG(5,"DIMENSIONALITY");
1044  return DIMENSIONALITY_TOK;
1045  }
1046  YY_BREAK
1047 case 20:
1049 #line 104 "lwin_wkt_lex.l"
1050 { LWDEBUG(5,"LBRACKET"); return LBRACKET_TOK; }
1051  YY_BREAK
1052 case 21:
1054 #line 105 "lwin_wkt_lex.l"
1055 { LWDEBUG(5,"RBRACKET"); return RBRACKET_TOK; }
1056  YY_BREAK
1057 case 22:
1059 #line 106 "lwin_wkt_lex.l"
1060 { LWDEBUG(5,"COMMA"); return COMMA_TOK; }
1061  YY_BREAK
1062 case 23:
1064 #line 107 "lwin_wkt_lex.l"
1065 { LWDEBUG(5,"SEMICOLON"); return SEMICOLON_TOK; }
1066  YY_BREAK
1067 case 24:
1068 /* rule 24 can match eol */
1070 #line 109 "lwin_wkt_lex.l"
1071 { /* ignore whitespace */ LWDEBUG(5,"WHITESPACE"); }
1072  YY_BREAK
1073 case 25:
1075 #line 111 "lwin_wkt_lex.l"
1076 { /* Error out and stop parsing on unknown/unexpected characters */
1077  LWDEBUG(5,"UNKNOWN");
1079  yyterminate();
1080  }
1081  YY_BREAK
1082 case 26:
1084 #line 117 "lwin_wkt_lex.l"
1085 ECHO;
1086  YY_BREAK
1087 #line 1088 "lwin_wkt_lex.c"
1088 case YY_STATE_EOF(INITIAL):
1089  yyterminate();
1090 
1091  case YY_END_OF_BUFFER:
1092  {
1093  /* Amount of text matched not including the EOB char. */
1094  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1095 
1096  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1097  *yy_cp = (yy_hold_char);
1099 
1100  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1101  {
1102  /* We're scanning a new file or input source. It's
1103  * possible that this happened because the user
1104  * just pointed wkt_yyin at a new source and called
1105  * wkt_yylex(). If so, then we have to assure
1106  * consistency between YY_CURRENT_BUFFER and our
1107  * globals. Here is the right place to do so, because
1108  * this is the first action (other than possibly a
1109  * back-up) that will match for the new input source.
1110  */
1111  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1112  YY_CURRENT_BUFFER_LVALUE->yy_input_file = wkt_yyin;
1113  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1114  }
1115 
1116  /* Note that here we test for yy_c_buf_p "<=" to the position
1117  * of the first EOB in the buffer, since yy_c_buf_p will
1118  * already have been incremented past the NUL character
1119  * (since all states make transitions on EOB to the
1120  * end-of-buffer state). Contrast this with the test
1121  * in input().
1122  */
1123  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1124  { /* This was really a NUL. */
1125  yy_state_type yy_next_state;
1126 
1127  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1128 
1129  yy_current_state = yy_get_previous_state( );
1130 
1131  /* Okay, we're now positioned to make the NUL
1132  * transition. We couldn't have
1133  * yy_get_previous_state() go ahead and do it
1134  * for us because it doesn't know how to deal
1135  * with the possibility of jamming (and we don't
1136  * want to build jamming into it because then it
1137  * will run more slowly).
1138  */
1139 
1140  yy_next_state = yy_try_NUL_trans( yy_current_state );
1141 
1142  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1143 
1144  if ( yy_next_state )
1145  {
1146  /* Consume the NUL. */
1147  yy_cp = ++(yy_c_buf_p);
1148  yy_current_state = yy_next_state;
1149  goto yy_match;
1150  }
1151 
1152  else
1153  {
1154  yy_cp = (yy_last_accepting_cpos);
1155  yy_current_state = (yy_last_accepting_state);
1156  goto yy_find_action;
1157  }
1158  }
1159 
1160  else switch ( yy_get_next_buffer( ) )
1161  {
1162  case EOB_ACT_END_OF_FILE:
1163  {
1165 
1166  if ( wkt_yywrap( ) )
1167  {
1168  /* Note: because we've taken care in
1169  * yy_get_next_buffer() to have set up
1170  * wkt_yytext, we can now set up
1171  * yy_c_buf_p so that if some total
1172  * hoser (like flex itself) wants to
1173  * call the scanner after we return the
1174  * YY_NULL, it'll still work - another
1175  * YY_NULL will get returned.
1176  */
1178 
1179  yy_act = YY_STATE_EOF(YY_START);
1180  goto do_action;
1181  }
1182 
1183  else
1184  {
1185  if ( ! (yy_did_buffer_switch_on_eof) )
1186  YY_NEW_FILE;
1187  }
1188  break;
1189  }
1190 
1191  case EOB_ACT_CONTINUE_SCAN:
1192  (yy_c_buf_p) =
1193  (yytext_ptr) + yy_amount_of_matched_text;
1194 
1195  yy_current_state = yy_get_previous_state( );
1196 
1197  yy_cp = (yy_c_buf_p);
1198  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1199  goto yy_match;
1200 
1201  case EOB_ACT_LAST_MATCH:
1202  (yy_c_buf_p) =
1203  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1204 
1205  yy_current_state = yy_get_previous_state( );
1206 
1207  yy_cp = (yy_c_buf_p);
1208  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1209  goto yy_find_action;
1210  }
1211  break;
1212  }
1213 
1214  default:
1216  "fatal flex scanner internal error--no action found" );
1217  } /* end of action switch */
1218  } /* end of scanning one token */
1219 } /* end of wkt_yylex */
1220 
1221 /* yy_get_next_buffer - try to read in a new buffer
1222  *
1223  * Returns a code representing an action:
1224  * EOB_ACT_LAST_MATCH -
1225  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1226  * EOB_ACT_END_OF_FILE - end of file
1227  */
1228 static int yy_get_next_buffer (void)
1229 {
1230  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1231  register char *source = (yytext_ptr);
1232  register int number_to_move, i;
1233  int ret_val;
1234 
1235  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1237  "fatal flex scanner internal error--end of buffer missed" );
1238 
1239  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1240  { /* Don't try to fill the buffer, so this is an EOF. */
1241  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1242  {
1243  /* We matched a single character, the EOB, so
1244  * treat this as a final EOF.
1245  */
1246  return EOB_ACT_END_OF_FILE;
1247  }
1248 
1249  else
1250  {
1251  /* We matched some text prior to the EOB, first
1252  * process it.
1253  */
1254  return EOB_ACT_LAST_MATCH;
1255  }
1256  }
1257 
1258  /* Try to read more data. */
1259 
1260  /* First move last chars to start of buffer. */
1261  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1262 
1263  for ( i = 0; i < number_to_move; ++i )
1264  *(dest++) = *(source++);
1265 
1266  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1267  /* don't do the read, it's not guaranteed to return an EOF,
1268  * just force an EOF
1269  */
1270  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1271 
1272  else
1273  {
1274  yy_size_t num_to_read =
1275  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1276 
1277  while ( num_to_read <= 0 )
1278  { /* Not enough room in the buffer - grow it. */
1279 
1280  /* just a shorter name for the current buffer */
1281  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1282 
1283  int yy_c_buf_p_offset =
1284  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1285 
1286  if ( b->yy_is_our_buffer )
1287  {
1288  yy_size_t new_size = b->yy_buf_size * 2;
1289 
1290  if ( new_size <= 0 )
1291  b->yy_buf_size += b->yy_buf_size / 8;
1292  else
1293  b->yy_buf_size *= 2;
1294 
1295  b->yy_ch_buf = (char *)
1296  /* Include room in for 2 EOB chars. */
1297  wkt_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1298  }
1299  else
1300  /* Can't grow it, we don't own it. */
1301  b->yy_ch_buf = 0;
1302 
1303  if ( ! b->yy_ch_buf )
1305  "fatal error - scanner input buffer overflow" );
1306 
1307  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1308 
1309  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1310  number_to_move - 1;
1311 
1312  }
1313 
1314  if ( num_to_read > YY_READ_BUF_SIZE )
1315  num_to_read = YY_READ_BUF_SIZE;
1316 
1317  /* Read in more data. */
1318  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1319  (yy_n_chars), num_to_read );
1320 
1321  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1322  }
1323 
1324  if ( (yy_n_chars) == 0 )
1325  {
1326  if ( number_to_move == YY_MORE_ADJ )
1327  {
1328  ret_val = EOB_ACT_END_OF_FILE;
1330  }
1331 
1332  else
1333  {
1334  ret_val = EOB_ACT_LAST_MATCH;
1335  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1337  }
1338  }
1339 
1340  else
1341  ret_val = EOB_ACT_CONTINUE_SCAN;
1342 
1343  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1344  /* Extend the array by 50%, plus the number we really need. */
1345  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1346  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wkt_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1347  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1348  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1349  }
1350 
1351  (yy_n_chars) += number_to_move;
1354 
1355  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1356 
1357  return ret_val;
1358 }
1359 
1360 /* yy_get_previous_state - get the state just before the EOB char was reached */
1361 
1362  static yy_state_type yy_get_previous_state (void)
1363 {
1364  register yy_state_type yy_current_state;
1365  register char *yy_cp;
1366 
1367  yy_current_state = (yy_start);
1368 
1369  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1370  {
1371  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1372  if ( yy_accept[yy_current_state] )
1373  {
1374  (yy_last_accepting_state) = yy_current_state;
1375  (yy_last_accepting_cpos) = yy_cp;
1376  }
1377  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1378  {
1379  yy_current_state = (int) yy_def[yy_current_state];
1380  if ( yy_current_state >= 172 )
1381  yy_c = yy_meta[(unsigned int) yy_c];
1382  }
1383  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1384  }
1385 
1386  return yy_current_state;
1387 }
1388 
1389 /* yy_try_NUL_trans - try to make a transition on the NUL character
1390  *
1391  * synopsis
1392  * next_state = yy_try_NUL_trans( current_state );
1393  */
1394  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1395 {
1396  register int yy_is_jam;
1397  register char *yy_cp = (yy_c_buf_p);
1398 
1399  register YY_CHAR yy_c = 1;
1400  if ( yy_accept[yy_current_state] )
1401  {
1402  (yy_last_accepting_state) = yy_current_state;
1403  (yy_last_accepting_cpos) = yy_cp;
1404  }
1405  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1406  {
1407  yy_current_state = (int) yy_def[yy_current_state];
1408  if ( yy_current_state >= 172 )
1409  yy_c = yy_meta[(unsigned int) yy_c];
1410  }
1411  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1412  yy_is_jam = (yy_current_state == 171);
1413 
1414  return yy_is_jam ? 0 : yy_current_state;
1415 }
1416 
1417 #ifndef YY_NO_INPUT
1418 #ifdef __cplusplus
1419  static int yyinput (void)
1420 #else
1421  static int input (void)
1422 #endif
1423 
1424 {
1425  int c;
1426 
1427  *(yy_c_buf_p) = (yy_hold_char);
1428 
1429  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1430  {
1431  /* yy_c_buf_p now points to the character we want to return.
1432  * If this occurs *before* the EOB characters, then it's a
1433  * valid NUL; if not, then we've hit the end of the buffer.
1434  */
1435  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1436  /* This was really a NUL. */
1437  *(yy_c_buf_p) = '\0';
1438 
1439  else
1440  { /* need more input */
1441  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1442  ++(yy_c_buf_p);
1443 
1444  switch ( yy_get_next_buffer( ) )
1445  {
1446  case EOB_ACT_LAST_MATCH:
1447  /* This happens because yy_g_n_b()
1448  * sees that we've accumulated a
1449  * token and flags that we need to
1450  * try matching the token before
1451  * proceeding. But for input(),
1452  * there's no matching to consider.
1453  * So convert the EOB_ACT_LAST_MATCH
1454  * to EOB_ACT_END_OF_FILE.
1455  */
1456 
1457  /* Reset buffer status. */
1459 
1460  /*FALLTHROUGH*/
1461 
1462  case EOB_ACT_END_OF_FILE:
1463  {
1464  if ( wkt_yywrap( ) )
1465  return EOF;
1466 
1467  if ( ! (yy_did_buffer_switch_on_eof) )
1468  YY_NEW_FILE;
1469 #ifdef __cplusplus
1470  return yyinput();
1471 #else
1472  return input();
1473 #endif
1474  }
1475 
1476  case EOB_ACT_CONTINUE_SCAN:
1477  (yy_c_buf_p) = (yytext_ptr) + offset;
1478  break;
1479  }
1480  }
1481  }
1482 
1483  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1484  *(yy_c_buf_p) = '\0'; /* preserve wkt_yytext */
1485  (yy_hold_char) = *++(yy_c_buf_p);
1486 
1487  return c;
1488 }
1489 #endif /* ifndef YY_NO_INPUT */
1490 
1496  void wkt_yyrestart (FILE * input_file )
1497 {
1498 
1499  if ( ! YY_CURRENT_BUFFER ){
1503  }
1504 
1507 }
1508 
1513  void wkt_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1514 {
1515 
1516  /* TODO. We should be able to replace this entire function body
1517  * with
1518  * wkt_yypop_buffer_state();
1519  * wkt_yypush_buffer_state(new_buffer);
1520  */
1522  if ( YY_CURRENT_BUFFER == new_buffer )
1523  return;
1524 
1525  if ( YY_CURRENT_BUFFER )
1526  {
1527  /* Flush out information for old buffer. */
1528  *(yy_c_buf_p) = (yy_hold_char);
1529  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1530  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1531  }
1532 
1533  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1535 
1536  /* We don't actually know whether we did this switch during
1537  * EOF (wkt_yywrap()) processing, but the only time this flag
1538  * is looked at is after wkt_yywrap() is called, so it's safe
1539  * to go ahead and always set it.
1540  */
1542 }
1543 
1544 static void wkt_yy_load_buffer_state (void)
1545 {
1546  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1547  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1548  wkt_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1549  (yy_hold_char) = *(yy_c_buf_p);
1550 }
1551 
1558  YY_BUFFER_STATE wkt_yy_create_buffer (FILE * file, int size )
1559 {
1560  YY_BUFFER_STATE b;
1561 
1562  b = (YY_BUFFER_STATE) wkt_yyalloc(sizeof( struct yy_buffer_state ) );
1563  if ( ! b )
1564  YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_create_buffer()" );
1565 
1566  b->yy_buf_size = size;
1567 
1568  /* yy_ch_buf has to be 2 characters longer than the size given because
1569  * we need to put in 2 end-of-buffer characters.
1570  */
1571  b->yy_ch_buf = (char *) wkt_yyalloc(b->yy_buf_size + 2 );
1572  if ( ! b->yy_ch_buf )
1573  YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_create_buffer()" );
1574 
1575  b->yy_is_our_buffer = 1;
1576 
1577  wkt_yy_init_buffer(b,file );
1578 
1579  return b;
1580 }
1581 
1586  void wkt_yy_delete_buffer (YY_BUFFER_STATE b )
1587 {
1588 
1589  if ( ! b )
1590  return;
1591 
1592  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1594 
1595  if ( b->yy_is_our_buffer )
1596  wkt_yyfree((void *) b->yy_ch_buf );
1597 
1598  wkt_yyfree((void *) b );
1599 }
1600 
1601 /* Initializes or reinitializes a buffer.
1602  * This function is sometimes called more than once on the same buffer,
1603  * such as during a wkt_yyrestart() or at EOF.
1604  */
1605  static void wkt_yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1606 
1607 {
1608  int oerrno = errno;
1609 
1610  wkt_yy_flush_buffer(b );
1611 
1612  b->yy_input_file = file;
1613  b->yy_fill_buffer = 1;
1614 
1615  /* If b is the current buffer, then wkt_yy_init_buffer was _probably_
1616  * called from wkt_yyrestart() or through yy_get_next_buffer.
1617  * In that case, we don't want to reset the lineno or column.
1618  */
1619  if (b != YY_CURRENT_BUFFER){
1620  b->yy_bs_lineno = 1;
1621  b->yy_bs_column = 0;
1622  }
1623 
1624  b->yy_is_interactive = 0;
1625 
1626  errno = oerrno;
1627 }
1628 
1633  void wkt_yy_flush_buffer (YY_BUFFER_STATE b )
1634 {
1635  if ( ! b )
1636  return;
1637 
1638  b->yy_n_chars = 0;
1639 
1640  /* We always need two end-of-buffer characters. The first causes
1641  * a transition to the end-of-buffer state. The second causes
1642  * a jam in that state.
1643  */
1646 
1647  b->yy_buf_pos = &b->yy_ch_buf[0];
1648 
1649  b->yy_at_bol = 1;
1651 
1652  if ( b == YY_CURRENT_BUFFER )
1654 }
1655 
1662 void wkt_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1663 {
1664  if (new_buffer == NULL)
1665  return;
1666 
1668 
1669  /* This block is copied from wkt_yy_switch_to_buffer. */
1670  if ( YY_CURRENT_BUFFER )
1671  {
1672  /* Flush out information for old buffer. */
1673  *(yy_c_buf_p) = (yy_hold_char);
1674  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1675  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1676  }
1677 
1678  /* Only push if top exists. Otherwise, replace top. */
1679  if (YY_CURRENT_BUFFER)
1680  (yy_buffer_stack_top)++;
1681  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1682 
1683  /* copied from wkt_yy_switch_to_buffer. */
1686 }
1687 
1693 {
1694  if (!YY_CURRENT_BUFFER)
1695  return;
1696 
1698  YY_CURRENT_BUFFER_LVALUE = NULL;
1699  if ((yy_buffer_stack_top) > 0)
1700  --(yy_buffer_stack_top);
1701 
1702  if (YY_CURRENT_BUFFER) {
1705  }
1706 }
1707 
1708 /* Allocates the stack if it does not exist.
1709  * Guarantees space for at least one push.
1710  */
1711 static void wkt_yyensure_buffer_stack (void)
1712 {
1713  yy_size_t num_to_alloc;
1714 
1715  if (!(yy_buffer_stack)) {
1716 
1717  /* First allocation is just for 2 elements, since we don't know if this
1718  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1719  * immediate realloc on the next call.
1720  */
1721  num_to_alloc = 1;
1723  (num_to_alloc * sizeof(struct yy_buffer_state*)
1724  );
1725  if ( ! (yy_buffer_stack) )
1726  YY_FATAL_ERROR( "out of dynamic memory in wkt_yyensure_buffer_stack()" );
1727 
1728  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1729 
1730  (yy_buffer_stack_max) = num_to_alloc;
1731  (yy_buffer_stack_top) = 0;
1732  return;
1733  }
1734 
1735  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1736 
1737  /* Increase the buffer to prepare for a possible push. */
1738  int grow_size = 8 /* arbitrary grow size */;
1739 
1740  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1742  ((yy_buffer_stack),
1743  num_to_alloc * sizeof(struct yy_buffer_state*)
1744  );
1745  if ( ! (yy_buffer_stack) )
1746  YY_FATAL_ERROR( "out of dynamic memory in wkt_yyensure_buffer_stack()" );
1747 
1748  /* zero only the new slots.*/
1749  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1750  (yy_buffer_stack_max) = num_to_alloc;
1751  }
1752 }
1753 
1760 YY_BUFFER_STATE wkt_yy_scan_buffer (char * base, yy_size_t size )
1761 {
1762  YY_BUFFER_STATE b;
1763 
1764  if ( size < 2 ||
1765  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1766  base[size-1] != YY_END_OF_BUFFER_CHAR )
1767  /* They forgot to leave room for the EOB's. */
1768  return 0;
1769 
1770  b = (YY_BUFFER_STATE) wkt_yyalloc(sizeof( struct yy_buffer_state ) );
1771  if ( ! b )
1772  YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_scan_buffer()" );
1773 
1774  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1775  b->yy_buf_pos = b->yy_ch_buf = base;
1776  b->yy_is_our_buffer = 0;
1777  b->yy_input_file = 0;
1778  b->yy_n_chars = b->yy_buf_size;
1779  b->yy_is_interactive = 0;
1780  b->yy_at_bol = 1;
1781  b->yy_fill_buffer = 0;
1783 
1785 
1786  return b;
1787 }
1788 
1797 YY_BUFFER_STATE wkt_yy_scan_string (yyconst char * yystr )
1798 {
1799 
1800  return wkt_yy_scan_bytes(yystr,strlen(yystr) );
1801 }
1802 
1810 YY_BUFFER_STATE wkt_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1811 {
1812  YY_BUFFER_STATE b;
1813  char *buf;
1814  yy_size_t n;
1815  int i;
1816 
1817  /* Get memory for full buffer, including space for trailing EOB's. */
1818  n = _yybytes_len + 2;
1819  buf = (char *) wkt_yyalloc(n );
1820  if ( ! buf )
1821  YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_scan_bytes()" );
1822 
1823  for ( i = 0; i < _yybytes_len; ++i )
1824  buf[i] = yybytes[i];
1825 
1826  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1827 
1828  b = wkt_yy_scan_buffer(buf,n );
1829  if ( ! b )
1830  YY_FATAL_ERROR( "bad buffer in wkt_yy_scan_bytes()" );
1831 
1832  /* It's okay to grow etc. this buffer, and we should throw it
1833  * away when we're done.
1834  */
1835  b->yy_is_our_buffer = 1;
1836 
1837  return b;
1838 }
1839 
1840 #ifndef YY_EXIT_FAILURE
1841 #define YY_EXIT_FAILURE 2
1842 #endif
1843 
1844 static void yy_fatal_error (yyconst char* msg )
1845 {
1846  (void) fprintf( stderr, "%s\n", msg );
1847  exit( YY_EXIT_FAILURE );
1848 }
1849 
1850 /* Redefine yyless() so it works in section 3 code. */
1851 
1852 #undef yyless
1853 #define yyless(n) \
1854  do \
1855  { \
1856  /* Undo effects of setting up wkt_yytext. */ \
1857  int yyless_macro_arg = (n); \
1858  YY_LESS_LINENO(yyless_macro_arg);\
1859  wkt_yytext[wkt_yyleng] = (yy_hold_char); \
1860  (yy_c_buf_p) = wkt_yytext + yyless_macro_arg; \
1861  (yy_hold_char) = *(yy_c_buf_p); \
1862  *(yy_c_buf_p) = '\0'; \
1863  wkt_yyleng = yyless_macro_arg; \
1864  } \
1865  while ( 0 )
1866 
1867 /* Accessor methods (get/set functions) to struct members. */
1868 
1873 {
1874 
1875  return wkt_yylineno;
1876 }
1877 
1881 FILE *wkt_yyget_in (void)
1882 {
1883  return wkt_yyin;
1884 }
1885 
1889 FILE *wkt_yyget_out (void)
1890 {
1891  return wkt_yyout;
1892 }
1893 
1898 {
1899  return wkt_yyleng;
1900 }
1901 
1906 char *wkt_yyget_text (void)
1907 {
1908  return wkt_yytext;
1909 }
1910 
1915 void wkt_yyset_lineno (int line_number )
1916 {
1917 
1918  wkt_yylineno = line_number;
1919 }
1920 
1927 void wkt_yyset_in (FILE * in_str )
1928 {
1929  wkt_yyin = in_str ;
1930 }
1931 
1932 void wkt_yyset_out (FILE * out_str )
1933 {
1934  wkt_yyout = out_str ;
1935 }
1936 
1938 {
1939  return wkt_yy_flex_debug;
1940 }
1941 
1942 void wkt_yyset_debug (int bdebug )
1943 {
1944  wkt_yy_flex_debug = bdebug ;
1945 }
1946 
1947 static int yy_init_globals (void)
1948 {
1949  /* Initialization is the same as for the non-reentrant scanner.
1950  * This function is called from wkt_yylex_destroy(), so don't allocate here.
1951  */
1952 
1953  (yy_buffer_stack) = 0;
1954  (yy_buffer_stack_top) = 0;
1955  (yy_buffer_stack_max) = 0;
1956  (yy_c_buf_p) = (char *) 0;
1957  (yy_init) = 0;
1958  (yy_start) = 0;
1959 
1960 /* Defined in main.c */
1961 #ifdef YY_STDINIT
1962  wkt_yyin = stdin;
1963  wkt_yyout = stdout;
1964 #else
1965  wkt_yyin = (FILE *) 0;
1966  wkt_yyout = (FILE *) 0;
1967 #endif
1968 
1969  /* For future reference: Set errno on error, since we are called by
1970  * wkt_yylex_init()
1971  */
1972  return 0;
1973 }
1974 
1975 /* wkt_yylex_destroy is for both reentrant and non-reentrant scanners. */
1977 {
1978 
1979  /* Pop the buffer stack, destroying each element. */
1980  while(YY_CURRENT_BUFFER){
1982  YY_CURRENT_BUFFER_LVALUE = NULL;
1984  }
1985 
1986  /* Destroy the stack itself. */
1987  wkt_yyfree((yy_buffer_stack) );
1988  (yy_buffer_stack) = NULL;
1989 
1990  /* Reset the globals. This is important in a non-reentrant scanner so the next time
1991  * wkt_yylex() is called, initialization will occur. */
1992  yy_init_globals( );
1993 
1994  return 0;
1995 }
1996 
1997 /*
1998  * Internal utility routines.
1999  */
2000 
2001 #ifndef yytext_ptr
2002 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2003 {
2004  register int i;
2005  for ( i = 0; i < n; ++i )
2006  s1[i] = s2[i];
2007 }
2008 #endif
2009 
2010 #ifdef YY_NEED_STRLEN
2011 static int yy_flex_strlen (yyconst char * s )
2012 {
2013  register int n;
2014  for ( n = 0; s[n]; ++n )
2015  ;
2016 
2017  return n;
2018 }
2019 #endif
2020 
2021 #define YYTABLES_NAME "yytables"
2022 
2023 #line 117 "lwin_wkt_lex.l"
2024 
2025 
2026 
2027 void *wkt_yyalloc (yy_size_t size )
2028 {
2029  return (void *) lwalloc( size );
2030 }
2031 
2032 void *wkt_yyrealloc (void * ptr, yy_size_t size )
2033 {
2034  return (void *) lwrealloc( (char *) ptr, size );
2035 }
2036 
2037 void wkt_yyfree (void * ptr )
2038 {
2039  lwfree( (char *) ptr ); /* see wkt_yyrealloc() for (char *) cast */
2040 }
FILE * wkt_yyget_in(void)
Get the input stream.
int flex_int32_t
Definition: lwin_wkt_lex.c:72
void wkt_yyset_lineno(int line_number)
Set the current line number.
static yy_state_type yy_get_previous_state(void)
int yy_bs_column
The column count.
Definition: lwin_wkt_lex.c:246
short int flex_int16_t
Definition: lwin_wkt_lex.c:71
static int yy_did_buffer_switch_on_eof
Definition: lwin_wkt_lex.c:305
void wkt_lexer_close()
Definition: lwin_wkt_lex.c:645
#define EOB_ACT_LAST_MATCH
Definition: lwin_wkt_lex.c:187
void wkt_yyset_in(FILE *in_str)
Set the input stream.
static yyconst flex_int16_t yy_nxt[419]
Definition: lwin_wkt_lex.c:506
struct yy_buffer_state * YY_BUFFER_STATE
Definition: lwin_wkt_lex.c:173
#define YY_BUF_SIZE
Definition: lwin_wkt_lex.c:164
unsigned short int flex_uint16_t
Definition: lwin_wkt_lex.c:74
YY_BUFFER_STATE wkt_yy_scan_bytes(yyconst char *bytes, yy_size_t len)
Setup the input buffer state to scan the given bytes.
yy_size_t wkt_yyget_leng(void)
Get the length of the current token.
yy_size_t yy_n_chars
Definition: lwin_wkt_lex.c:224
void lwfree(void *mem)
Definition: lwutil.c:214
void * wkt_yyrealloc(void *, yy_size_t)
char * stringvalue
#define YY_INPUT(buf, result, max_size)
Definition: lwin_wkt_lex.c:772
static void wkt_yy_load_buffer_state(void)
int wkt_lexer_read_srid(char *str)
Read the SRID number from an SRID=<> string.
Definition: lwin_wkt.c:47
static yyconst flex_int32_t yy_meta[53]
Definition: lwin_wkt_lex.c:450
#define yyconst
Definition: lwin_wkt_lex.c:128
#define YY_STATE_EOF(state)
Definition: lwin_wkt_lex.c:155
#define YY_BUFFER_NORMAL
Definition: lwin_wkt_lex.c:256
static int yy_get_next_buffer(void)
FILE * wkt_yyin
Definition: lwin_wkt_lex.c:360
#define YY_RULE_SETUP
Definition: lwin_wkt_lex.c:847
size_t yy_size_t
Definition: lwin_wkt_lex.c:178
#define YY_EXTRA_TYPE
Definition: lwin_wkt_lex.c:691
register char * yy_cp
Definition: lwin_wkt_lex.c:855
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
#define YY_CURRENT_BUFFER
Definition: lwin_wkt_lex.c:283
register char * yy_bp
Definition: lwin_wkt_lex.c:855
void wkt_yyfree(void *)
static yyconst flex_int16_t yy_chk[419]
Definition: lwin_wkt_lex.c:556
LWGEOM_PARSER_RESULT global_parser_result
int wkt_yylex_destroy(void)
#define YY_BREAK
Definition: lwin_wkt_lex.c:844
#define yyterminate()
Definition: lwin_wkt_lex.c:809
YY_BUFFER_STATE wkt_yy_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
#define YY_SC_TO_UI(c)
Definition: lwin_wkt_lex.c:139
flex_int32_t yy_verify
Definition: lwin_wkt_lex.c:392
FILE * wkt_yyget_out(void)
Get the output stream.
static yyconst flex_int16_t yy_accept[172]
Definition: lwin_wkt_lex.c:395
void wkt_yyrestart(FILE *input_file)
Immediately switch to a different input stream.
#define EOB_ACT_END_OF_FILE
Definition: lwin_wkt_lex.c:186
yy_size_t wkt_yyleng
Definition: lwin_wkt_lex.c:295
#define YY_END_OF_BUFFER
Definition: lwin_wkt_lex.c:387
#define YY_BUFFER_NEW
Definition: lwin_wkt_lex.c:255
void wkt_yy_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
#define YY_READ_BUF_SIZE
Definition: lwin_wkt_lex.c:757
signed char flex_int8_t
Definition: lwin_wkt_lex.c:70
int wkt_yy_flex_debug
Definition: lwin_wkt_lex.c:610
char * wkt_yytext
Definition: lwin_wkt_lex.c:619
#define YY_END_OF_BUFFER_CHAR
Definition: lwin_wkt_lex.c:160
static yy_size_t yy_n_chars
Definition: lwin_wkt_lex.c:294
unsigned char YY_CHAR
Definition: lwin_wkt_lex.c:358
#define INITIAL
Definition: lwin_wkt_lex.c:680
#define YY_EXIT_FAILURE
YY_EXTRA_TYPE wkt_yyget_extra(void)
int last_column
YYLTYPE wkt_yylloc
void wkt_yypop_buffer_state(void)
Removes and deletes the top of the stack, if present.
#define ECHO
Definition: lwin_wkt_lex.c:765
int wkt_yyget_lineno(void)
Get the current line number.
#define YY_FATAL_ERROR(msg)
Definition: lwin_wkt_lex.c:819
static YY_BUFFER_STATE wkt_yy_buf_state
Definition: lwin_wkt_lex.c:631
#define YY_CURRENT_BUFFER_LVALUE
Definition: lwin_wkt_lex.c:290
register int yy_act
Definition: lwin_wkt_lex.c:856
static void wkt_lexer_unknown()
Definition: lwin_wkt_lex.c:653
void wkt_yypush_buffer_state(YY_BUFFER_STATE new_buffer)
Pushes the new state onto the stack.
void wkt_yyset_debug(int debug_flag)
static void wkt_yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
#define wkt_yywrap()
Definition: lwin_wkt_lex.c:355
int integervalue
double doublevalue
char * s
Definition: cu_in_wkt.c:23
FILE * yy_input_file
Definition: lwin_wkt_lex.c:211
#define YY_MORE_ADJ
Definition: lwin_wkt_lex.c:617
int yy_bs_lineno
The line count.
Definition: lwin_wkt_lex.c:245
unsigned char flex_uint8_t
Definition: lwin_wkt_lex.c:73
yy_size_t yy_buf_size
Definition: lwin_wkt_lex.c:219
YY_BUFFER_STATE wkt_yy_scan_string(yyconst char *yy_str)
Setup the input buffer state to scan a string.
static char * yy_c_buf_p
Definition: lwin_wkt_lex.c:298
int yy_state_type
Definition: lwin_wkt_lex.c:362
static void yy_fatal_error(yyconst char msg[])
#define YY_RESTORE_YY_MORE_OFFSET
Definition: lwin_wkt_lex.c:618
const char * parser_error_messages[]
Definition: lwin_wkt.c:23
int wkt_yyget_debug(void)
#define YY_DECL
Definition: lwin_wkt_lex.c:832
void wkt_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Switch to a different input buffer.
#define YY_BUFFER_EOF_PENDING
Definition: lwin_wkt_lex.c:267
static yy_state_type yy_last_accepting_state
Definition: lwin_wkt_lex.c:606
void wkt_lexer_init(char *src)
Definition: lwin_wkt_lex.c:637
static size_t yy_buffer_stack_top
index of top of stack.
Definition: lwin_wkt_lex.c:273
#define EOB_ACT_CONTINUE_SCAN
Definition: lwin_wkt_lex.c:185
void * lwrealloc(void *mem, size_t size)
Definition: lwutil.c:207
#define YY_NEW_FILE
Definition: lwin_wkt_lex.c:158
static int yy_init
Definition: lwin_wkt_lex.c:299
#define YY_DO_BEFORE_ACTION
Definition: lwin_wkt_lex.c:379
static size_t yy_buffer_stack_max
capacity of stack.
Definition: lwin_wkt_lex.c:274
static yyconst flex_int16_t yy_def[172]
Definition: lwin_wkt_lex.c:483
#define YY_START
Definition: lwin_wkt_lex.c:151
flex_int32_t yy_nxt
Definition: lwin_wkt_lex.c:393
static int yy_init_globals(void)
static yyconst flex_int16_t yy_base[172]
Definition: lwin_wkt_lex.c:460
static char * yy_last_accepting_cpos
Definition: lwin_wkt_lex.c:607
char * wkt_yyget_text(void)
Get the current token.
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: lwin_wkt_lex.c:275
void * lwalloc(size_t size)
Definition: lwutil.c:199
static char yy_hold_char
Definition: lwin_wkt_lex.c:293
void wkt_yyset_out(FILE *out_str)
static void wkt_yyensure_buffer_stack(void)
#define yytext_ptr
Definition: lwin_wkt_lex.c:369
static int yy_start
Definition: lwin_wkt_lex.c:300
YY_BUFFER_STATE wkt_yy_scan_buffer(char *base, yy_size_t size)
Setup the input buffer state to scan directly from a user-specified character buffer.
unsigned int flex_uint32_t
Definition: lwin_wkt_lex.c:75
void wkt_yyset_extra(YY_EXTRA_TYPE user_defined)
YYSTYPE wkt_yylval
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:1901
FILE * wkt_yyout
Definition: lwin_wkt_lex.c:360
static yyconst flex_int32_t yy_ec[256]
Definition: lwin_wkt_lex.c:418
int wkt_yylineno
Definition: lwin_wkt_lex.c:366
void * wkt_yyalloc(yy_size_t)
int wkt_yylex(void)
void wkt_yy_flush_buffer(YY_BUFFER_STATE b)
Discard all buffered characters.