rheolef  6.3
space_constitution_lex.cc
Go to the documentation of this file.
1 
2 #line 3 "<stdout>"
3 
4 #define YY_INT_ALIGNED short int
5 
6 /* A lexical scanner generated by flex */
7 
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15 
16  /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
17  * following macro. This is required in order to pass the c++-multiple-scanners
18  * test in the regression suite. We get reports that it breaks inheritance.
19  * We will address this in a future release of flex, or omit the C++ scanner
20  * altogether.
21  */
22  #define yyFlexLexer space_constitution_FlexLexer
23 
24 /* First, we deal with platform-specific or compiler-specific issues. */
25 
26 /* begin standard C headers. */
27 
28 /* end standard C headers. */
29 
30 /* flex integer type definitions */
31 
32 #ifndef FLEXINT_H
33 #define FLEXINT_H
34 
35 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
36 
37 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
38 
39 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
40  * if you want the limit (max/min) macros for int types.
41  */
42 #ifndef __STDC_LIMIT_MACROS
43 #define __STDC_LIMIT_MACROS 1
44 #endif
45 
46 #include <inttypes.h>
47 typedef int8_t flex_int8_t;
48 typedef uint8_t flex_uint8_t;
49 typedef int16_t flex_int16_t;
50 typedef uint16_t flex_uint16_t;
51 typedef int32_t flex_int32_t;
52 typedef uint32_t flex_uint32_t;
53 #else
54 typedef signed char flex_int8_t;
55 typedef short int flex_int16_t;
56 typedef int flex_int32_t;
57 typedef unsigned char flex_uint8_t;
58 typedef unsigned short int flex_uint16_t;
59 typedef unsigned int flex_uint32_t;
60 
61 /* Limits of integral types. */
62 #ifndef INT8_MIN
63 #define INT8_MIN (-128)
64 #endif
65 #ifndef INT16_MIN
66 #define INT16_MIN (-32767-1)
67 #endif
68 #ifndef INT32_MIN
69 #define INT32_MIN (-2147483647-1)
70 #endif
71 #ifndef INT8_MAX
72 #define INT8_MAX (127)
73 #endif
74 #ifndef INT16_MAX
75 #define INT16_MAX (32767)
76 #endif
77 #ifndef INT32_MAX
78 #define INT32_MAX (2147483647)
79 #endif
80 #ifndef UINT8_MAX
81 #define UINT8_MAX (255U)
82 #endif
83 #ifndef UINT16_MAX
84 #define UINT16_MAX (65535U)
85 #endif
86 #ifndef UINT32_MAX
87 #define UINT32_MAX (4294967295U)
88 #endif
89 
90 #endif /* ! C99 */
91 
92 #endif /* ! FLEXINT_H */
93 
94 /* begin standard C++ headers. */
95 #include <iostream>
96 #include <errno.h>
97 #include <cstdlib>
98 #include <cstdio>
99 #include <cstring>
100 /* end standard C++ headers. */
101 
102 #ifdef __cplusplus
103 
104 /* The "const" storage-class-modifier is valid. */
105 #define YY_USE_CONST
106 
107 #else /* ! __cplusplus */
108 
109 /* C99 requires __STDC__ to be defined as 1. */
110 #if defined (__STDC__)
111 
112 #define YY_USE_CONST
113 
114 #endif /* defined (__STDC__) */
115 #endif /* ! __cplusplus */
116 
117 #ifdef YY_USE_CONST
118 #define yyconst const
119 #else
120 #define yyconst
121 #endif
122 
123 /* Returned upon end-of-file. */
124 #define YY_NULL 0
125 
126 /* Promotes a possibly negative, possibly signed char to an unsigned
127  * integer for use as an array index. If the signed char is negative,
128  * we want to instead treat it as an 8-bit unsigned char, hence the
129  * double cast.
130  */
131 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
132 
133 /* Enter a start condition. This macro really ought to take a parameter,
134  * but we do it the disgusting crufty way forced on us by the ()-less
135  * definition of BEGIN.
136  */
137 #define BEGIN (yy_start) = 1 + 2 *
138 
139 /* Translate the current start state into a value that can be later handed
140  * to BEGIN to return to the state. The YYSTATE alias is for lex
141  * compatibility.
142  */
143 #define YY_START (((yy_start) - 1) / 2)
144 #define YYSTATE YY_START
145 
146 /* Action number for EOF rule of a given start state. */
147 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
148 
149 /* Special action meaning "start processing a new file". */
150 #define YY_NEW_FILE yyrestart( yyin )
151 
152 #define YY_END_OF_BUFFER_CHAR 0
153 
154 /* Size of default input buffer. */
155 #ifndef YY_BUF_SIZE
156 #ifdef __ia64__
157 /* On IA-64, the buffer size is 16k, not 8k.
158  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
159  * Ditto for the __ia64__ case accordingly.
160  */
161 #define YY_BUF_SIZE 32768
162 #else
163 #define YY_BUF_SIZE 16384
164 #endif /* __ia64__ */
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 extern int yyleng;
177 
178 #define EOB_ACT_CONTINUE_SCAN 0
179 #define EOB_ACT_END_OF_FILE 1
180 #define EOB_ACT_LAST_MATCH 2
181 
182  #define YY_LESS_LINENO(n)
183 
184 /* Return all but the first "n" matched characters back to the input stream. */
185 #define yyless(n) \
186  do \
187  { \
188  /* Undo effects of setting up yytext. */ \
189  int yyless_macro_arg = (n); \
190  YY_LESS_LINENO(yyless_macro_arg);\
191  *yy_cp = (yy_hold_char); \
192  YY_RESTORE_YY_MORE_OFFSET \
193  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
194  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
195  } \
196  while ( 0 )
197 
198 #define unput(c) yyunput( c, (yytext_ptr) )
199 
200 #ifndef YY_TYPEDEF_YY_SIZE_T
201 #define YY_TYPEDEF_YY_SIZE_T
202 typedef size_t yy_size_t;
203 #endif
204 
205 #ifndef YY_STRUCT_YY_BUFFER_STATE
206 #define YY_STRUCT_YY_BUFFER_STATE
208  {
209 
210  std::istream* yy_input_file;
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 yyrestart()), so that the user can continue scanning by
264  * just pointing 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 /* We provide macros for accessing buffer states in case in the
272  * future we want to put the buffer states in a more general
273  * "scanner state".
274  *
275  * Returns the top of the stack, or NULL.
276  */
277 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
278  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
279  : NULL)
280 
281 /* Same as previous macro, but useful when we know that the buffer stack is not
282  * NULL or when we need an lvalue. For internal use only.
283  */
284 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
285 
287 void *space_constitution_realloc (void *,yy_size_t );
288 void space_constitution_free (void * );
289 
290 #define yy_new_buffer yy_create_buffer
291 
292 #define yy_set_interactive(is_interactive) \
293  { \
294  if ( ! YY_CURRENT_BUFFER ){ \
295  yyensure_buffer_stack (); \
296  YY_CURRENT_BUFFER_LVALUE = \
297  yy_create_buffer( yyin, YY_BUF_SIZE ); \
298  } \
299  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
300  }
301 
302 #define yy_set_bol(at_bol) \
303  { \
304  if ( ! YY_CURRENT_BUFFER ){\
305  yyensure_buffer_stack (); \
306  YY_CURRENT_BUFFER_LVALUE = \
307  yy_create_buffer( yyin, YY_BUF_SIZE ); \
308  } \
309  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
310  }
311 
312 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
313 
314 /* Begin user sect3 */
315 #define YY_SKIP_YYWRAP
316 
317 typedef unsigned char YY_CHAR;
318 
319 #define yytext_ptr yytext
320 #define YY_INTERACTIVE
321 
322 
323 
324 // documentation and/or other materials provided with the distribution.
325 
326 
327 
328 // include <FlexLexer.h> in your other sources once per lexer class:
329 // #include <FlexLexer.h>
330 // #include <FlexLexer.h>
331 
332 #ifndef __FLEX_LEXER_H
333 #define __FLEX_LEXER_H
334 
335 #include <iostream>
336 # ifndef FLEX_STD
337 # define FLEX_STD std::
338 # endif
339 
340 extern "C++" {
341 
343 typedef int yy_state_type;
344 
345 class FlexLexer {
346 public:
347  virtual ~FlexLexer() { }
348 
349  const char* YYText() const { return yytext; }
350  int YYLeng() const { return yyleng; }
351 
352  virtual void
353  yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
354  virtual struct yy_buffer_state*
355  yy_create_buffer( FLEX_STD istream* s, int size ) = 0;
356  virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
357  virtual void yyrestart( FLEX_STD istream* s ) = 0;
358 
359  virtual int yylex() = 0;
360 
361  // Call yylex with new input/output sources.
362  int yylex( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 )
363  {
364  switch_streams( new_in, new_out );
365  return yylex();
366  }
367 
368  // Switch to new input/output streams. A nil stream pointer
369  virtual void switch_streams( FLEX_STD istream* new_in = 0,
370  FLEX_STD ostream* new_out = 0 ) = 0;
371 
372  int lineno() const { return yylineno; }
373 
374  int debug() const { return yy_flex_debug; }
375  void set_debug( int flag ) { yy_flex_debug = flag; }
376 
377 protected:
378  char* yytext;
379  int yyleng;
380  int yylineno; // only maintained if you use %option yylineno
381  int yy_flex_debug; // only has effect with -d or "%option debug"
382 };
383 
384 }
385 #endif // FLEXLEXER_H
386 
387 #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
388 #define yyFlexLexerOnce
389 
390 extern "C++" {
391 
392 class yyFlexLexer : public FlexLexer {
393 public:
394  yyFlexLexer( FLEX_STD istream* arg_yyin = 0, FLEX_STD ostream* arg_yyout = 0 );
395 
396  virtual ~yyFlexLexer();
397 
398  void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
399  struct yy_buffer_state* yy_create_buffer( FLEX_STD istream* s, int size );
400  void yy_delete_buffer( struct yy_buffer_state* b );
401  void yyrestart( FLEX_STD istream* s );
402 
403  void yypush_buffer_state( struct yy_buffer_state* new_buffer );
404  void yypop_buffer_state();
405 
406  virtual int yylex();
407  virtual void switch_streams( FLEX_STD istream* new_in, FLEX_STD ostream* new_out = 0 );
408  virtual int yywrap();
409 
410 protected:
411  virtual int LexerInput( char* buf, int max_size );
412  virtual void LexerOutput( const char* buf, int size );
413  virtual void LexerError( const char* msg );
414 
415  void yyunput( int c, char* buf_ptr );
416  int yyinput();
417 
418  void yy_load_buffer_state();
419  void yy_init_buffer( struct yy_buffer_state* b, FLEX_STD istream* s );
420  void yy_flush_buffer( struct yy_buffer_state* b );
421 
425 
426  void yy_push_state( int new_state );
427  void yy_pop_state();
428  int yy_top_state();
429 
432  int yy_get_next_buffer();
433 
434  FLEX_STD istream* yyin; // input source for default LexerInput
435  FLEX_STD ostream* yyout; // output sink for default LexerOutput
436 
438 
440 
441  char* yy_c_buf_p;
442 
443  int yy_init; // whether we need to initialize
444  int yy_start; // start state number
445 
447 
448 
452  void yyensure_buffer_stack(void);
453 
454 
457 
460 
464 
465  int yy_lp;
467 
472 };
473 
474 }
475 
476 #endif // yyFlexLexer || ! yyFlexLexerOnce
477 
478 
479 int yyFlexLexer::yywrap() { return 1; }
480 
481 /* Done after the current pattern has been matched and before the
482  * corresponding action - sets up yytext.
483  */
484 #define YY_DO_BEFORE_ACTION \
485  (yytext_ptr) = yy_bp; \
486  yyleng = (size_t) (yy_cp - yy_bp); \
487  (yy_hold_char) = *yy_cp; \
488  *yy_cp = '\0'; \
489  (yy_c_buf_p) = yy_cp;
490 
491 #define YY_NUM_RULES 11
492 #define YY_END_OF_BUFFER 12
493 /* This struct is not used in this scanner,
494  but its presence is necessary. */
496  {
499  };
501  { 0,
502  0, 0, 12, 10, 2, 1, 9, 8, 8, 8,
503  8, 8, 9, 8, 8, 8, 8, 8, 8, 8,
504  8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
505  3, 5, 8, 4, 7, 8, 8, 8, 8, 8,
506  8, 8, 8, 8, 8, 8, 6, 0
507  } ;
508 
510  { 0,
511  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
512  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
513  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
514  1, 2, 1, 1, 4, 5, 1, 1, 1, 1,
515  1, 1, 1, 5, 5, 5, 1, 5, 5, 5,
516  5, 6, 5, 5, 5, 5, 5, 1, 5, 1,
517  5, 1, 1, 5, 7, 7, 7, 7, 7, 7,
518  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
519  7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
520  5, 1, 5, 1, 8, 1, 9, 7, 10, 7,
521 
522  11, 7, 7, 7, 12, 7, 7, 13, 14, 15,
523  16, 7, 7, 17, 18, 19, 20, 21, 7, 7,
524  22, 7, 1, 1, 1, 1, 1, 1, 1, 1,
525  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
526  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
527  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
528  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
529  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
530  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
531  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
532 
533  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
534  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
535  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
536  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
537  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
538  1, 1, 1, 1, 1
539  } ;
540 
542  { 0,
543  1, 1, 2, 1, 3, 3, 3, 3, 3, 3,
544  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
545  3, 3
546  } ;
547 
549  { 0,
550  0, 0, 59, 60, 60, 60, 0, 0, 48, 46,
551  41, 44, 0, 0, 45, 38, 34, 41, 37, 31,
552  26, 28, 37, 29, 30, 27, 25, 24, 26, 22,
553  0, 32, 26, 0, 0, 17, 18, 22, 23, 24,
554  12, 19, 14, 10, 11, 9, 0, 60, 22, 21
555  } ;
556 
558  { 0,
559  48, 1, 48, 48, 48, 48, 49, 50, 50, 50,
560  50, 50, 49, 50, 50, 50, 50, 50, 50, 50,
561  50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
562  50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
563  50, 50, 50, 50, 50, 50, 50, 0, 48, 48
564  } ;
565 
567  { 0,
568  4, 5, 6, 7, 4, 4, 8, 4, 8, 8,
569  8, 8, 8, 8, 8, 8, 8, 9, 10, 11,
570  12, 8, 13, 14, 13, 47, 46, 45, 44, 43,
571  42, 41, 40, 39, 38, 37, 36, 35, 34, 33,
572  32, 31, 30, 29, 28, 27, 26, 25, 24, 23,
573  22, 21, 20, 19, 18, 17, 16, 15, 48, 3,
574  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
575  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
576  48, 48
577  } ;
578 
580  { 0,
581  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
582  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
583  1, 1, 49, 50, 49, 46, 45, 44, 43, 42,
584  41, 40, 39, 38, 37, 36, 33, 32, 30, 29,
585  28, 27, 26, 25, 24, 23, 22, 21, 20, 19,
586  18, 17, 16, 15, 12, 11, 10, 9, 3, 48,
587  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
588  48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
589  48, 48
590  } ;
591 
592 /* The intent behind this definition is that it'll catch
593  * any uses of REJECT which flex missed.
594  */
595 #define REJECT reject_used_but_not_detected
596 #define yymore() yymore_used_but_not_detected
597 #define YY_MORE_ADJ 0
598 #define YY_RESTORE_YY_MORE_OFFSET
599 #line 1 "space_constitution_lex.flex"
600 #line 3 "space_constitution_lex.flex"
601 // Rheolef is free software; you can redistribute it and/or modify
602 #line 471 "<stdout>"
603 
604 #define INITIAL 0
605 
606 #ifndef YY_NO_UNISTD_H
607 /* Special case for "unistd.h", since it is non-ANSI. We include it way
608  * down here because we want the user's section 1 to have been scanned first.
609  * The user has a chance to override it with an option.
610  */
611 #include <unistd.h>
612 #endif
613 
614 #ifndef YY_EXTRA_TYPE
615 #define YY_EXTRA_TYPE void *
616 #endif
617 
618 #ifndef yytext_ptr
619 static void yy_flex_strncpy (char *,yyconst char *,int );
620 #endif
621 
622 #ifdef YY_NEED_STRLEN
623 static int yy_flex_strlen (yyconst char * );
624 #endif
625 
626 #ifndef YY_NO_INPUT
627 
628 #endif
629 
630 /* Amount of stuff to slurp up with each read. */
631 #ifndef YY_READ_BUF_SIZE
632 #ifdef __ia64__
633 /* On IA-64, the buffer size is 16k, not 8k */
634 #define YY_READ_BUF_SIZE 16384
635 #else
636 #define YY_READ_BUF_SIZE 8192
637 #endif /* __ia64__ */
638 #endif
639 
640 /* Copy whatever the last rule matched to the standard output. */
641 #ifndef ECHO
642 #define ECHO LexerOutput( yytext, yyleng )
643 #endif
644 
645 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
646  * is returned in "result".
647  */
648 #ifndef YY_INPUT
649 #define YY_INPUT(buf,result,max_size) \
650 \
651  if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
652  YY_FATAL_ERROR( "input in flex scanner failed" );
653 
654 #endif
655 
656 /* No semi-colon after return; correct usage is to write "yyterminate();" -
657  * we don't want an extra ';' after the "return" because that will cause
658  * some compilers to complain about unreachable statements.
659  */
660 #ifndef yyterminate
661 #define yyterminate() return YY_NULL
662 #endif
663 
664 /* Number of entries by which start-condition stack grows. */
665 #ifndef YY_START_STACK_INCR
666 #define YY_START_STACK_INCR 25
667 #endif
668 
669 /* Report a fatal error. */
670 #ifndef YY_FATAL_ERROR
671 #define YY_FATAL_ERROR(msg) LexerError( msg )
672 #endif
673 
674 /* end tables serialization structures and prototypes */
675 
676 /* Default declaration of generated scanner - a define so the user can
677  * easily add parameters.
678  */
679 #ifndef YY_DECL
680 #define YY_DECL_IS_OURS 1
681 #define YY_DECL int yyFlexLexer::yylex()
682 #endif /* !YY_DECL */
683 
684 /* Code executed at the beginning of each rule, after yytext and yyleng
685  * have been set up.
686  */
687 #ifndef YY_USER_ACTION
688 #define YY_USER_ACTION
689 #endif
690 
691 /* Code executed at the end of each rule. */
692 #ifndef YY_BREAK
693 #define YY_BREAK break;
694 #endif
695 
696 #define YY_RULE_SETUP \
697  YY_USER_ACTION
698 
701 YY_DECL
702 {
704  register char *yy_cp, *yy_bp;
705  register int yy_act;
706 
707 #line 28 "space_constitution_lex.flex"
708 
709 #line 578 "<stdout>"
710 
711  if ( !(yy_init) )
712  {
713  (yy_init) = 1;
714 
715 #ifdef YY_USER_INIT
716  YY_USER_INIT;
717 #endif
718 
719  if ( ! (yy_start) )
720  (yy_start) = 1; /* first start state */
721 
722  if ( ! yyin )
723  yyin = & std::cin;
724 
725  if ( ! yyout )
726  yyout = & std::cout;
727 
728  if ( ! YY_CURRENT_BUFFER ) {
729  yyensure_buffer_stack ();
731  yy_create_buffer( yyin, YY_BUF_SIZE );
732  }
733 
734  yy_load_buffer_state( );
735  }
736 
737  while ( 1 ) /* loops until end-of-file is reached */
738  {
739  yy_cp = (yy_c_buf_p);
740 
741  /* Support of yytext. */
742  *yy_cp = (yy_hold_char);
743 
744  /* yy_bp points to the position in yy_ch_buf of the start of
745  * the current run.
746  */
747  yy_bp = yy_cp;
748 
749  yy_current_state = (yy_start);
750 yy_match:
751  do
752  {
753  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
754  if ( yy_accept[yy_current_state] )
755  {
756  (yy_last_accepting_state) = yy_current_state;
757  (yy_last_accepting_cpos) = yy_cp;
758  }
759  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
760  {
761  yy_current_state = (int) yy_def[yy_current_state];
762  if ( yy_current_state >= 49 )
763  yy_c = yy_meta[(unsigned int) yy_c];
764  }
765  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
766  ++yy_cp;
767  }
768  while ( yy_base[yy_current_state] != 60 );
769 
770 yy_find_action:
771  yy_act = yy_accept[yy_current_state];
772  if ( yy_act == 0 )
773  { /* have to back up */
774  yy_cp = (yy_last_accepting_cpos);
775  yy_current_state = (yy_last_accepting_state);
776  yy_act = yy_accept[yy_current_state];
777  }
778 
780 
781 do_action: /* This label is used only to access EOF actions. */
782 
783  switch ( yy_act )
784  { /* beginning of action switch */
785  case 0: /* must back up */
786  /* undo the effects of YY_DO_BEFORE_ACTION */
787  *yy_cp = (yy_hold_char);
788  yy_cp = (yy_last_accepting_cpos);
789  yy_current_state = (yy_last_accepting_state);
790  goto yy_find_action;
791 
792 case 1:
793 /* rule 1 can match eol */
795 #line 29 "space_constitution_lex.flex"
796 { /* newline */ ++space_constitution_line_no; }
797  YY_BREAK
798 case 2:
800 #line 30 "space_constitution_lex.flex"
801 { /* space */; }
802  YY_BREAK
803 case 3:
805 #line 31 "space_constitution_lex.flex"
806 { yylval.string_value = insert(yytext); return SCALAR; }
807  YY_BREAK
808 case 4:
810 #line 32 "space_constitution_lex.flex"
811 { yylval.string_value = insert(yytext); return VECTOR; }
812  YY_BREAK
813 case 5:
815 #line 33 "space_constitution_lex.flex"
816 { yylval.string_value = insert(yytext); return TENSOR; }
817  YY_BREAK
818 case 6:
820 #line 34 "space_constitution_lex.flex"
821 { yylval.string_value = insert(yytext); return UNSYMMETRIC_TENSOR; }
822  YY_BREAK
823 case 7:
825 #line 35 "space_constitution_lex.flex"
826 { yylval.string_value = insert(yytext); return TENSOR4; }
827  YY_BREAK
828 case 8:
830 #line 36 "space_constitution_lex.flex"
831 { yylval.string_value = insert(yytext); return IDENTIFIER; }
832  YY_BREAK
833 case 9:
835 #line 37 "space_constitution_lex.flex"
836 { /* comment */; }
837  YY_BREAK
838 case 10:
840 #line 38 "space_constitution_lex.flex"
841 { return *yytext ; /* default */ }
842  YY_BREAK
843 case 11:
845 #line 39 "space_constitution_lex.flex"
846 ECHO;
847  YY_BREAK
848 #line 717 "<stdout>"
849 case YY_STATE_EOF(INITIAL):
850  yyterminate();
851 
852  case YY_END_OF_BUFFER:
853  {
854  /* Amount of text matched not including the EOB char. */
855  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
856 
857  /* Undo the effects of YY_DO_BEFORE_ACTION. */
858  *yy_cp = (yy_hold_char);
860 
861  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
862  {
863  /* We're scanning a new file or input source. It's
864  * possible that this happened because the user
865  * just pointed yyin at a new source and called
866  * yylex(). If so, then we have to assure
867  * consistency between YY_CURRENT_BUFFER and our
868  * globals. Here is the right place to do so, because
869  * this is the first action (other than possibly a
870  * back-up) that will match for the new input source.
871  */
872  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
873  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
874  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
875  }
876 
877  /* Note that here we test for yy_c_buf_p "<=" to the position
878  * of the first EOB in the buffer, since yy_c_buf_p will
879  * already have been incremented past the NUL character
880  * (since all states make transitions on EOB to the
881  * end-of-buffer state). Contrast this with the test
882  * in input().
883  */
884  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
885  { /* This was really a NUL. */
886  yy_state_type yy_next_state;
887 
888  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
889 
890  yy_current_state = yy_get_previous_state( );
891 
892  /* Okay, we're now positioned to make the NUL
893  * transition. We couldn't have
894  * yy_get_previous_state() go ahead and do it
895  * for us because it doesn't know how to deal
896  * with the possibility of jamming (and we don't
897  * want to build jamming into it because then it
898  * will run more slowly).
899  */
900 
901  yy_next_state = yy_try_NUL_trans( yy_current_state );
902 
903  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
904 
905  if ( yy_next_state )
906  {
907  /* Consume the NUL. */
908  yy_cp = ++(yy_c_buf_p);
909  yy_current_state = yy_next_state;
910  goto yy_match;
911  }
912 
913  else
914  {
915  yy_cp = (yy_c_buf_p);
916  goto yy_find_action;
917  }
918  }
919 
920  else switch ( yy_get_next_buffer( ) )
921  {
922  case EOB_ACT_END_OF_FILE:
923  {
924  (yy_did_buffer_switch_on_eof) = 0;
925 
926  if ( yywrap( ) )
927  {
928  /* Note: because we've taken care in
929  * yy_get_next_buffer() to have set up
930  * yytext, we can now set up
931  * yy_c_buf_p so that if some total
932  * hoser (like flex itself) wants to
933  * call the scanner after we return the
934  * YY_NULL, it'll still work - another
935  * YY_NULL will get returned.
936  */
937  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
938 
939  yy_act = YY_STATE_EOF(YY_START);
940  goto do_action;
941  }
942 
943  else
944  {
945  if ( ! (yy_did_buffer_switch_on_eof) )
946  YY_NEW_FILE;
947  }
948  break;
949  }
950 
952  (yy_c_buf_p) =
953  (yytext_ptr) + yy_amount_of_matched_text;
954 
955  yy_current_state = yy_get_previous_state( );
956 
957  yy_cp = (yy_c_buf_p);
958  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
959  goto yy_match;
960 
961  case EOB_ACT_LAST_MATCH:
962  (yy_c_buf_p) =
963  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
964 
965  yy_current_state = yy_get_previous_state( );
966 
967  yy_cp = (yy_c_buf_p);
968  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
969  goto yy_find_action;
970  }
971  break;
972  }
973 
974  default:
976  "fatal flex scanner internal error--no action found" );
977  } /* end of action switch */
978  } /* end of scanning one token */
979 } /* end of yylex */
980 
981 /* The contents of this function are C++ specific, so the () macro is not used.
982  */
983 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
984 {
985  yyin = arg_yyin;
986  yyout = arg_yyout;
987  yy_c_buf_p = 0;
988  yy_init = 0;
989  yy_start = 0;
990  yy_flex_debug = 0;
991  yylineno = 1; // this will only get updated if %option yylineno
992 
994 
996  yy_more_flag = 0;
997  yy_more_len = 0;
999 
1001  yy_start_stack = NULL;
1002 
1003  yy_buffer_stack = 0;
1004  yy_buffer_stack_top = 0;
1005  yy_buffer_stack_max = 0;
1006 
1007  yy_state_buf = 0;
1008 
1009 }
1010 
1011 /* The contents of this function are C++ specific, so the () macro is not used.
1012  */
1014 {
1015  delete [] yy_state_buf;
1019 }
1020 
1021 /* The contents of this function are C++ specific, so the () macro is not used.
1022  */
1023 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1024 {
1025  if ( new_in )
1026  {
1029  }
1030 
1031  if ( new_out )
1032  yyout = new_out;
1033 }
1034 
1035 #ifdef YY_INTERACTIVE
1036 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1037 #else
1038 int yyFlexLexer::LexerInput( char* buf, int max_size )
1039 #endif
1040 {
1041  if ( yyin->eof() || yyin->fail() )
1042  return 0;
1043 
1044 #ifdef YY_INTERACTIVE
1045  yyin->get( buf[0] );
1046 
1047  if ( yyin->eof() )
1048  return 0;
1049 
1050  if ( yyin->bad() )
1051  return -1;
1052 
1053  return 1;
1054 
1055 #else
1056  (void) yyin->read( buf, max_size );
1057 
1058  if ( yyin->bad() )
1059  return -1;
1060  else
1061  return yyin->gcount();
1062 #endif
1063 }
1064 
1065 void yyFlexLexer::LexerOutput( const char* buf, int size )
1066 {
1067  (void) yyout->write( buf, size );
1068 }
1069 
1070 /* yy_get_next_buffer - try to read in a new buffer
1071  *
1072  * Returns a code representing an action:
1073  * EOB_ACT_LAST_MATCH -
1074  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1075  * EOB_ACT_END_OF_FILE - end of file
1076  */
1078 {
1079  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1080  register char *source = (yytext_ptr);
1081  register int number_to_move, i;
1082  int ret_val;
1083 
1084  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1086  "fatal flex scanner internal error--end of buffer missed" );
1087 
1088  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1089  { /* Don't try to fill the buffer, so this is an EOF. */
1090  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1091  {
1092  /* We matched a single character, the EOB, so
1093  * treat this as a final EOF.
1094  */
1095  return EOB_ACT_END_OF_FILE;
1096  }
1097 
1098  else
1099  {
1100  /* We matched some text prior to the EOB, first
1101  * process it.
1102  */
1103  return EOB_ACT_LAST_MATCH;
1104  }
1105  }
1106 
1107  /* Try to read more data. */
1108 
1109  /* First move last chars to start of buffer. */
1110  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1111 
1112  for ( i = 0; i < number_to_move; ++i )
1113  *(dest++) = *(source++);
1114 
1115  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1116  /* don't do the read, it's not guaranteed to return an EOF,
1117  * just force an EOF
1118  */
1119  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1120 
1121  else
1122  {
1123  int num_to_read =
1124  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1125 
1126  while ( num_to_read <= 0 )
1127  { /* Not enough room in the buffer - grow it. */
1128 
1129  /* just a shorter name for the current buffer */
1130  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1131 
1132  int yy_c_buf_p_offset =
1133  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1134 
1135  if ( b->yy_is_our_buffer )
1136  {
1137  int new_size = b->yy_buf_size * 2;
1138 
1139  if ( new_size <= 0 )
1140  b->yy_buf_size += b->yy_buf_size / 8;
1141  else
1142  b->yy_buf_size *= 2;
1143 
1144  b->yy_ch_buf = (char *)
1145  /* Include room in for 2 EOB chars. */
1146  space_constitution_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1147  }
1148  else
1149  /* Can't grow it, we don't own it. */
1150  b->yy_ch_buf = 0;
1151 
1152  if ( ! b->yy_ch_buf )
1154  "fatal error - scanner input buffer overflow" );
1155 
1156  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1157 
1158  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1159  number_to_move - 1;
1160 
1161  }
1162 
1163  if ( num_to_read > YY_READ_BUF_SIZE )
1164  num_to_read = YY_READ_BUF_SIZE;
1165 
1166  /* Read in more data. */
1167  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1168  (yy_n_chars), (size_t) num_to_read );
1169 
1170  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1171  }
1172 
1173  if ( (yy_n_chars) == 0 )
1174  {
1175  if ( number_to_move == YY_MORE_ADJ )
1176  {
1177  ret_val = EOB_ACT_END_OF_FILE;
1178  yyrestart( yyin );
1179  }
1180 
1181  else
1182  {
1183  ret_val = EOB_ACT_LAST_MATCH;
1184  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1186  }
1187  }
1188 
1189  else
1190  ret_val = EOB_ACT_CONTINUE_SCAN;
1191 
1192  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1193  /* Extend the array by 50%, plus the number we really need. */
1194  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1195  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) space_constitution_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1196  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1197  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1198  }
1199 
1200  (yy_n_chars) += number_to_move;
1203 
1204  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1205 
1206  return ret_val;
1207 }
1208 
1209 /* yy_get_previous_state - get the state just before the EOB char was reached */
1210 
1212 {
1214  register char *yy_cp;
1215 
1216  yy_current_state = (yy_start);
1217 
1218  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1219  {
1220  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1221  if ( yy_accept[yy_current_state] )
1222  {
1223  (yy_last_accepting_state) = yy_current_state;
1224  (yy_last_accepting_cpos) = yy_cp;
1225  }
1226  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1227  {
1228  yy_current_state = (int) yy_def[yy_current_state];
1229  if ( yy_current_state >= 49 )
1230  yy_c = yy_meta[(unsigned int) yy_c];
1231  }
1232  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1233  }
1234 
1235  return yy_current_state;
1236 }
1237 
1238 /* yy_try_NUL_trans - try to make a transition on the NUL character
1239  *
1240  * synopsis
1241  * next_state = yy_try_NUL_trans( current_state );
1242  */
1244 {
1245  register int yy_is_jam;
1246  register char *yy_cp = (yy_c_buf_p);
1247 
1248  register YY_CHAR yy_c = 1;
1249  if ( yy_accept[yy_current_state] )
1250  {
1251  (yy_last_accepting_state) = yy_current_state;
1252  (yy_last_accepting_cpos) = yy_cp;
1253  }
1254  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1255  {
1256  yy_current_state = (int) yy_def[yy_current_state];
1257  if ( yy_current_state >= 49 )
1258  yy_c = yy_meta[(unsigned int) yy_c];
1259  }
1260  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1261  yy_is_jam = (yy_current_state == 48);
1262 
1263  return yy_is_jam ? 0 : yy_current_state;
1264 }
1265 
1266  void yyFlexLexer::yyunput( int c, register char* yy_bp)
1267 {
1268  register char *yy_cp;
1269 
1270  yy_cp = (yy_c_buf_p);
1271 
1272  /* undo effects of setting up yytext */
1273  *yy_cp = (yy_hold_char);
1274 
1275  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1276  { /* need to shift things up to make room */
1277  /* +2 for EOB chars. */
1278  register int number_to_move = (yy_n_chars) + 2;
1279  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1280  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1281  register char *source =
1282  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1283 
1284  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1285  *--dest = *--source;
1286 
1287  yy_cp += (int) (dest - source);
1288  yy_bp += (int) (dest - source);
1289  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1290  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1291 
1292  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1293  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1294  }
1295 
1296  *--yy_cp = (char) c;
1297 
1298  (yytext_ptr) = yy_bp;
1299  (yy_hold_char) = *yy_cp;
1300  (yy_c_buf_p) = yy_cp;
1301 }
1302 
1304 {
1305  int c;
1306 
1307  *(yy_c_buf_p) = (yy_hold_char);
1308 
1309  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1310  {
1311  /* yy_c_buf_p now points to the character we want to return.
1312  * If this occurs *before* the EOB characters, then it's a
1313  * valid NUL; if not, then we've hit the end of the buffer.
1314  */
1315  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1316  /* This was really a NUL. */
1317  *(yy_c_buf_p) = '\0';
1318 
1319  else
1320  { /* need more input */
1321  int offset = (yy_c_buf_p) - (yytext_ptr);
1322  ++(yy_c_buf_p);
1323 
1324  switch ( yy_get_next_buffer( ) )
1325  {
1326  case EOB_ACT_LAST_MATCH:
1327  /* This happens because yy_g_n_b()
1328  * sees that we've accumulated a
1329  * token and flags that we need to
1330  * try matching the token before
1331  * proceeding. But for input(),
1332  * there's no matching to consider.
1333  * So convert the EOB_ACT_LAST_MATCH
1334  * to EOB_ACT_END_OF_FILE.
1335  */
1336 
1337  /* Reset buffer status. */
1338  yyrestart( yyin );
1339 
1340  /*FALLTHROUGH*/
1341 
1342  case EOB_ACT_END_OF_FILE:
1343  {
1344  if ( yywrap( ) )
1345  return EOF;
1346 
1347  if ( ! (yy_did_buffer_switch_on_eof) )
1348  YY_NEW_FILE;
1349 #ifdef __cplusplus
1350  return yyinput();
1351 #else
1352  return input();
1353 #endif
1354  }
1355 
1356  case EOB_ACT_CONTINUE_SCAN:
1357  (yy_c_buf_p) = (yytext_ptr) + offset;
1358  break;
1359  }
1360  }
1361  }
1362 
1363  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1364  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1365  (yy_hold_char) = *++(yy_c_buf_p);
1366 
1367  return c;
1368 }
1369 
1375  void yyFlexLexer::yyrestart( std::istream* input_file )
1376 {
1377 
1378  if ( ! YY_CURRENT_BUFFER ){
1382  }
1383 
1384  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1386 }
1387 
1392  void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1393 {
1394 
1395  /* TODO. We should be able to replace this entire function body
1396  * with
1397  * yypop_buffer_state();
1398  * yypush_buffer_state(new_buffer);
1399  */
1401  if ( YY_CURRENT_BUFFER == new_buffer )
1402  return;
1403 
1404  if ( YY_CURRENT_BUFFER )
1405  {
1406  /* Flush out information for old buffer. */
1407  *(yy_c_buf_p) = (yy_hold_char);
1408  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1409  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1410  }
1411 
1412  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1414 
1415  /* We don't actually know whether we did this switch during
1416  * EOF (yywrap()) processing, but the only time this flag
1417  * is looked at is after yywrap() is called, so it's safe
1418  * to go ahead and always set it.
1419  */
1421 }
1422 
1424 {
1425  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1426  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1427  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1428  (yy_hold_char) = *(yy_c_buf_p);
1429 }
1430 
1437  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1438 {
1439  YY_BUFFER_STATE b;
1440 
1441  b = (YY_BUFFER_STATE) space_constitution_alloc(sizeof( struct yy_buffer_state ) );
1442  if ( ! b )
1443  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1444 
1445  b->yy_buf_size = size;
1446 
1447  /* yy_ch_buf has to be 2 characters longer than the size given because
1448  * we need to put in 2 end-of-buffer characters.
1449  */
1450  b->yy_ch_buf = (char *) space_constitution_alloc(b->yy_buf_size + 2 );
1451  if ( ! b->yy_ch_buf )
1452  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1453 
1454  b->yy_is_our_buffer = 1;
1455 
1456  yy_init_buffer( b, file );
1457 
1458  return b;
1459 }
1460 
1465  void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1466 {
1467 
1468  if ( ! b )
1469  return;
1470 
1471  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1473 
1474  if ( b->yy_is_our_buffer )
1475  space_constitution_free((void *) b->yy_ch_buf );
1476 
1477  space_constitution_free((void *) b );
1478 }
1479 
1480 extern "C" int isatty (int );
1481 
1482 /* Initializes or reinitializes a buffer.
1483  * This function is sometimes called more than once on the same buffer,
1484  * such as during a yyrestart() or at EOF.
1485  */
1486  void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1487 
1488 {
1489  int oerrno = errno;
1490 
1491  yy_flush_buffer( b );
1492 
1493  b->yy_input_file = file;
1494  b->yy_fill_buffer = 1;
1495 
1496  /* If b is the current buffer, then yy_init_buffer was _probably_
1497  * called from yyrestart() or through yy_get_next_buffer.
1498  * In that case, we don't want to reset the lineno or column.
1499  */
1500  if (b != YY_CURRENT_BUFFER){
1501  b->yy_bs_lineno = 1;
1502  b->yy_bs_column = 0;
1503  }
1504 
1505  b->yy_is_interactive = 0;
1506  errno = oerrno;
1507 }
1508 
1513  void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1514 {
1515  if ( ! b )
1516  return;
1517 
1518  b->yy_n_chars = 0;
1519 
1520  /* We always need two end-of-buffer characters. The first causes
1521  * a transition to the end-of-buffer state. The second causes
1522  * a jam in that state.
1523  */
1526 
1527  b->yy_buf_pos = &b->yy_ch_buf[0];
1528 
1529  b->yy_at_bol = 1;
1531 
1532  if ( b == YY_CURRENT_BUFFER )
1534 }
1535 
1542 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1543 {
1544  if (new_buffer == NULL)
1545  return;
1546 
1548 
1549  /* This block is copied from yy_switch_to_buffer. */
1550  if ( YY_CURRENT_BUFFER )
1551  {
1552  /* Flush out information for old buffer. */
1553  *(yy_c_buf_p) = (yy_hold_char);
1554  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1555  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1556  }
1557 
1558  /* Only push if top exists. Otherwise, replace top. */
1559  if (YY_CURRENT_BUFFER)
1560  (yy_buffer_stack_top)++;
1561  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1562 
1563  /* copied from yy_switch_to_buffer. */
1566 }
1567 
1573 {
1574  if (!YY_CURRENT_BUFFER)
1575  return;
1576 
1578  YY_CURRENT_BUFFER_LVALUE = NULL;
1579  if ((yy_buffer_stack_top) > 0)
1580  --(yy_buffer_stack_top);
1581 
1582  if (YY_CURRENT_BUFFER) {
1585  }
1586 }
1587 
1588 /* Allocates the stack if it does not exist.
1589  * Guarantees space for at least one push.
1590  */
1592 {
1593  int num_to_alloc;
1594 
1595  if (!(yy_buffer_stack)) {
1596 
1597  /* First allocation is just for 2 elements, since we don't know if this
1598  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1599  * immediate realloc on the next call.
1600  */
1601  num_to_alloc = 1;
1603  (num_to_alloc * sizeof(struct yy_buffer_state*)
1604  );
1605  if ( ! (yy_buffer_stack) )
1606  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1607 
1608  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1609 
1610  (yy_buffer_stack_max) = num_to_alloc;
1611  (yy_buffer_stack_top) = 0;
1612  return;
1613  }
1614 
1615  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1616 
1617  /* Increase the buffer to prepare for a possible push. */
1618  int grow_size = 8 /* arbitrary grow size */;
1619 
1620  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1622  ((yy_buffer_stack),
1623  num_to_alloc * sizeof(struct yy_buffer_state*)
1624  );
1625  if ( ! (yy_buffer_stack) )
1626  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1627 
1628  /* zero only the new slots.*/
1629  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1630  (yy_buffer_stack_max) = num_to_alloc;
1631  }
1632 }
1633 
1634  void yyFlexLexer::yy_push_state( int new_state )
1635 {
1637  {
1638  yy_size_t new_size;
1639 
1641  new_size = (yy_start_stack_depth) * sizeof( int );
1642 
1643  if ( ! (yy_start_stack) )
1644  (yy_start_stack) = (int *) space_constitution_alloc(new_size );
1645 
1646  else
1647  (yy_start_stack) = (int *) space_constitution_realloc((void *) (yy_start_stack),new_size );
1648 
1649  if ( ! (yy_start_stack) )
1650  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
1651  }
1652 
1654 
1655  BEGIN(new_state);
1656 }
1657 
1659 {
1660  if ( --(yy_start_stack_ptr) < 0 )
1661  YY_FATAL_ERROR( "start-condition stack underflow" );
1662 
1664 }
1665 
1667 {
1668  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
1669 }
1670 
1671 #ifndef YY_EXIT_FAILURE
1672 #define YY_EXIT_FAILURE 2
1673 #endif
1674 
1675 void yyFlexLexer::LexerError( yyconst char msg[] )
1676 {
1677  std::cerr << msg << std::endl;
1678  exit( YY_EXIT_FAILURE );
1679 }
1680 
1681 /* Redefine yyless() so it works in section 3 code. */
1682 
1683 #undef yyless
1684 #define yyless(n) \
1685  do \
1686  { \
1687  /* Undo effects of setting up yytext. */ \
1688  int yyless_macro_arg = (n); \
1689  YY_LESS_LINENO(yyless_macro_arg);\
1690  yytext[yyleng] = (yy_hold_char); \
1691  (yy_c_buf_p) = yytext + yyless_macro_arg; \
1692  (yy_hold_char) = *(yy_c_buf_p); \
1693  *(yy_c_buf_p) = '\0'; \
1694  yyleng = yyless_macro_arg; \
1695  } \
1696  while ( 0 )
1697 
1698 /* Accessor methods (get/set functions) to struct members. */
1699 
1700 /*
1701  * Internal utility routines.
1702  */
1703 
1704 #ifndef yytext_ptr
1705 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1706 {
1707  register int i;
1708  for ( i = 0; i < n; ++i )
1709  s1[i] = s2[i];
1710 }
1711 #endif
1712 
1713 #ifdef YY_NEED_STRLEN
1714 static int yy_flex_strlen (yyconst char * s )
1715 {
1716  register int n;
1717  for ( n = 0; s[n]; ++n )
1718  ;
1719 
1720  return n;
1721 }
1722 #endif
1723 
1725 {
1726  return (void *) malloc( size );
1727 }
1728 
1729 void *space_constitution_realloc (void * ptr, yy_size_t size )
1730 {
1731  /* The cast to (char *) in the following accommodates both
1732  * implementations that use char* generic pointers, and those
1733  * that use void* generic pointers. It works with the latter
1734  * because both ANSI C and C++ allow castless assignment from
1735  * any pointer type to void*, and deal with argument conversions
1736  * as though doing an assignment.
1737  */
1738  return (void *) realloc( (char *) ptr, size );
1739 }
1740 
1741 void space_constitution_free (void * ptr )
1742 {
1743  free( (char *) ptr ); /* see space_constitution_realloc() for (char *) cast */
1744 }
1745 
1746 #define YYTABLES_NAME "yytables"
1747 
1748 #line 39 "space_constitution_lex.flex"
1749 
1750 
1751 
1752 
1753