home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / unofficial-plug-ins / mathmap / scanner.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-26  |  41.2 KB  |  1,675 lines

  1. #define yy_create_buffer mm_create_buffer
  2. #define yy_delete_buffer mm_delete_buffer
  3. #define yy_scan_buffer mm_scan_buffer
  4. #define yy_scan_string mm_scan_string
  5. #define yy_scan_bytes mm_scan_bytes
  6. #define yy_flex_debug mm_flex_debug
  7. #define yy_init_buffer mm_init_buffer
  8. #define yy_flush_buffer mm_flush_buffer
  9. #define yy_load_buffer_state mm_load_buffer_state
  10. #define yy_switch_to_buffer mm_switch_to_buffer
  11. #define yyin mmin
  12. #define yyleng mmleng
  13. #define yylex mmlex
  14. #define yyout mmout
  15. #define yyrestart mmrestart
  16. #define yytext mmtext
  17.  
  18. /* A lexical scanner generated by flex */
  19.  
  20. /* Scanner skeleton version:
  21.  * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $
  22.  */
  23.  
  24. #define FLEX_SCANNER
  25. #define YY_FLEX_MAJOR_VERSION 2
  26. #define YY_FLEX_MINOR_VERSION 5
  27.  
  28. #include <stdio.h>
  29.  
  30.  
  31. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  32. #ifdef c_plusplus
  33. #ifndef __cplusplus
  34. #define __cplusplus
  35. #endif
  36. #endif
  37.  
  38.  
  39. #ifdef __cplusplus
  40.  
  41. #include <stdlib.h>
  42. #include <unistd.h>
  43.  
  44. /* Use prototypes in function declarations. */
  45. #define YY_USE_PROTOS
  46.  
  47. /* The "const" storage-class-modifier is valid. */
  48. #define YY_USE_CONST
  49.  
  50. #else    /* ! __cplusplus */
  51.  
  52. #if __STDC__
  53.  
  54. #define YY_USE_PROTOS
  55. #define YY_USE_CONST
  56.  
  57. #endif    /* __STDC__ */
  58. #endif    /* ! __cplusplus */
  59.  
  60. #ifdef __TURBOC__
  61.  #pragma warn -rch
  62.  #pragma warn -use
  63. #include <io.h>
  64. #include <stdlib.h>
  65. #define YY_USE_CONST
  66. #define YY_USE_PROTOS
  67. #endif
  68.  
  69. #ifdef YY_USE_CONST
  70. #define yyconst const
  71. #else
  72. #define yyconst
  73. #endif
  74.  
  75.  
  76. #ifdef YY_USE_PROTOS
  77. #define YY_PROTO(proto) proto
  78. #else
  79. #define YY_PROTO(proto) ()
  80. #endif
  81.  
  82. /* Returned upon end-of-file. */
  83. #define YY_NULL 0
  84.  
  85. /* Promotes a possibly negative, possibly signed char to an unsigned
  86.  * integer for use as an array index.  If the signed char is negative,
  87.  * we want to instead treat it as an 8-bit unsigned char, hence the
  88.  * double cast.
  89.  */
  90. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  91.  
  92. /* Enter a start condition.  This macro really ought to take a parameter,
  93.  * but we do it the disgusting crufty way forced on us by the ()-less
  94.  * definition of BEGIN.
  95.  */
  96. #define BEGIN yy_start = 1 + 2 *
  97.  
  98. /* Translate the current start state into a value that can be later handed
  99.  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  100.  * compatibility.
  101.  */
  102. #define YY_START ((yy_start - 1) / 2)
  103. #define YYSTATE YY_START
  104.  
  105. /* Action number for EOF rule of a given start state. */
  106. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  107.  
  108. /* Special action meaning "start processing a new file". */
  109. #define YY_NEW_FILE yyrestart( yyin )
  110.  
  111. #define YY_END_OF_BUFFER_CHAR 0
  112.  
  113. /* Size of default input buffer. */
  114. #define YY_BUF_SIZE 16384
  115.  
  116. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  117.  
  118. extern int yyleng;
  119. extern FILE *yyin, *yyout;
  120.  
  121. #define EOB_ACT_CONTINUE_SCAN 0
  122. #define EOB_ACT_END_OF_FILE 1
  123. #define EOB_ACT_LAST_MATCH 2
  124.  
  125. /* The funky do-while in the following #define is used to turn the definition
  126.  * int a single C statement (which needs a semi-colon terminator).  This
  127.  * avoids problems with code like:
  128.  *
  129.  *     if ( condition_holds )
  130.  *        yyless( 5 );
  131.  *    else
  132.  *        do_something_else();
  133.  *
  134.  * Prior to using the do-while the compiler would get upset at the
  135.  * "else" because it interpreted the "if" statement as being all
  136.  * done when it reached the ';' after the yyless() call.
  137.  */
  138.  
  139. /* Return all but the first 'n' matched characters back to the input stream. */
  140.  
  141. #define yyless(n) \
  142.     do \
  143.         { \
  144.         /* Undo effects of setting up yytext. */ \
  145.         *yy_cp = yy_hold_char; \
  146.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  147.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  148.         } \
  149.     while ( 0 )
  150.  
  151. #define unput(c) yyunput( c, yytext_ptr )
  152.  
  153. /* The following is because we cannot portably get our hands on size_t
  154.  * (without autoconf's help, which isn't available because we want
  155.  * flex-generated scanners to compile on their own).
  156.  */
  157. typedef unsigned int yy_size_t;
  158.  
  159.  
  160. struct yy_buffer_state
  161.     {
  162.     FILE *yy_input_file;
  163.  
  164.     char *yy_ch_buf;        /* input buffer */
  165.     char *yy_buf_pos;        /* current position in input buffer */
  166.  
  167.     /* Size of input buffer in bytes, not including room for EOB
  168.      * characters.
  169.      */
  170.     yy_size_t yy_buf_size;
  171.  
  172.     /* Number of characters read into yy_ch_buf, not including EOB
  173.      * characters.
  174.      */
  175.     int yy_n_chars;
  176.  
  177.     /* Whether we "own" the buffer - i.e., we know we created it,
  178.      * and can realloc() it to grow it, and should free() it to
  179.      * delete it.
  180.      */
  181.     int yy_is_our_buffer;
  182.  
  183.     /* Whether this is an "interactive" input source; if so, and
  184.      * if we're using stdio for input, then we want to use getc()
  185.      * instead of fread(), to make sure we stop fetching input after
  186.      * each newline.
  187.      */
  188.     int yy_is_interactive;
  189.  
  190.     /* Whether we're considered to be at the beginning of a line.
  191.      * If so, '^' rules will be active on the next match, otherwise
  192.      * not.
  193.      */
  194.     int yy_at_bol;
  195.  
  196.     /* Whether to try to fill the input buffer when we reach the
  197.      * end of it.
  198.      */
  199.     int yy_fill_buffer;
  200.  
  201.     int yy_buffer_status;
  202. #define YY_BUFFER_NEW 0
  203. #define YY_BUFFER_NORMAL 1
  204.     /* When an EOF's been seen but there's still some text to process
  205.      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  206.      * shouldn't try reading from the input source any more.  We might
  207.      * still have a bunch of tokens to match, though, because of
  208.      * possible backing-up.
  209.      *
  210.      * When we actually see the EOF, we change the status to "new"
  211.      * (via yyrestart()), so that the user can continue scanning by
  212.      * just pointing yyin at a new input file.
  213.      */
  214. #define YY_BUFFER_EOF_PENDING 2
  215.     };
  216.  
  217. static YY_BUFFER_STATE yy_current_buffer = 0;
  218.  
  219. /* We provide macros for accessing buffer states in case in the
  220.  * future we want to put the buffer states in a more general
  221.  * "scanner state".
  222.  */
  223. #define YY_CURRENT_BUFFER yy_current_buffer
  224.  
  225.  
  226. /* yy_hold_char holds the character lost when yytext is formed. */
  227. static char yy_hold_char;
  228.  
  229. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  230.  
  231.  
  232. int yyleng;
  233.  
  234. /* Points to current character in buffer. */
  235. static char *yy_c_buf_p = (char *) 0;
  236. static int yy_init = 1;        /* whether we need to initialize */
  237. static int yy_start = 0;    /* start state number */
  238.  
  239. /* Flag which is used to allow yywrap()'s to do buffer switches
  240.  * instead of setting up a fresh yyin.  A bit of a hack ...
  241.  */
  242. static int yy_did_buffer_switch_on_eof;
  243.  
  244. void yyrestart YY_PROTO(( FILE *input_file ));
  245.  
  246. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  247. void yy_load_buffer_state YY_PROTO(( void ));
  248. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  249. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  250. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  251. void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  252. #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
  253.  
  254. YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
  255. YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
  256. YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
  257.  
  258. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  259. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  260. static void yy_flex_free YY_PROTO(( void * ));
  261.  
  262. #define yy_new_buffer yy_create_buffer
  263.  
  264. #define yy_set_interactive(is_interactive) \
  265.     { \
  266.     if ( ! yy_current_buffer ) \
  267.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  268.     yy_current_buffer->yy_is_interactive = is_interactive; \
  269.     }
  270.  
  271. #define yy_set_bol(at_bol) \
  272.     { \
  273.     if ( ! yy_current_buffer ) \
  274.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  275.     yy_current_buffer->yy_at_bol = at_bol; \
  276.     }
  277.  
  278. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  279.  
  280.  
  281. #define yywrap() 1
  282. #define YY_SKIP_YYWRAP
  283. typedef unsigned char YY_CHAR;
  284. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  285. typedef int yy_state_type;
  286. extern char *yytext;
  287. #define yytext_ptr yytext
  288.  
  289. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  290. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  291. static int yy_get_next_buffer YY_PROTO(( void ));
  292. static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
  293.  
  294. /* Done after the current pattern has been matched and before the
  295.  * corresponding action - sets up yytext.
  296.  */
  297. #define YY_DO_BEFORE_ACTION \
  298.     yytext_ptr = yy_bp; \
  299.     yyleng = (int) (yy_cp - yy_bp); \
  300.     yy_hold_char = *yy_cp; \
  301.     *yy_cp = '\0'; \
  302.     yy_c_buf_p = yy_cp;
  303.  
  304. #define YY_NUM_RULES 22
  305. #define YY_END_OF_BUFFER 23
  306. static yyconst short int yy_accept[54] =
  307.     {   0,
  308.         0,    0,   23,   22,   21,   19,   22,   20,   19,   22,
  309.        22,    9,   19,   19,   19,   19,    7,    7,    7,    7,
  310.         7,    7,   22,   14,    0,    8,   20,   16,   18,   10,
  311.         0,    9,   17,   12,   11,   13,    7,    6,    7,    7,
  312.         1,    7,    7,   15,    7,    4,    7,    7,    3,    2,
  313.         7,    5,    0
  314.     } ;
  315.  
  316. static yyconst int yy_ec[256] =
  317.     {   0,
  318.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  319.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  320.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  321.         1,    2,    4,    5,    6,    1,    7,    8,    1,    7,
  322.         7,    7,    7,    7,    7,    9,    7,   10,   10,   10,
  323.        10,   10,   10,   10,   10,   10,   10,   11,    7,   12,
  324.        13,   14,    1,    1,   15,   15,   15,   15,   15,   15,
  325.        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
  326.        15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
  327.         7,    1,    7,    7,   15,    1,   15,   15,   15,   16,
  328.  
  329.        17,   18,   15,   19,   20,   15,   15,   21,   15,   22,
  330.        23,   15,   15,   15,   24,   25,   15,   15,   26,   15,
  331.        15,   15,    1,   27,    1,    1,    1,    1,    1,    1,
  332.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  333.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  334.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  335.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  336.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  337.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  338.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  339.  
  340.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  341.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  342.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  343.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  344.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  345.         1,    1,    1,    1,    1
  346.     } ;
  347.  
  348. static yyconst int yy_meta[28] =
  349.     {   0,
  350.         1,    1,    2,    1,    1,    1,    1,    1,    1,    3,
  351.         1,    1,    1,    1,    3,    3,    3,    3,    3,    3,
  352.         3,    3,    3,    3,    3,    3,    1
  353.     } ;
  354.  
  355. static yyconst short int yy_base[57] =
  356.     {   0,
  357.         0,    0,   64,   65,   65,   50,   57,    0,   65,   53,
  358.        19,   21,   49,   46,   45,   44,    0,   33,   11,   37,
  359.        35,   34,   25,   65,   46,   65,    0,   65,   65,   40,
  360.        39,   25,   65,   65,   65,   65,    0,    0,   24,   31,
  361.         0,   29,   25,   65,   27,    0,   21,   21,    0,    0,
  362.        23,    0,   65,   35,   38,   34
  363.     } ;
  364.  
  365. static yyconst short int yy_def[57] =
  366.     {   0,
  367.        53,    1,   53,   53,   53,   53,   54,   55,   53,   53,
  368.        53,   53,   53,   53,   53,   53,   56,   56,   56,   56,
  369.        56,   56,   53,   53,   54,   53,   55,   53,   53,   53,
  370.        53,   53,   53,   53,   53,   53,   56,   56,   56,   56,
  371.        56,   56,   56,   53,   56,   56,   56,   56,   56,   56,
  372.        56,   56,    0,   53,   53,   53
  373.     } ;
  374.  
  375. static yyconst short int yy_nxt[93] =
  376.     {   0,
  377.         4,    5,    5,    6,    7,    8,    9,   10,   11,   12,
  378.        13,   14,   15,   16,   17,   18,   19,   17,   17,   20,
  379.        17,   17,   17,   17,   21,   22,   23,   29,   30,   31,
  380.        32,   39,   40,   31,   32,   25,   37,   25,   27,   52,
  381.        27,   51,   50,   49,   48,   47,   46,   45,   30,   30,
  382.        26,   44,   43,   42,   41,   38,   36,   35,   34,   33,
  383.        28,   26,   24,   53,    3,   53,   53,   53,   53,   53,
  384.        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
  385.        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
  386.        53,   53
  387.  
  388.     } ;
  389.  
  390. static yyconst short int yy_chk[93] =
  391.     {   0,
  392.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  393.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  394.         1,    1,    1,    1,    1,    1,    1,   11,   11,   12,
  395.        12,   19,   19,   32,   32,   54,   56,   54,   55,   51,
  396.        55,   48,   47,   45,   43,   42,   40,   39,   31,   30,
  397.        25,   23,   22,   21,   20,   18,   16,   15,   14,   13,
  398.        10,    7,    6,    3,   53,   53,   53,   53,   53,   53,
  399.        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
  400.        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
  401.        53,   53
  402.  
  403.     } ;
  404.  
  405. static yy_state_type yy_last_accepting_state;
  406. static char *yy_last_accepting_cpos;
  407.  
  408. /* The intent behind this definition is that it'll catch
  409.  * any uses of REJECT which flex missed.
  410.  */
  411. #define REJECT reject_used_but_not_detected
  412. #define yymore() yymore_used_but_not_detected
  413. #define YY_MORE_ADJ 0
  414. char *yytext;
  415. #line 1 "scanner.fl"
  416. #define INITIAL 0
  417. /*
  418.  * scanner.fl
  419.  *
  420.  * MathMap
  421.  *
  422.  * Copyright (C) 1997-2000 Mark Probst
  423.  *
  424.  * This program is free software; you can redistribute it and/or
  425.  * modify it under the terms of the GNU General Public License
  426.  * as published by the Free Software Foundation; either version 2
  427.  * of the License, or (at your option) any later version.
  428.  *
  429.  * This program is distributed in the hope that it will be useful,
  430.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  431.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  432.  * GNU General Public License for more details.
  433.  *
  434.  * You should have received a copy of the GNU General Public License
  435.  * along with this program; if not, write to the Free Software
  436.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  437.  */
  438. #line 24 "scanner.fl"
  439. #include <string.h>
  440.  
  441. #include "exprtree.h"
  442. #include "builtins.h"
  443. #include "parser.h"
  444. #line 445 "lex.mm.c"
  445.  
  446. /* Macros after this point can all be overridden by user definitions in
  447.  * section 1.
  448.  */
  449.  
  450. #ifndef YY_SKIP_YYWRAP
  451. #ifdef __cplusplus
  452. extern "C" int yywrap YY_PROTO(( void ));
  453. #else
  454. extern int yywrap YY_PROTO(( void ));
  455. #endif
  456. #endif
  457.  
  458. #ifndef YY_NO_UNPUT
  459. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  460. #endif
  461.  
  462. #ifndef yytext_ptr
  463. static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
  464. #endif
  465.  
  466. #ifndef YY_NO_INPUT
  467. #ifdef __cplusplus
  468. static int yyinput YY_PROTO(( void ));
  469. #else
  470. static int input YY_PROTO(( void ));
  471. #endif
  472. #endif
  473.  
  474. #if YY_STACK_USED
  475. static int yy_start_stack_ptr = 0;
  476. static int yy_start_stack_depth = 0;
  477. static int *yy_start_stack = 0;
  478. #ifndef YY_NO_PUSH_STATE
  479. static void yy_push_state YY_PROTO(( int new_state ));
  480. #endif
  481. #ifndef YY_NO_POP_STATE
  482. static void yy_pop_state YY_PROTO(( void ));
  483. #endif
  484. #ifndef YY_NO_TOP_STATE
  485. static int yy_top_state YY_PROTO(( void ));
  486. #endif
  487.  
  488. #else
  489. #define YY_NO_PUSH_STATE 1
  490. #define YY_NO_POP_STATE 1
  491. #define YY_NO_TOP_STATE 1
  492. #endif
  493.  
  494. #ifdef YY_MALLOC_DECL
  495. YY_MALLOC_DECL
  496. #else
  497. #if __STDC__
  498. #ifndef __cplusplus
  499. #include <stdlib.h>
  500. #endif
  501. #else
  502. /* Just try to get by without declaring the routines.  This will fail
  503.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  504.  * or sizeof(void*) != sizeof(int).
  505.  */
  506. #endif
  507. #endif
  508.  
  509. /* Amount of stuff to slurp up with each read. */
  510. #ifndef YY_READ_BUF_SIZE
  511. #define YY_READ_BUF_SIZE 8192
  512. #endif
  513.  
  514. /* Copy whatever the last rule matched to the standard output. */
  515.  
  516. #ifndef ECHO
  517. /* This used to be an fputs(), but since the string might contain NUL's,
  518.  * we now use fwrite().
  519.  */
  520. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  521. #endif
  522.  
  523. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  524.  * is returned in "result".
  525.  */
  526. #ifndef YY_INPUT
  527. #define YY_INPUT(buf,result,max_size) \
  528.     if ( yy_current_buffer->yy_is_interactive ) \
  529.         { \
  530.         int c = '*', n; \
  531.         for ( n = 0; n < max_size && \
  532.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  533.             buf[n] = (char) c; \
  534.         if ( c == '\n' ) \
  535.             buf[n++] = (char) c; \
  536.         if ( c == EOF && ferror( yyin ) ) \
  537.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  538.         result = n; \
  539.         } \
  540.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  541.           && ferror( yyin ) ) \
  542.         YY_FATAL_ERROR( "input in flex scanner failed" );
  543. #endif
  544.  
  545. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  546.  * we don't want an extra ';' after the "return" because that will cause
  547.  * some compilers to complain about unreachable statements.
  548.  */
  549. #ifndef yyterminate
  550. #define yyterminate() return YY_NULL
  551. #endif
  552.  
  553. /* Number of entries by which start-condition stack grows. */
  554. #ifndef YY_START_STACK_INCR
  555. #define YY_START_STACK_INCR 25
  556. #endif
  557.  
  558. /* Report a fatal error. */
  559. #ifndef YY_FATAL_ERROR
  560. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  561. #endif
  562.  
  563. /* Default declaration of generated scanner - a define so the user can
  564.  * easily add parameters.
  565.  */
  566. #ifndef YY_DECL
  567. #define YY_DECL int yylex YY_PROTO(( void ))
  568. #endif
  569.  
  570. /* Code executed at the beginning of each rule, after yytext and yyleng
  571.  * have been set up.
  572.  */
  573. #ifndef YY_USER_ACTION
  574. #define YY_USER_ACTION
  575. #endif
  576.  
  577. /* Code executed at the end of each rule. */
  578. #ifndef YY_BREAK
  579. #define YY_BREAK break;
  580. #endif
  581.  
  582. #define YY_RULE_SETUP \
  583.     YY_USER_ACTION
  584.  
  585. YY_DECL
  586.     {
  587.     register yy_state_type yy_current_state;
  588.     register char *yy_cp, *yy_bp;
  589.     register int yy_act;
  590.  
  591. #line 33 "scanner.fl"
  592.  
  593.  
  594. #line 595 "lex.mm.c"
  595.  
  596.     if ( yy_init )
  597.         {
  598.         yy_init = 0;
  599.  
  600. #ifdef YY_USER_INIT
  601.         YY_USER_INIT;
  602. #endif
  603.  
  604.         if ( ! yy_start )
  605.             yy_start = 1;    /* first start state */
  606.  
  607.         if ( ! yyin )
  608.             yyin = stdin;
  609.  
  610.         if ( ! yyout )
  611.             yyout = stdout;
  612.  
  613.         if ( ! yy_current_buffer )
  614.             yy_current_buffer =
  615.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  616.  
  617.         yy_load_buffer_state();
  618.         }
  619.  
  620.     while ( 1 )        /* loops until end-of-file is reached */
  621.         {
  622.         yy_cp = yy_c_buf_p;
  623.  
  624.         /* Support of yytext. */
  625.         *yy_cp = yy_hold_char;
  626.  
  627.         /* yy_bp points to the position in yy_ch_buf of the start of
  628.          * the current run.
  629.          */
  630.         yy_bp = yy_cp;
  631.  
  632.         yy_current_state = yy_start;
  633. yy_match:
  634.         do
  635.             {
  636.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  637.             if ( yy_accept[yy_current_state] )
  638.                 {
  639.                 yy_last_accepting_state = yy_current_state;
  640.                 yy_last_accepting_cpos = yy_cp;
  641.                 }
  642.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  643.                 {
  644.                 yy_current_state = (int) yy_def[yy_current_state];
  645.                 if ( yy_current_state >= 54 )
  646.                     yy_c = yy_meta[(unsigned int) yy_c];
  647.                 }
  648.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  649.             ++yy_cp;
  650.             }
  651.         while ( yy_base[yy_current_state] != 65 );
  652.  
  653. yy_find_action:
  654.         yy_act = yy_accept[yy_current_state];
  655.         if ( yy_act == 0 )
  656.             { /* have to back up */
  657.             yy_cp = yy_last_accepting_cpos;
  658.             yy_current_state = yy_last_accepting_state;
  659.             yy_act = yy_accept[yy_current_state];
  660.             }
  661.  
  662.         YY_DO_BEFORE_ACTION;
  663.  
  664.  
  665. do_action:    /* This label is used only to access EOF actions. */
  666.  
  667.  
  668.         switch ( yy_act )
  669.     { /* beginning of action switch */
  670.             case 0: /* must back up */
  671.             /* undo the effects of YY_DO_BEFORE_ACTION */
  672.             *yy_cp = yy_hold_char;
  673.             yy_cp = yy_last_accepting_cpos;
  674.             yy_current_state = yy_last_accepting_state;
  675.             goto yy_find_action;
  676.  
  677. case 1:
  678. YY_RULE_SETUP
  679. #line 35 "scanner.fl"
  680. return T_IF;
  681.     YY_BREAK
  682. case 2:
  683. YY_RULE_SETUP
  684. #line 36 "scanner.fl"
  685. return T_THEN;
  686.     YY_BREAK
  687. case 3:
  688. YY_RULE_SETUP
  689. #line 37 "scanner.fl"
  690. return T_ELSE;
  691.     YY_BREAK
  692. case 4:
  693. YY_RULE_SETUP
  694. #line 38 "scanner.fl"
  695. return T_END;
  696.     YY_BREAK
  697. case 5:
  698. YY_RULE_SETUP
  699. #line 39 "scanner.fl"
  700. return T_WHILE;
  701.     YY_BREAK
  702. case 6:
  703. YY_RULE_SETUP
  704. #line 40 "scanner.fl"
  705. return T_DO;
  706.     YY_BREAK
  707. case 7:
  708. YY_RULE_SETUP
  709. #line 41 "scanner.fl"
  710. {
  711.                     strncpy(mmlval.ident, mmtext, MAX_IDENT_LENGTH);
  712.                 mmlval.ident[MAX_IDENT_LENGTH] = '\0';
  713.                 return T_IDENT;
  714.                         }
  715.     YY_BREAK
  716. case 8:
  717. YY_RULE_SETUP
  718. #line 46 "scanner.fl"
  719. {
  720.                 int len;
  721.  
  722.                 if (mmleng - 2 < MAX_IDENT_LENGTH)
  723.                     len = mmleng - 2;
  724.                 else
  725.                     len = MAX_IDENT_LENGTH;
  726.                 strncpy(mmlval.ident, mmtext + 1, len);
  727.                 mmlval.ident[len] = '\0';
  728.                 return T_STRING;
  729.                 }
  730.     YY_BREAK
  731. case 9:
  732. YY_RULE_SETUP
  733. #line 57 "scanner.fl"
  734. { mmlval.exprtree = make_number(atof(mmtext)); return T_INT; }
  735.     YY_BREAK
  736. case 10:
  737. YY_RULE_SETUP
  738. #line 58 "scanner.fl"
  739. { mmlval.exprtree = make_number(atof(mmtext)); return T_FLOAT; }
  740.     YY_BREAK
  741. case 11:
  742. YY_RULE_SETUP
  743. #line 59 "scanner.fl"
  744. return T_EQUAL;
  745.     YY_BREAK
  746. case 12:
  747. YY_RULE_SETUP
  748. #line 60 "scanner.fl"
  749. return T_LESSEQUAL;
  750.     YY_BREAK
  751. case 13:
  752. YY_RULE_SETUP
  753. #line 61 "scanner.fl"
  754. return T_GREATEREQUAL;
  755.     YY_BREAK
  756. case 14:
  757. YY_RULE_SETUP
  758. #line 62 "scanner.fl"
  759. return T_NOTEQUAL;
  760.     YY_BREAK
  761. case 15:
  762. YY_RULE_SETUP
  763. #line 63 "scanner.fl"
  764. return T_OR;
  765.     YY_BREAK
  766. case 16:
  767. YY_RULE_SETUP
  768. #line 64 "scanner.fl"
  769. return T_AND;
  770.     YY_BREAK
  771. case 17:
  772. YY_RULE_SETUP
  773. #line 65 "scanner.fl"
  774. return T_CONVERT;
  775.     YY_BREAK
  776. case 18:
  777. YY_RULE_SETUP
  778. #line 66 "scanner.fl"
  779. return T_RANGE;
  780.     YY_BREAK
  781. case 19:
  782. YY_RULE_SETUP
  783. #line 67 "scanner.fl"
  784. return mmtext[0];
  785.     YY_BREAK
  786. case 20:
  787. YY_RULE_SETUP
  788. #line 68 "scanner.fl"
  789. ;
  790.     YY_BREAK
  791. case 21:
  792. YY_RULE_SETUP
  793. #line 69 "scanner.fl"
  794. ;
  795.     YY_BREAK
  796. case 22:
  797. YY_RULE_SETUP
  798. #line 71 "scanner.fl"
  799. ECHO;
  800.     YY_BREAK
  801. #line 802 "lex.mm.c"
  802. case YY_STATE_EOF(INITIAL):
  803.     yyterminate();
  804.  
  805.     case YY_END_OF_BUFFER:
  806.         {
  807.         /* Amount of text matched not including the EOB char. */
  808.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  809.  
  810.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  811.         *yy_cp = yy_hold_char;
  812.  
  813.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  814.             {
  815.             /* We're scanning a new file or input source.  It's
  816.              * possible that this happened because the user
  817.              * just pointed yyin at a new source and called
  818.              * yylex().  If so, then we have to assure
  819.              * consistency between yy_current_buffer and our
  820.              * globals.  Here is the right place to do so, because
  821.              * this is the first action (other than possibly a
  822.              * back-up) that will match for the new input source.
  823.              */
  824.             yy_n_chars = yy_current_buffer->yy_n_chars;
  825.             yy_current_buffer->yy_input_file = yyin;
  826.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  827.             }
  828.  
  829.         /* Note that here we test for yy_c_buf_p "<=" to the position
  830.          * of the first EOB in the buffer, since yy_c_buf_p will
  831.          * already have been incremented past the NUL character
  832.          * (since all states make transitions on EOB to the
  833.          * end-of-buffer state).  Contrast this with the test
  834.          * in input().
  835.          */
  836.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  837.             { /* This was really a NUL. */
  838.             yy_state_type yy_next_state;
  839.  
  840.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  841.  
  842.             yy_current_state = yy_get_previous_state();
  843.  
  844.             /* Okay, we're now positioned to make the NUL
  845.              * transition.  We couldn't have
  846.              * yy_get_previous_state() go ahead and do it
  847.              * for us because it doesn't know how to deal
  848.              * with the possibility of jamming (and we don't
  849.              * want to build jamming into it because then it
  850.              * will run more slowly).
  851.              */
  852.  
  853.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  854.  
  855.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  856.  
  857.             if ( yy_next_state )
  858.                 {
  859.                 /* Consume the NUL. */
  860.                 yy_cp = ++yy_c_buf_p;
  861.                 yy_current_state = yy_next_state;
  862.                 goto yy_match;
  863.                 }
  864.  
  865.             else
  866.                 {
  867.                 yy_cp = yy_c_buf_p;
  868.                 goto yy_find_action;
  869.                 }
  870.             }
  871.  
  872.         else switch ( yy_get_next_buffer() )
  873.             {
  874.             case EOB_ACT_END_OF_FILE:
  875.                 {
  876.                 yy_did_buffer_switch_on_eof = 0;
  877.  
  878.                 if ( yywrap() )
  879.                     {
  880.                     /* Note: because we've taken care in
  881.                      * yy_get_next_buffer() to have set up
  882.                      * yytext, we can now set up
  883.                      * yy_c_buf_p so that if some total
  884.                      * hoser (like flex itself) wants to
  885.                      * call the scanner after we return the
  886.                      * YY_NULL, it'll still work - another
  887.                      * YY_NULL will get returned.
  888.                      */
  889.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  890.  
  891.                     yy_act = YY_STATE_EOF(YY_START);
  892.                     goto do_action;
  893.                     }
  894.  
  895.                 else
  896.                     {
  897.                     if ( ! yy_did_buffer_switch_on_eof )
  898.                         YY_NEW_FILE;
  899.                     }
  900.                 break;
  901.                 }
  902.  
  903.             case EOB_ACT_CONTINUE_SCAN:
  904.                 yy_c_buf_p =
  905.                     yytext_ptr + yy_amount_of_matched_text;
  906.  
  907.                 yy_current_state = yy_get_previous_state();
  908.  
  909.                 yy_cp = yy_c_buf_p;
  910.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  911.                 goto yy_match;
  912.  
  913.             case EOB_ACT_LAST_MATCH:
  914.                 yy_c_buf_p =
  915.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  916.  
  917.                 yy_current_state = yy_get_previous_state();
  918.  
  919.                 yy_cp = yy_c_buf_p;
  920.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  921.                 goto yy_find_action;
  922.             }
  923.         break;
  924.         }
  925.  
  926.     default:
  927.         YY_FATAL_ERROR(
  928.             "fatal flex scanner internal error--no action found" );
  929.     } /* end of action switch */
  930.         } /* end of scanning one token */
  931.     } /* end of yylex */
  932.  
  933.  
  934. /* yy_get_next_buffer - try to read in a new buffer
  935.  *
  936.  * Returns a code representing an action:
  937.  *    EOB_ACT_LAST_MATCH -
  938.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  939.  *    EOB_ACT_END_OF_FILE - end of file
  940.  */
  941.  
  942. static int yy_get_next_buffer()
  943.     {
  944.     register char *dest = yy_current_buffer->yy_ch_buf;
  945.     register char *source = yytext_ptr;
  946.     register int number_to_move, i;
  947.     int ret_val;
  948.  
  949.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  950.         YY_FATAL_ERROR(
  951.         "fatal flex scanner internal error--end of buffer missed" );
  952.  
  953.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  954.         { /* Don't try to fill the buffer, so this is an EOF. */
  955.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  956.             {
  957.             /* We matched a singled characater, the EOB, so
  958.              * treat this as a final EOF.
  959.              */
  960.             return EOB_ACT_END_OF_FILE;
  961.             }
  962.  
  963.         else
  964.             {
  965.             /* We matched some text prior to the EOB, first
  966.              * process it.
  967.              */
  968.             return EOB_ACT_LAST_MATCH;
  969.             }
  970.         }
  971.  
  972.     /* Try to read more data. */
  973.  
  974.     /* First move last chars to start of buffer. */
  975.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  976.  
  977.     for ( i = 0; i < number_to_move; ++i )
  978.         *(dest++) = *(source++);
  979.  
  980.     if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  981.         /* don't do the read, it's not guaranteed to return an EOF,
  982.          * just force an EOF
  983.          */
  984.         yy_n_chars = 0;
  985.  
  986.     else
  987.         {
  988.         int num_to_read =
  989.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  990.  
  991.         while ( num_to_read <= 0 )
  992.             { /* Not enough room in the buffer - grow it. */
  993. #ifdef YY_USES_REJECT
  994.             YY_FATAL_ERROR(
  995. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  996. #else
  997.  
  998.             /* just a shorter name for the current buffer */
  999.             YY_BUFFER_STATE b = yy_current_buffer;
  1000.  
  1001.             int yy_c_buf_p_offset =
  1002.                 (int) (yy_c_buf_p - b->yy_ch_buf);
  1003.  
  1004.             if ( b->yy_is_our_buffer )
  1005.                 {
  1006.                 int new_size = b->yy_buf_size * 2;
  1007.  
  1008.                 if ( new_size <= 0 )
  1009.                     b->yy_buf_size += b->yy_buf_size / 8;
  1010.                 else
  1011.                     b->yy_buf_size *= 2;
  1012.  
  1013.                 b->yy_ch_buf = (char *)
  1014.                     /* Include room in for 2 EOB chars. */
  1015.                     yy_flex_realloc( (void *) b->yy_ch_buf,
  1016.                              b->yy_buf_size + 2 );
  1017.                 }
  1018.             else
  1019.                 /* Can't grow it, we don't own it. */
  1020.                 b->yy_ch_buf = 0;
  1021.  
  1022.             if ( ! b->yy_ch_buf )
  1023.                 YY_FATAL_ERROR(
  1024.                 "fatal error - scanner input buffer overflow" );
  1025.  
  1026.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1027.  
  1028.             num_to_read = yy_current_buffer->yy_buf_size -
  1029.                         number_to_move - 1;
  1030. #endif
  1031.             }
  1032.  
  1033.         if ( num_to_read > YY_READ_BUF_SIZE )
  1034.             num_to_read = YY_READ_BUF_SIZE;
  1035.  
  1036.         /* Read in more data. */
  1037.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1038.             yy_n_chars, num_to_read );
  1039.         }
  1040.  
  1041.     if ( yy_n_chars == 0 )
  1042.         {
  1043.         if ( number_to_move == YY_MORE_ADJ )
  1044.             {
  1045.             ret_val = EOB_ACT_END_OF_FILE;
  1046.             yyrestart( yyin );
  1047.             }
  1048.  
  1049.         else
  1050.             {
  1051.             ret_val = EOB_ACT_LAST_MATCH;
  1052.             yy_current_buffer->yy_buffer_status =
  1053.                 YY_BUFFER_EOF_PENDING;
  1054.             }
  1055.         }
  1056.  
  1057.     else
  1058.         ret_val = EOB_ACT_CONTINUE_SCAN;
  1059.  
  1060.     yy_n_chars += number_to_move;
  1061.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1062.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1063.  
  1064.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1065.  
  1066.     return ret_val;
  1067.     }
  1068.  
  1069.  
  1070. /* yy_get_previous_state - get the state just before the EOB char was reached */
  1071.  
  1072. static yy_state_type yy_get_previous_state()
  1073.     {
  1074.     register yy_state_type yy_current_state;
  1075.     register char *yy_cp;
  1076.  
  1077.     yy_current_state = yy_start;
  1078.  
  1079.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1080.         {
  1081.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  1082.         if ( yy_accept[yy_current_state] )
  1083.             {
  1084.             yy_last_accepting_state = yy_current_state;
  1085.             yy_last_accepting_cpos = yy_cp;
  1086.             }
  1087.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1088.             {
  1089.             yy_current_state = (int) yy_def[yy_current_state];
  1090.             if ( yy_current_state >= 54 )
  1091.                 yy_c = yy_meta[(unsigned int) yy_c];
  1092.             }
  1093.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1094.         }
  1095.  
  1096.     return yy_current_state;
  1097.     }
  1098.  
  1099.  
  1100. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1101.  *
  1102.  * synopsis
  1103.  *    next_state = yy_try_NUL_trans( current_state );
  1104.  */
  1105.  
  1106. #ifdef YY_USE_PROTOS
  1107. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  1108. #else
  1109. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1110. yy_state_type yy_current_state;
  1111. #endif
  1112.     {
  1113.     register int yy_is_jam;
  1114.     register char *yy_cp = yy_c_buf_p;
  1115.  
  1116.     register YY_CHAR yy_c = 1;
  1117.     if ( yy_accept[yy_current_state] )
  1118.         {
  1119.         yy_last_accepting_state = yy_current_state;
  1120.         yy_last_accepting_cpos = yy_cp;
  1121.         }
  1122.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1123.         {
  1124.         yy_current_state = (int) yy_def[yy_current_state];
  1125.         if ( yy_current_state >= 54 )
  1126.             yy_c = yy_meta[(unsigned int) yy_c];
  1127.         }
  1128.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1129.     yy_is_jam = (yy_current_state == 53);
  1130.  
  1131.     return yy_is_jam ? 0 : yy_current_state;
  1132.     }
  1133.  
  1134.  
  1135. #ifndef YY_NO_UNPUT
  1136. #ifdef YY_USE_PROTOS
  1137. static void yyunput( int c, register char *yy_bp )
  1138. #else
  1139. static void yyunput( c, yy_bp )
  1140. int c;
  1141. register char *yy_bp;
  1142. #endif
  1143.     {
  1144.     register char *yy_cp = yy_c_buf_p;
  1145.  
  1146.     /* undo effects of setting up yytext */
  1147.     *yy_cp = yy_hold_char;
  1148.  
  1149.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1150.         { /* need to shift things up to make room */
  1151.         /* +2 for EOB chars. */
  1152.         register int number_to_move = yy_n_chars + 2;
  1153.         register char *dest = &yy_current_buffer->yy_ch_buf[
  1154.                     yy_current_buffer->yy_buf_size + 2];
  1155.         register char *source =
  1156.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  1157.  
  1158.         while ( source > yy_current_buffer->yy_ch_buf )
  1159.             *--dest = *--source;
  1160.  
  1161.         yy_cp += (int) (dest - source);
  1162.         yy_bp += (int) (dest - source);
  1163.         yy_n_chars = yy_current_buffer->yy_buf_size;
  1164.  
  1165.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1166.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1167.         }
  1168.  
  1169.     *--yy_cp = (char) c;
  1170.  
  1171.  
  1172.     yytext_ptr = yy_bp;
  1173.     yy_hold_char = *yy_cp;
  1174.     yy_c_buf_p = yy_cp;
  1175.     }
  1176. #endif    /* ifndef YY_NO_UNPUT */
  1177.  
  1178.  
  1179. #ifdef __cplusplus
  1180. static int yyinput()
  1181. #else
  1182. static int input()
  1183. #endif
  1184.     {
  1185.     int c;
  1186.  
  1187.     *yy_c_buf_p = yy_hold_char;
  1188.  
  1189.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1190.         {
  1191.         /* yy_c_buf_p now points to the character we want to return.
  1192.          * If this occurs *before* the EOB characters, then it's a
  1193.          * valid NUL; if not, then we've hit the end of the buffer.
  1194.          */
  1195.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1196.             /* This was really a NUL. */
  1197.             *yy_c_buf_p = '\0';
  1198.  
  1199.         else
  1200.             { /* need more input */
  1201.             yytext_ptr = yy_c_buf_p;
  1202.             ++yy_c_buf_p;
  1203.  
  1204.             switch ( yy_get_next_buffer() )
  1205.                 {
  1206.                 case EOB_ACT_END_OF_FILE:
  1207.                     {
  1208.                     if ( yywrap() )
  1209.                         {
  1210.                         yy_c_buf_p =
  1211.                         yytext_ptr + YY_MORE_ADJ;
  1212.                         return EOF;
  1213.                         }
  1214.  
  1215.                     if ( ! yy_did_buffer_switch_on_eof )
  1216.                         YY_NEW_FILE;
  1217. #ifdef __cplusplus
  1218.                     return yyinput();
  1219. #else
  1220.                     return input();
  1221. #endif
  1222.                     }
  1223.  
  1224.                 case EOB_ACT_CONTINUE_SCAN:
  1225.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1226.                     break;
  1227.  
  1228.                 case EOB_ACT_LAST_MATCH:
  1229. #ifdef __cplusplus
  1230.                     YY_FATAL_ERROR(
  1231.                     "unexpected last match in yyinput()" );
  1232. #else
  1233.                     YY_FATAL_ERROR(
  1234.                     "unexpected last match in input()" );
  1235. #endif
  1236.                 }
  1237.             }
  1238.         }
  1239.  
  1240.     c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */
  1241.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1242.     yy_hold_char = *++yy_c_buf_p;
  1243.  
  1244.  
  1245.     return c;
  1246.     }
  1247.  
  1248.  
  1249. #ifdef YY_USE_PROTOS
  1250. void yyrestart( FILE *input_file )
  1251. #else
  1252. void yyrestart( input_file )
  1253. FILE *input_file;
  1254. #endif
  1255.     {
  1256.     if ( ! yy_current_buffer )
  1257.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1258.  
  1259.     yy_init_buffer( yy_current_buffer, input_file );
  1260.     yy_load_buffer_state();
  1261.     }
  1262.  
  1263.  
  1264. #ifdef YY_USE_PROTOS
  1265. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1266. #else
  1267. void yy_switch_to_buffer( new_buffer )
  1268. YY_BUFFER_STATE new_buffer;
  1269. #endif
  1270.     {
  1271.     if ( yy_current_buffer == new_buffer )
  1272.         return;
  1273.  
  1274.     if ( yy_current_buffer )
  1275.         {
  1276.         /* Flush out information for old buffer. */
  1277.         *yy_c_buf_p = yy_hold_char;
  1278.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1279.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1280.         }
  1281.  
  1282.     yy_current_buffer = new_buffer;
  1283.     yy_load_buffer_state();
  1284.  
  1285.     /* We don't actually know whether we did this switch during
  1286.      * EOF (yywrap()) processing, but the only time this flag
  1287.      * is looked at is after yywrap() is called, so it's safe
  1288.      * to go ahead and always set it.
  1289.      */
  1290.     yy_did_buffer_switch_on_eof = 1;
  1291.     }
  1292.  
  1293.  
  1294. #ifdef YY_USE_PROTOS
  1295. void yy_load_buffer_state( void )
  1296. #else
  1297. void yy_load_buffer_state()
  1298. #endif
  1299.     {
  1300.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1301.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1302.     yyin = yy_current_buffer->yy_input_file;
  1303.     yy_hold_char = *yy_c_buf_p;
  1304.     }
  1305.  
  1306.  
  1307. #ifdef YY_USE_PROTOS
  1308. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1309. #else
  1310. YY_BUFFER_STATE yy_create_buffer( file, size )
  1311. FILE *file;
  1312. int size;
  1313. #endif
  1314.     {
  1315.     YY_BUFFER_STATE b;
  1316.  
  1317.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1318.     if ( ! b )
  1319.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1320.  
  1321.     b->yy_buf_size = size;
  1322.  
  1323.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1324.      * we need to put in 2 end-of-buffer characters.
  1325.      */
  1326.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  1327.     if ( ! b->yy_ch_buf )
  1328.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1329.  
  1330.     b->yy_is_our_buffer = 1;
  1331.  
  1332.     yy_init_buffer( b, file );
  1333.  
  1334.     return b;
  1335.     }
  1336.  
  1337.  
  1338. #ifdef YY_USE_PROTOS
  1339. void yy_delete_buffer( YY_BUFFER_STATE b )
  1340. #else
  1341. void yy_delete_buffer( b )
  1342. YY_BUFFER_STATE b;
  1343. #endif
  1344.     {
  1345.     if ( ! b )
  1346.         return;
  1347.  
  1348.     if ( b == yy_current_buffer )
  1349.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  1350.  
  1351.     if ( b->yy_is_our_buffer )
  1352.         yy_flex_free( (void *) b->yy_ch_buf );
  1353.  
  1354.     yy_flex_free( (void *) b );
  1355.     }
  1356.  
  1357.  
  1358. #ifndef YY_ALWAYS_INTERACTIVE
  1359. #ifndef YY_NEVER_INTERACTIVE
  1360. extern int isatty YY_PROTO(( int ));
  1361. #endif
  1362. #endif
  1363.  
  1364. #ifdef YY_USE_PROTOS
  1365. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1366. #else
  1367. void yy_init_buffer( b, file )
  1368. YY_BUFFER_STATE b;
  1369. FILE *file;
  1370. #endif
  1371.  
  1372.  
  1373.     {
  1374.     yy_flush_buffer( b );
  1375.  
  1376.     b->yy_input_file = file;
  1377.     b->yy_fill_buffer = 1;
  1378.  
  1379. #if YY_ALWAYS_INTERACTIVE
  1380.     b->yy_is_interactive = 1;
  1381. #else
  1382. #if YY_NEVER_INTERACTIVE
  1383.     b->yy_is_interactive = 0;
  1384. #else
  1385.     b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
  1386. #endif
  1387. #endif
  1388.     }
  1389.  
  1390.  
  1391. #ifdef YY_USE_PROTOS
  1392. void yy_flush_buffer( YY_BUFFER_STATE b )
  1393. #else
  1394. void yy_flush_buffer( b )
  1395. YY_BUFFER_STATE b;
  1396. #endif
  1397.  
  1398.     {
  1399.     b->yy_n_chars = 0;
  1400.  
  1401.     /* We always need two end-of-buffer characters.  The first causes
  1402.      * a transition to the end-of-buffer state.  The second causes
  1403.      * a jam in that state.
  1404.      */
  1405.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1406.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1407.  
  1408.     b->yy_buf_pos = &b->yy_ch_buf[0];
  1409.  
  1410.     b->yy_at_bol = 1;
  1411.     b->yy_buffer_status = YY_BUFFER_NEW;
  1412.  
  1413.     if ( b == yy_current_buffer )
  1414.         yy_load_buffer_state();
  1415.     }
  1416.  
  1417.  
  1418. #ifndef YY_NO_SCAN_BUFFER
  1419. #ifdef YY_USE_PROTOS
  1420. YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
  1421. #else
  1422. YY_BUFFER_STATE yy_scan_buffer( base, size )
  1423. char *base;
  1424. yy_size_t size;
  1425. #endif
  1426.     {
  1427.     YY_BUFFER_STATE b;
  1428.  
  1429.     if ( size < 2 ||
  1430.          base[size-2] != YY_END_OF_BUFFER_CHAR ||
  1431.          base[size-1] != YY_END_OF_BUFFER_CHAR )
  1432.         /* They forgot to leave room for the EOB's. */
  1433.         return 0;
  1434.  
  1435.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1436.     if ( ! b )
  1437.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
  1438.  
  1439.     b->yy_buf_size = size - 2;    /* "- 2" to take care of EOB's */
  1440.     b->yy_buf_pos = b->yy_ch_buf = base;
  1441.     b->yy_is_our_buffer = 0;
  1442.     b->yy_input_file = 0;
  1443.     b->yy_n_chars = b->yy_buf_size;
  1444.     b->yy_is_interactive = 0;
  1445.     b->yy_at_bol = 1;
  1446.     b->yy_fill_buffer = 0;
  1447.     b->yy_buffer_status = YY_BUFFER_NEW;
  1448.  
  1449.     yy_switch_to_buffer( b );
  1450.  
  1451.     return b;
  1452.     }
  1453. #endif
  1454.  
  1455.  
  1456. #ifndef YY_NO_SCAN_STRING
  1457. #ifdef YY_USE_PROTOS
  1458. YY_BUFFER_STATE yy_scan_string( yyconst char *str )
  1459. #else
  1460. YY_BUFFER_STATE yy_scan_string( str )
  1461. yyconst char *str;
  1462. #endif
  1463.     {
  1464.     int len;
  1465.     for ( len = 0; str[len]; ++len )
  1466.         ;
  1467.  
  1468.     return yy_scan_bytes( str, len );
  1469.     }
  1470. #endif
  1471.  
  1472.  
  1473. #ifndef YY_NO_SCAN_BYTES
  1474. #ifdef YY_USE_PROTOS
  1475. YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
  1476. #else
  1477. YY_BUFFER_STATE yy_scan_bytes( bytes, len )
  1478. yyconst char *bytes;
  1479. int len;
  1480. #endif
  1481.     {
  1482.     YY_BUFFER_STATE b;
  1483.     char *buf;
  1484.     yy_size_t n;
  1485.     int i;
  1486.  
  1487.     /* Get memory for full buffer, including space for trailing EOB's. */
  1488.     n = len + 2;
  1489.     buf = (char *) yy_flex_alloc( n );
  1490.     if ( ! buf )
  1491.         YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
  1492.  
  1493.     for ( i = 0; i < len; ++i )
  1494.         buf[i] = bytes[i];
  1495.  
  1496.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  1497.  
  1498.     b = yy_scan_buffer( buf, n );
  1499.     if ( ! b )
  1500.         YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
  1501.  
  1502.     /* It's okay to grow etc. this buffer, and we should throw it
  1503.      * away when we're done.
  1504.      */
  1505.     b->yy_is_our_buffer = 1;
  1506.  
  1507.     return b;
  1508.     }
  1509. #endif
  1510.  
  1511.  
  1512. #ifndef YY_NO_PUSH_STATE
  1513. #ifdef YY_USE_PROTOS
  1514. static void yy_push_state( int new_state )
  1515. #else
  1516. static void yy_push_state( new_state )
  1517. int new_state;
  1518. #endif
  1519.     {
  1520.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1521.         {
  1522.         yy_size_t new_size;
  1523.  
  1524.         yy_start_stack_depth += YY_START_STACK_INCR;
  1525.         new_size = yy_start_stack_depth * sizeof( int );
  1526.  
  1527.         if ( ! yy_start_stack )
  1528.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  1529.  
  1530.         else
  1531.             yy_start_stack = (int *) yy_flex_realloc(
  1532.                     (void *) yy_start_stack, new_size );
  1533.  
  1534.         if ( ! yy_start_stack )
  1535.             YY_FATAL_ERROR(
  1536.             "out of memory expanding start-condition stack" );
  1537.         }
  1538.  
  1539.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1540.  
  1541.     BEGIN(new_state);
  1542.     }
  1543. #endif
  1544.  
  1545.  
  1546. #ifndef YY_NO_POP_STATE
  1547. static void yy_pop_state()
  1548.     {
  1549.     if ( --yy_start_stack_ptr < 0 )
  1550.         YY_FATAL_ERROR( "start-condition stack underflow" );
  1551.  
  1552.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1553.     }
  1554. #endif
  1555.  
  1556.  
  1557. #ifndef YY_NO_TOP_STATE
  1558. static int yy_top_state()
  1559.     {
  1560.     return yy_start_stack[yy_start_stack_ptr - 1];
  1561.     }
  1562. #endif
  1563.  
  1564. #ifndef YY_EXIT_FAILURE
  1565. #define YY_EXIT_FAILURE 2
  1566. #endif
  1567.  
  1568. #ifdef YY_USE_PROTOS
  1569. static void yy_fatal_error( yyconst char msg[] )
  1570. #else
  1571. static void yy_fatal_error( msg )
  1572. char msg[];
  1573. #endif
  1574.     {
  1575.     (void) fprintf( stderr, "%s\n", msg );
  1576.     exit( YY_EXIT_FAILURE );
  1577.     }
  1578.  
  1579.  
  1580.  
  1581. /* Redefine yyless() so it works in section 3 code. */
  1582.  
  1583. #undef yyless
  1584. #define yyless(n) \
  1585.     do \
  1586.         { \
  1587.         /* Undo effects of setting up yytext. */ \
  1588.         yytext[yyleng] = yy_hold_char; \
  1589.         yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
  1590.         yy_hold_char = *yy_c_buf_p; \
  1591.         *yy_c_buf_p = '\0'; \
  1592.         yyleng = n; \
  1593.         } \
  1594.     while ( 0 )
  1595.  
  1596.  
  1597. /* Internal utility routines. */
  1598.  
  1599. #ifndef yytext_ptr
  1600. #ifdef YY_USE_PROTOS
  1601. static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
  1602. #else
  1603. static void yy_flex_strncpy( s1, s2, n )
  1604. char *s1;
  1605. yyconst char *s2;
  1606. int n;
  1607. #endif
  1608.     {
  1609.     register int i;
  1610.     for ( i = 0; i < n; ++i )
  1611.         s1[i] = s2[i];
  1612.     }
  1613. #endif
  1614.  
  1615.  
  1616. #ifdef YY_USE_PROTOS
  1617. static void *yy_flex_alloc( yy_size_t size )
  1618. #else
  1619. static void *yy_flex_alloc( size )
  1620. yy_size_t size;
  1621. #endif
  1622.     {
  1623.     return (void *) malloc( size );
  1624.     }
  1625.  
  1626. #ifdef YY_USE_PROTOS
  1627. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  1628. #else
  1629. static void *yy_flex_realloc( ptr, size )
  1630. void *ptr;
  1631. yy_size_t size;
  1632. #endif
  1633.     {
  1634.     /* The cast to (char *) in the following accommodates both
  1635.      * implementations that use char* generic pointers, and those
  1636.      * that use void* generic pointers.  It works with the latter
  1637.      * because both ANSI C and C++ allow castless assignment from
  1638.      * any pointer type to void*, and deal with argument conversions
  1639.      * as though doing an assignment.
  1640.      */
  1641.     return (void *) realloc( (char *) ptr, size );
  1642.     }
  1643.  
  1644. #ifdef YY_USE_PROTOS
  1645. static void yy_flex_free( void *ptr )
  1646. #else
  1647. static void yy_flex_free( ptr )
  1648. void *ptr;
  1649. #endif
  1650.     {
  1651.     free( ptr );
  1652.     }
  1653.  
  1654. #if YY_MAIN
  1655. int main()
  1656.     {
  1657.     yylex();
  1658.     return 0;
  1659.     }
  1660. #endif
  1661. #line 71 "scanner.fl"
  1662.  
  1663.  
  1664. void
  1665. scanFromString (char *string)
  1666. {
  1667.     mm_scan_string(string);
  1668. }
  1669.  
  1670. void
  1671. endScanningFromString (void)
  1672. {
  1673.     mm_delete_buffer(YY_CURRENT_BUFFER);
  1674. }
  1675.