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