tinycobol/compiler/pp_scanner.c

4902 lines
141 KiB
C

#line 2 "pp_scanner.c"
#line 4 "pp_scanner.c"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define yy_create_buffer pp_yy_create_buffer
#define yy_delete_buffer pp_yy_delete_buffer
#define yy_flex_debug pp_yy_flex_debug
#define yy_init_buffer pp_yy_init_buffer
#define yy_flush_buffer pp_yy_flush_buffer
#define yy_load_buffer_state pp_yy_load_buffer_state
#define yy_switch_to_buffer pp_yy_switch_to_buffer
#define yyin pp_yyin
#define yyleng pp_yyleng
#define yylex pp_yylex
#define yylineno pp_yylineno
#define yyout pp_yyout
#define yyrestart pp_yyrestart
#define yytext pp_yytext
#define yywrap pp_yywrap
#define yyalloc pp_yyalloc
#define yyrealloc pp_yyrealloc
#define yyfree pp_yyfree
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* end standard C headers. */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)
#define YY_USE_CONST
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE pp_yyrestart(pp_yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
extern int pp_yyleng;
extern FILE *pp_yyin, *pp_yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
* existing scanners that call yyless() from OUTSIDE pp_yylex.
* One obvious solution it to make yy_act a global. I tried that, and saw
* a 5% performance hit in a non-pp_yylineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
*/
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
for ( yyl = n; yyl < pp_yyleng; ++yyl )\
if ( pp_yytext[yyl] == '\n' )\
--pp_yylineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up pp_yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up pp_yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via pp_yyrestart()), so that the user can continue scanning by
* just pointing pp_yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* yy_hold_char holds the character lost when pp_yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int pp_yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow pp_yywrap()'s to do buffer switches
* instead of setting up a fresh pp_yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void pp_yyrestart (FILE *input_file );
void pp_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE pp_yy_create_buffer (FILE *file,int size );
void pp_yy_delete_buffer (YY_BUFFER_STATE b );
void pp_yy_flush_buffer (YY_BUFFER_STATE b );
void pp_yypush_buffer_state (YY_BUFFER_STATE new_buffer );
void pp_yypop_buffer_state (void );
static void pp_yyensure_buffer_stack (void );
static void pp_yy_load_buffer_state (void );
static void pp_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
#define YY_FLUSH_BUFFER pp_yy_flush_buffer(YY_CURRENT_BUFFER )
YY_BUFFER_STATE pp_yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE pp_yy_scan_string (yyconst char *yy_str );
YY_BUFFER_STATE pp_yy_scan_bytes (yyconst char *bytes,int len );
void *pp_yyalloc (yy_size_t );
void *pp_yyrealloc (void *,yy_size_t );
void pp_yyfree (void * );
#define yy_new_buffer pp_yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
pp_yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
pp_yy_create_buffer(pp_yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
pp_yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
pp_yy_create_buffer(pp_yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
typedef unsigned char YY_CHAR;
FILE *pp_yyin = (FILE *) 0, *pp_yyout = (FILE *) 0;
typedef int yy_state_type;
extern int pp_yylineno;
int pp_yylineno = 1;
extern char *pp_yytext;
#define yytext_ptr pp_yytext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up pp_yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
pp_yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 75
#define YY_END_OF_BUFFER 76
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
{
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[789] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 76, 75, 32, 50, 23, 24, 25, 32,
30, 32, 32, 26, 32, 29, 29, 29, 29, 29,
29, 29, 29, 29, 29, 23, 2, 4, 6, 3,
29, 29, 53, 54, 52, 75, 51, 2, 4, 3,
49, 23, 32, 23, 73, 74, 64, 65, 63, 71,
72, 70, 55, 75, 75, 48, 47, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 34,
50, 23, 0, 0, 0, 1, 0, 29, 28, 26,
27, 29, 29, 11, 29, 29, 29, 10, 29, 8,
29, 29, 29, 29, 23, 0, 29, 5, 1, 49,
23, 31, 23, 73, 64, 0, 61, 61, 61, 62,
61, 71, 0, 68, 68, 68, 68, 69, 55, 0,
56, 57, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 33, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 23, 0, 0, 0, 26, 29,
29, 29, 29, 29, 29, 29, 9, 29, 29, 29,
29, 23, 0, 29, 23, 23, 0, 0, 0, 0,
0, 0, 0, 59, 0, 0, 0, 0, 0, 0,
0, 66, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 23, 0, 0, 0,
26, 29, 29, 7, 29, 29, 29, 22, 29, 29,
29, 20, 23, 0, 29, 23, 23, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 23, 0, 0, 0, 26,
29, 29, 29, 29, 29, 29, 29, 29, 0, 29,
23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
29, 29, 29, 29, 29, 29, 29, 29, 29, 0,
29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
26, 29, 29, 29, 29, 29, 29, 12, 29, 29,
29, 0, 0, 15, 0, 60, 0, 67, 0, 58,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 26, 29, 29, 29,
29, 29, 29, 29, 29, 29, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 26, 29, 29, 29,
29, 21, 29, 13, 0, 19, 29, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 26, 29, 29, 29, 29, 29,
29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 26, 29,
29, 29, 29, 29, 29, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 26, 29, 29, 29, 29, 29, 29, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 26, 29, 29, 29,
0, 17, 0, 16, 29, 0, 0, 0, 0, 0,
0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
0, 26, 29, 29, 0, 18, 29, 0, 0, 0,
0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
0, 26, 29, 29, 14, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 44, 0, 45, 0, 26,
29, 29, 0, 0, 0, 0, 0, 0, 0, 0,
42, 0, 0, 26, 29, 29, 0, 0, 0, 0,
0, 0, 0, 0, 0, 26, 29, 29, 0, 0,
0, 0, 0, 0, 0, 0, 0, 29, 29, 0,
0, 0, 0, 0, 0, 0, 0, 46, 0, 29,
29, 0, 0, 0, 0, 0, 0, 0, 0, 29,
29, 0, 0, 0, 0, 0, 0, 36, 0, 38,
0, 29, 29, 0, 0, 0, 0, 43, 0, 37,
0, 29, 29, 0, 0, 0, 0, 29, 29, 0,
0, 0, 0, 41, 29, 29, 0, 0, 0, 29,
29, 0, 0, 0, 29, 29, 0, 0, 0, 29,
29, 0, 0, 0, 29, 29, 0, 0, 0, 29,
29, 0, 0, 0, 29, 29, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 1, 4, 1, 5, 1, 6, 7, 1,
1, 8, 1, 9, 10, 11, 12, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
14, 15, 1, 1, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
25, 32, 33, 34, 35, 36, 37, 25, 38, 25,
1, 1, 1, 1, 1, 1, 39, 40, 41, 42,
43, 44, 45, 46, 47, 25, 48, 49, 50, 51,
52, 53, 25, 54, 55, 56, 57, 58, 59, 25,
60, 25, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[61] =
{ 0,
1, 2, 1, 3, 1, 1, 4, 1, 1, 5,
1, 1, 5, 6, 1, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5
} ;
static yyconst flex_int16_t yy_base[834] =
{ 0,
0, 0, 0, 58, 70, 82, 78, 90, 1905, 1904,
60, 63, 67, 100, 81, 89, 101, 103, 93, 97,
128, 186, 1905, 1908, 1908, 1908, 213, 1908, 1908, 1889,
1908, 66, 111, 105, 1889, 106, 107, 112, 182, 122,
124, 153, 113, 234, 238, 285, 1908, 1887, 128, 1908,
199, 183, 1908, 1908, 1908, 1886, 1908, 1908, 1885, 1908,
1908, 247, 1884, 125, 0, 1908, 0, 1888, 255, 0,
1887, 137, 0, 1886, 1881, 1908, 1908, 338, 1879, 127,
146, 129, 144, 149, 177, 182, 188, 202, 222, 1878,
1908, 273, 226, 240, 247, 1908, 140, 260, 1908, 268,
1908, 269, 283, 285, 290, 295, 297, 306, 312, 323,
335, 337, 339, 350, 1889, 277, 373, 1908, 1908, 1908,
370, 1908, 1888, 0, 0, 1887, 1908, 320, 396, 1908,
406, 0, 1886, 1908, 332, 398, 411, 1908, 0, 1885,
1869, 1908, 1875, 312, 314, 317, 381, 382, 391, 387,
396, 402, 392, 1908, 395, 392, 391, 403, 400, 403,
404, 409, 403, 404, 448, 408, 414, 437, 450, 455,
460, 461, 466, 467, 472, 474, 478, 483, 479, 487,
488, 1865, 427, 502, 520, 1863, 1852, 501, 527, 502,
540, 280, 547, 1908, 1851, 510, 552, 532, 554, 310,
561, 1908, 1845, 1583, 490, 526, 542, 537, 545, 517,
543, 548, 555, 543, 556, 552, 577, 562, 551, 551,
577, 593, 599, 601, 603, 605, 607, 612, 618, 616,
620, 626, 1562, 575, 630, 639, 1541, 1520, 373, 1505,
530, 1490, 1456, 602, 620, 1214, 615, 1197, 615, 629,
631, 621, 622, 635, 632, 524, 1154, 646, 633, 667,
678, 679, 680, 686, 687, 691, 700, 692, 643, 705,
590, 1152, 1150, 1095, 655, 681, 704, 681, 716, 1073,
698, 703, 690, 694, 700, 701, 707, 707, 716, 744,
745, 751, 752, 757, 759, 763, 767, 765, 771, 742,
782, 738, 791, 797, 755, 751, 773, 774, 785, 777,
789, 778, 782, 1049, 1022, 794, 788, 787, 795, 789,
814, 820, 821, 833, 838, 837, 839, 843, 844, 854,
850, 757, 866, 1908, 855, 1908, 835, 1908, 867, 1908,
856, 833, 836, 848, 861, 846, 996, 850, 890, 872,
877, 983, 856, 862, 873, 858, 898, 903, 907, 909,
911, 913, 915, 920, 926, 921, 896, 940, 949, 899,
925, 922, 934, 910, 914, 947, 935, 957, 1908, 936,
939, 928, 932, 938, 940, 973, 976, 977, 978, 982,
987, 988, 994, 995, 1000, 1908, 999, 1010, 1012, 1013,
976, 986, 989, 994, 1000, 995, 1008, 978, 1012, 1013,
999, 1010, 1002, 1013, 1025, 1046, 1051, 1052, 1053, 1057,
1058, 1036, 1043, 1071, 1045, 1048, 1052, 1044, 1050, 1046,
1064, 1074, 1050, 1051, 1056, 1061, 1070, 1067, 1081, 1102,
1104, 1108, 1110, 1112, 1114, 1126, 1128, 1129, 1074, 1104,
1106, 972, 1108, 1104, 1106, 1118, 1119, 1120, 1114, 1127,
1121, 1123, 1135, 1144, 1163, 1165, 1176, 1180, 1167, 1178,
1185, 1191, 1167, 1168, 1169, 1166, 1199, 954, 1175, 1167,
1174, 1175, 1190, 1190, 1210, 1213, 1201, 1202, 1218, 1227,
1230, 1908, 1231, 1908, 1226, 1240, 1242, 1244, 904, 887,
1247, 1227, 1249, 1908, 1232, 1223, 1230, 1227, 1228, 1237,
1252, 1251, 1257, 1258, 1269, 1908, 1263, 1280, 1259, 1282,
1278, 1285, 1286, 1908, 1254, 1271, 1264, 1261, 1289, 1293,
1278, 1289, 1293, 1295, 1297, 1316, 1306, 1319, 1281, 1305,
1302, 1309, 1325, 1305, 1327, 1908, 1328, 1908, 833, 1322,
1324, 1331, 1339, 1344, 1342, 1335, 1336, 1323, 1323, 1352,
1908, 1328, 1356, 1351, 1352, 1356, 1364, 1367, 1368, 1326,
1339, 1351, 1357, 1354, 1364, 1375, 1377, 1381, 1389, 1393,
1398, 1362, 1373, 1369, 1373, 1403, 1390, 1400, 1402, 1413,
1415, 1420, 1389, 1396, 1398, 1399, 1426, 1908, 1396, 1422,
1423, 1435, 1437, 1439, 1405, 1416, 1443, 1444, 1427, 1447,
1448, 1459, 1461, 1462, 1466, 1467, 1468, 1908, 1469, 1908,
1423, 1463, 1471, 1479, 1482, 1483, 1485, 1908, 1487, 1908,
1462, 1482, 1484, 1496, 1498, 1499, 1501, 1496, 1497, 1511,
1513, 1514, 1508, 1908, 1511, 1512, 1523, 1525, 1526, 1521,
1523, 1534, 1532, 1537, 1532, 1533, 1544, 1546, 1547, 1542,
1544, 1555, 1553, 1558, 1553, 1554, 1565, 1567, 1568, 1563,
1565, 1576, 1574, 1579, 1574, 1575, 1586, 1588, 1589, 1593,
1591, 1596, 1598, 1600, 1601, 1605, 1603, 1608, 1610, 1612,
1613, 1617, 1615, 1620, 1622, 1624, 1625, 1629, 1627, 1632,
1634, 1636, 1637, 1641, 1639, 1644, 1646, 1648, 1649, 1653,
1651, 1656, 1658, 1660, 1661, 1665, 1663, 1668, 1670, 1672,
1673, 1677, 1675, 1680, 1682, 1684, 1685, 1689, 1687, 1692,
1694, 1696, 1697, 1701, 1699, 1704, 1706, 1708, 1709, 1713,
1711, 1716, 1718, 1720, 1721, 1725, 1723, 1728, 1730, 1732,
1733, 1737, 1735, 1740, 1742, 1744, 1745, 1749, 1747, 1752,
1754, 1756, 1757, 1761, 1759, 1764, 1766, 1768, 1769, 1773,
1771, 1776, 1778, 1780, 1781, 1785, 1783, 1788, 1790, 1792,
1793, 1797, 1795, 1800, 822, 810, 784, 1908, 1804, 1810,
1816, 1822, 1828, 1834, 1840, 748, 722, 1846, 1852, 1858,
1864, 1870, 1876, 1881, 678, 661, 659, 647, 630, 599,
597, 592, 578, 572, 567, 540, 515, 470, 461, 416,
390, 385, 306, 294, 267, 258, 248, 233, 206, 185,
179, 116, 104
} ;
static yyconst flex_int16_t yy_def[834] =
{ 0,
789, 789, 788, 3, 790, 790, 3, 3, 791, 791,
792, 792, 792, 792, 793, 793, 793, 793, 794, 794,
795, 795, 788, 788, 788, 788, 788, 788, 788, 788,
788, 796, 788, 796, 788, 797, 797, 797, 797, 797,
797, 797, 797, 797, 797, 788, 788, 788, 796, 788,
797, 797, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 46, 798, 788, 799, 788, 800, 801,
788, 802, 803, 788, 804, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 796, 797, 788, 796,
788, 797, 805, 805, 805, 805, 805, 805, 805, 805,
805, 805, 805, 805, 46, 788, 805, 788, 788, 788,
788, 788, 64, 798, 799, 788, 788, 788, 788, 788,
788, 801, 788, 788, 788, 788, 788, 788, 803, 788,
804, 788, 78, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 796, 805,
806, 806, 806, 806, 806, 806, 806, 806, 806, 806,
806, 46, 788, 806, 788, 64, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 78, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
796, 806, 807, 807, 807, 807, 807, 807, 807, 807,
807, 807, 46, 788, 807, 788, 64, 788, 788, 788,
788, 788, 78, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 796,
807, 808, 807, 808, 808, 808, 808, 808, 788, 808,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 796,
808, 809, 808, 808, 809, 809, 809, 809, 809, 788,
809, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
796, 809, 810, 809, 809, 810, 810, 810, 810, 810,
809, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 796, 810, 811, 810,
810, 811, 811, 811, 811, 810, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 796, 811, 812, 811,
811, 812, 812, 812, 788, 788, 811, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 796, 812, 813, 812, 812, 813,
812, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 796, 813,
814, 813, 813, 814, 813, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 796, 814, 815, 814, 814, 815, 814, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 796, 815, 816, 815,
788, 788, 788, 788, 815, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 796, 816, 817, 788, 788, 816, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 796, 817, 818, 817, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 796,
818, 819, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 796, 819, 820, 788, 788, 788, 788,
788, 788, 788, 788, 788, 796, 820, 821, 788, 788,
788, 788, 788, 788, 788, 788, 788, 821, 822, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 822,
823, 788, 788, 788, 788, 788, 788, 788, 788, 823,
824, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 824, 825, 788, 788, 788, 788, 788, 788, 788,
788, 825, 826, 788, 788, 788, 788, 826, 827, 788,
788, 788, 788, 788, 827, 828, 788, 788, 788, 828,
829, 788, 788, 788, 829, 830, 788, 788, 788, 830,
831, 788, 788, 788, 831, 832, 788, 788, 788, 832,
833, 788, 788, 788, 833, 833, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 0, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788
} ;
static yyconst flex_int16_t yy_nxt[1969] =
{ 0,
25, 26, 27, 28, 25, 25, 29, 30, 31, 32,
33, 25, 34, 35, 25, 36, 37, 38, 39, 36,
36, 36, 36, 40, 36, 36, 36, 41, 36, 42,
36, 43, 44, 36, 36, 36, 45, 36, 36, 37,
38, 39, 36, 36, 36, 36, 40, 36, 36, 41,
36, 42, 36, 43, 44, 36, 36, 36, 45, 36,
46, 68, 47, 69, 68, 48, 69, 49, 68, 50,
69, 54, 55, 51, 24, 97, 52, 56, 97, 61,
62, 24, 71, 54, 55, 63, 58, 72, 57, 59,
71, 61, 64, 60, 74, 72, 51, 63, 74, 52,
57, 68, 71, 69, 71, 51, 75, 72, 676, 72,
75, 57, 99, 99, 97, 102, 102, 100, 102, 102,
671, 102, 102, 57, 102, 102, 120, 123, 51, 77,
78, 102, 111, 102, 102, 79, 102, 97, 135, 136,
97, 105, 137, 138, 104, 80, 81, 82, 83, 97,
108, 84, 97, 109, 85, 111, 155, 157, 86, 87,
88, 156, 102, 105, 89, 102, 104, 158, 80, 81,
82, 83, 108, 110, 84, 109, 85, 159, 155, 157,
86, 87, 88, 666, 156, 118, 89, 77, 78, 661,
158, 102, 102, 90, 102, 102, 110, 106, 106, 159,
160, 107, 107, 80, 81, 82, 83, 162, 102, 84,
656, 102, 85, 161, 91, 92, 86, 87, 88, 163,
106, 106, 89, 160, 107, 107, 80, 81, 82, 83,
162, 93, 84, 117, 85, 161, 94, 651, 86, 87,
88, 166, 163, 102, 89, 95, 102, 102, 120, 121,
102, 164, 646, 112, 93, 117, 128, 129, 130, 94,
131, 114, 639, 113, 166, 93, 168, 95, 167, 102,
94, 633, 102, 164, 91, 165, 112, 97, 102, 95,
169, 102, 239, 194, 114, 113, 91, 115, 93, 168,
167, 93, 170, 94, 170, 170, 94, 170, 623, 170,
116, 95, 170, 93, 170, 95, 170, 170, 94, 170,
611, 183, 241, 174, 93, 170, 202, 95, 170, 94,
172, 170, 188, 116, 170, 189, 93, 95, 173, 156,
176, 94, 170, 183, 196, 170, 174, 197, 175, 95,
143, 155, 172, 177, 170, 157, 170, 170, 170, 170,
173, 170, 156, 176, 179, 144, 145, 146, 147, 170,
175, 148, 170, 155, 149, 178, 177, 157, 150, 151,
152, 120, 185, 180, 153, 239, 194, 179, 144, 145,
146, 147, 170, 181, 148, 170, 149, 178, 93, 601,
150, 151, 152, 94, 589, 180, 153, 190, 191, 198,
199, 189, 95, 197, 158, 181, 184, 192, 193, 194,
159, 93, 200, 201, 160, 162, 94, 202, 161, 163,
578, 164, 205, 206, 95, 207, 208, 158, 184, 209,
210, 211, 159, 212, 215, 216, 213, 160, 162, 214,
161, 218, 163, 164, 205, 206, 219, 207, 208, 91,
217, 209, 210, 211, 220, 212, 215, 216, 213, 97,
234, 214, 221, 218, 170, 566, 93, 170, 219, 222,
222, 94, 222, 222, 552, 222, 222, 220, 222, 222,
95, 222, 234, 222, 222, 225, 222, 222, 222, 93,
222, 222, 222, 228, 94, 222, 222, 222, 224, 222,
222, 226, 95, 188, 188, 227, 189, 189, 225, 229,
232, 222, 196, 230, 222, 197, 228, 244, 231, 534,
224, 120, 236, 226, 235, 91, 256, 227, 192, 193,
194, 229, 241, 232, 196, 230, 202, 197, 93, 244,
231, 190, 191, 94, 514, 189, 245, 235, 192, 193,
194, 249, 95, 200, 201, 198, 199, 246, 202, 197,
247, 93, 200, 201, 248, 251, 94, 202, 250, 245,
252, 489, 253, 249, 95, 254, 465, 255, 91, 256,
246, 257, 441, 247, 258, 259, 97, 248, 251, 260,
250, 120, 271, 252, 253, 93, 417, 269, 254, 255,
94, 389, 222, 359, 257, 222, 258, 259, 261, 95,
261, 261, 263, 261, 261, 261, 261, 261, 93, 261,
269, 261, 265, 94, 261, 261, 264, 261, 261, 261,
261, 95, 261, 266, 323, 261, 275, 268, 261, 261,
120, 271, 261, 276, 281, 265, 278, 267, 280, 264,
282, 292, 283, 284, 285, 286, 266, 93, 275, 270,
268, 288, 94, 262, 289, 223, 276, 281, 278, 267,
280, 95, 300, 282, 283, 284, 97, 285, 286, 290,
93, 270, 171, 305, 288, 94, 289, 261, 291, 261,
261, 291, 261, 95, 300, 291, 291, 293, 291, 291,
291, 291, 306, 291, 291, 305, 277, 295, 297, 291,
308, 299, 291, 296, 291, 313, 294, 291, 279, 311,
293, 312, 307, 298, 317, 306, 103, 314, 315, 316,
295, 297, 308, 319, 299, 296, 301, 313, 294, 320,
335, 336, 311, 318, 312, 307, 298, 317, 309, 314,
315, 316, 98, 97, 291, 319, 321, 291, 301, 333,
322, 291, 320, 322, 291, 318, 291, 334, 322, 291,
309, 322, 322, 332, 322, 322, 322, 322, 341, 322,
331, 324, 326, 322, 333, 342, 328, 340, 325, 327,
329, 322, 334, 337, 322, 332, 343, 338, 330, 339,
340, 341, 344, 324, 345, 326, 346, 342, 347, 328,
325, 327, 348, 329, 349, 352, 338, 353, 354, 343,
330, 355, 356, 97, 344, 336, 357, 345, 346, 322,
358, 347, 322, 358, 348, 563, 349, 368, 352, 353,
354, 338, 322, 355, 356, 322, 358, 322, 358, 358,
322, 358, 358, 358, 363, 358, 358, 367, 336, 322,
360, 361, 322, 358, 371, 362, 358, 366, 333, 369,
340, 372, 364, 370, 350, 373, 334, 363, 374, 351,
375, 377, 360, 383, 361, 384, 371, 362, 385, 522,
366, 365, 378, 372, 364, 386, 370, 373, 398, 336,
379, 374, 375, 377, 380, 383, 521, 97, 384, 381,
387, 385, 358, 365, 401, 358, 388, 386, 358, 388,
358, 358, 388, 358, 388, 388, 380, 388, 395, 388,
358, 381, 388, 358, 392, 388, 396, 401, 388, 390,
402, 394, 399, 405, 391, 403, 338, 406, 393, 376,
397, 400, 340, 404, 408, 409, 505, 392, 410, 378,
411, 390, 412, 402, 394, 405, 391, 379, 403, 406,
393, 413, 397, 414, 476, 395, 404, 408, 409, 407,
432, 410, 411, 396, 412, 97, 388, 416, 415, 388,
416, 388, 382, 413, 388, 414, 388, 416, 376, 388,
416, 407, 395, 416, 416, 418, 416, 416, 388, 425,
396, 388, 422, 336, 423, 424, 340, 420, 338, 426,
419, 427, 428, 429, 351, 430, 421, 431, 418, 433,
434, 425, 435, 436, 97, 437, 438, 439, 446, 336,
420, 426, 419, 427, 428, 447, 429, 430, 421, 338,
431, 350, 433, 434, 435, 416, 436, 437, 416, 438,
440, 416, 416, 440, 416, 416, 440, 416, 449, 440,
416, 450, 443, 448, 340, 451, 432, 452, 442, 453,
454, 455, 310, 457, 458, 459, 444, 460, 445, 461,
97, 449, 456, 463, 450, 443, 462, 304, 451, 452,
442, 453, 454, 473, 455, 457, 458, 459, 444, 460,
445, 440, 461, 464, 440, 456, 464, 440, 462, 440,
440, 464, 440, 440, 464, 473, 440, 466, 470, 336,
471, 472, 340, 474, 338, 475, 477, 478, 467, 479,
468, 480, 481, 482, 97, 483, 484, 487, 469, 485,
466, 486, 303, 464, 302, 474, 464, 475, 477, 478,
467, 479, 468, 287, 480, 481, 482, 483, 476, 484,
469, 485, 488, 486, 464, 488, 464, 464, 491, 464,
496, 336, 493, 490, 502, 464, 492, 497, 464, 488,
494, 338, 488, 498, 340, 499, 500, 501, 506, 279,
495, 503, 507, 508, 509, 510, 490, 502, 511, 504,
97, 488, 491, 512, 488, 493, 277, 499, 500, 501,
492, 506, 495, 494, 507, 508, 509, 513, 510, 515,
513, 511, 491, 493, 505, 488, 488, 516, 488, 488,
492, 494, 518, 336, 519, 517, 520, 340, 338, 523,
525, 503, 527, 528, 515, 529, 530, 524, 531, 504,
97, 537, 516, 532, 526, 338, 513, 533, 517, 513,
533, 515, 513, 525, 527, 513, 528, 529, 530, 516,
521, 531, 536, 336, 538, 340, 526, 522, 523, 541,
542, 545, 543, 544, 535, 547, 524, 549, 97, 546,
556, 550, 533, 548, 551, 533, 533, 551, 554, 533,
539, 541, 338, 542, 543, 544, 535, 540, 553, 336,
549, 555, 340, 556, 557, 558, 559, 560, 562, 545,
547, 97, 539, 551, 564, 561, 551, 546, 548, 540,
565, 567, 336, 565, 569, 340, 568, 557, 558, 559,
338, 562, 570, 571, 560, 572, 573, 574, 563, 582,
97, 565, 561, 576, 565, 577, 579, 336, 577, 580,
581, 340, 583, 338, 584, 570, 571, 572, 573, 574,
585, 582, 586, 587, 97, 593, 577, 97, 575, 577,
588, 590, 336, 588, 583, 591, 594, 584, 595, 338,
592, 340, 596, 585, 586, 597, 587, 599, 593, 588,
575, 600, 588, 598, 600, 602, 336, 603, 605, 594,
595, 338, 604, 340, 596, 606, 607, 608, 597, 609,
599, 600, 610, 615, 600, 610, 598, 612, 336, 613,
605, 614, 340, 338, 616, 617, 619, 606, 607, 608,
621, 609, 631, 618, 620, 615, 610, 622, 788, 610,
622, 624, 336, 625, 626, 340, 616, 338, 627, 629,
617, 619, 622, 621, 631, 622, 628, 630, 618, 620,
632, 634, 336, 632, 635, 636, 340, 627, 338, 629,
637, 632, 274, 638, 632, 628, 638, 630, 640, 336,
641, 642, 340, 643, 338, 638, 645, 273, 638, 645,
643, 644, 637, 647, 336, 648, 649, 340, 644, 338,
645, 650, 272, 645, 650, 652, 336, 653, 654, 340,
650, 338, 655, 650, 658, 655, 657, 336, 338, 659,
340, 655, 660, 271, 655, 660, 662, 336, 663, 664,
340, 660, 338, 665, 660, 668, 665, 667, 336, 338,
669, 340, 665, 670, 256, 665, 670, 672, 336, 673,
674, 340, 670, 338, 675, 670, 678, 675, 677, 336,
338, 679, 340, 675, 675, 243, 675, 675, 680, 336,
681, 682, 340, 684, 338, 683, 336, 338, 685, 340,
686, 336, 687, 688, 340, 690, 338, 689, 336, 338,
691, 340, 692, 336, 693, 694, 340, 696, 338, 695,
336, 338, 697, 340, 698, 336, 699, 700, 340, 702,
338, 701, 336, 338, 703, 340, 704, 336, 705, 706,
340, 708, 338, 707, 336, 338, 709, 340, 710, 336,
711, 712, 340, 714, 338, 713, 336, 338, 715, 340,
716, 336, 717, 718, 340, 720, 338, 719, 336, 338,
721, 340, 722, 336, 723, 724, 340, 726, 338, 725,
336, 338, 727, 340, 728, 336, 729, 730, 340, 732,
338, 731, 336, 338, 733, 340, 734, 336, 735, 736,
340, 738, 338, 737, 336, 338, 739, 340, 740, 336,
741, 742, 340, 744, 338, 743, 336, 338, 745, 340,
746, 336, 747, 748, 340, 750, 338, 749, 336, 338,
751, 340, 752, 336, 753, 754, 340, 756, 338, 755,
336, 338, 757, 340, 758, 336, 759, 760, 340, 762,
338, 761, 336, 338, 763, 340, 764, 336, 765, 766,
340, 768, 338, 767, 336, 338, 769, 340, 770, 336,
771, 772, 340, 774, 338, 773, 336, 338, 775, 340,
776, 336, 777, 778, 340, 780, 338, 779, 336, 338,
781, 340, 782, 336, 783, 784, 340, 786, 338, 785,
336, 338, 787, 340, 24, 24, 24, 24, 24, 24,
53, 53, 53, 53, 53, 53, 65, 65, 65, 65,
65, 65, 67, 67, 67, 67, 67, 67, 70, 70,
70, 70, 70, 70, 73, 73, 73, 73, 73, 73,
76, 76, 76, 76, 76, 76, 124, 242, 124, 124,
124, 124, 125, 240, 238, 125, 125, 125, 127, 127,
127, 127, 127, 127, 132, 237, 132, 233, 132, 132,
134, 134, 134, 134, 134, 134, 139, 204, 139, 139,
139, 141, 788, 141, 141, 141, 141, 203, 195, 187,
186, 182, 154, 154, 142, 140, 133, 126, 122, 119,
119, 96, 101, 96, 788, 66, 66, 23, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788
} ;
static yyconst flex_int16_t yy_chk[1969] =
{ 0,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 11, 4, 11, 12, 4, 12, 4, 13, 4,
13, 5, 5, 4, 5, 32, 4, 5, 32, 7,
7, 5, 15, 6, 6, 7, 6, 15, 5, 6,
16, 8, 8, 6, 19, 16, 4, 8, 20, 4,
6, 14, 17, 14, 18, 8, 19, 17, 833, 18,
20, 5, 33, 33, 34, 36, 37, 34, 36, 37,
832, 38, 43, 6, 38, 43, 64, 64, 8, 21,
21, 40, 43, 41, 40, 21, 41, 49, 72, 72,
49, 38, 72, 72, 37, 21, 21, 21, 21, 97,
40, 21, 97, 41, 21, 43, 80, 82, 21, 21,
21, 81, 42, 38, 21, 42, 37, 83, 21, 21,
21, 21, 40, 42, 21, 41, 21, 84, 80, 82,
21, 21, 21, 831, 81, 52, 21, 22, 22, 830,
83, 39, 52, 22, 39, 52, 42, 39, 52, 84,
85, 39, 52, 22, 22, 22, 22, 87, 51, 22,
829, 51, 22, 86, 27, 27, 22, 22, 22, 88,
39, 52, 22, 85, 39, 52, 22, 22, 22, 22,
87, 27, 22, 51, 22, 86, 27, 828, 22, 22,
22, 93, 88, 44, 22, 27, 44, 45, 62, 62,
45, 89, 827, 44, 27, 51, 69, 69, 69, 27,
69, 45, 826, 44, 93, 62, 95, 27, 94, 98,
62, 825, 98, 89, 92, 92, 44, 100, 102, 62,
100, 102, 192, 192, 45, 44, 46, 46, 62, 95,
94, 92, 103, 62, 104, 103, 92, 104, 824, 105,
46, 62, 105, 46, 106, 92, 107, 106, 46, 107,
823, 116, 200, 107, 92, 108, 200, 46, 108, 92,
105, 109, 128, 46, 109, 128, 46, 92, 106, 145,
109, 46, 110, 116, 135, 110, 107, 135, 108, 46,
78, 144, 105, 110, 111, 146, 112, 111, 113, 112,
106, 113, 145, 109, 112, 78, 78, 78, 78, 114,
108, 78, 114, 144, 78, 111, 110, 146, 78, 78,
78, 121, 121, 113, 78, 239, 239, 112, 78, 78,
78, 78, 117, 114, 78, 117, 78, 111, 121, 822,
78, 78, 78, 121, 821, 113, 78, 129, 129, 136,
136, 129, 121, 136, 147, 114, 117, 131, 131, 131,
148, 121, 137, 137, 149, 151, 121, 137, 150, 152,
820, 153, 155, 155, 121, 156, 157, 147, 117, 158,
159, 160, 148, 161, 163, 164, 162, 149, 151, 162,
150, 166, 152, 153, 155, 155, 167, 156, 157, 165,
165, 158, 159, 160, 168, 161, 163, 164, 162, 169,
183, 162, 169, 166, 170, 819, 165, 170, 167, 171,
172, 165, 171, 172, 818, 173, 174, 168, 173, 174,
165, 175, 183, 176, 175, 173, 176, 177, 179, 165,
177, 179, 178, 176, 165, 178, 180, 181, 172, 180,
181, 174, 165, 188, 190, 175, 188, 190, 173, 178,
181, 184, 196, 179, 184, 196, 176, 205, 180, 817,
172, 185, 185, 174, 184, 256, 256, 175, 189, 189,
189, 178, 241, 181, 198, 179, 241, 198, 185, 205,
180, 191, 191, 185, 816, 191, 206, 184, 193, 193,
193, 210, 185, 197, 197, 199, 199, 207, 197, 199,
208, 185, 201, 201, 209, 212, 185, 201, 211, 206,
213, 815, 214, 210, 185, 215, 814, 216, 217, 217,
207, 218, 813, 208, 219, 220, 221, 209, 212, 221,
211, 271, 271, 213, 214, 217, 812, 234, 215, 216,
217, 811, 222, 810, 218, 222, 219, 220, 223, 217,
224, 223, 225, 224, 226, 225, 227, 226, 217, 227,
234, 228, 227, 217, 228, 230, 226, 229, 230, 231,
229, 217, 231, 229, 809, 232, 244, 231, 232, 235,
236, 236, 235, 245, 250, 227, 247, 230, 249, 226,
251, 808, 252, 253, 254, 255, 229, 236, 244, 235,
231, 258, 236, 807, 259, 806, 245, 250, 247, 230,
249, 236, 269, 251, 252, 253, 260, 254, 255, 260,
236, 235, 805, 275, 258, 236, 259, 261, 262, 263,
261, 262, 263, 236, 269, 264, 265, 263, 264, 265,
266, 268, 276, 266, 268, 275, 277, 264, 266, 267,
278, 268, 267, 265, 270, 283, 263, 270, 279, 281,
263, 282, 277, 267, 287, 276, 797, 284, 285, 286,
264, 266, 278, 288, 268, 265, 270, 283, 263, 289,
302, 302, 281, 287, 282, 277, 267, 287, 279, 284,
285, 286, 796, 290, 291, 288, 290, 291, 270, 332,
292, 293, 289, 292, 293, 287, 294, 332, 295, 294,
279, 295, 296, 300, 298, 296, 297, 298, 305, 297,
299, 293, 295, 299, 301, 306, 297, 787, 294, 296,
297, 301, 301, 303, 301, 300, 307, 303, 298, 304,
304, 305, 308, 293, 309, 295, 310, 306, 311, 297,
294, 296, 312, 297, 313, 316, 786, 317, 318, 307,
298, 319, 320, 321, 308, 785, 321, 309, 310, 322,
323, 311, 322, 323, 312, 549, 313, 337, 316, 317,
318, 337, 324, 319, 320, 324, 326, 325, 327, 326,
325, 327, 328, 329, 327, 328, 329, 335, 335, 331,
324, 325, 331, 330, 342, 326, 330, 331, 333, 339,
339, 343, 329, 341, 350, 344, 333, 327, 345, 351,
346, 348, 324, 353, 325, 354, 342, 326, 355, 500,
331, 330, 349, 343, 329, 356, 341, 344, 367, 367,
349, 345, 346, 348, 350, 353, 499, 357, 354, 351,
357, 355, 358, 330, 370, 358, 359, 356, 360, 359,
361, 360, 362, 361, 363, 362, 350, 363, 365, 364,
366, 351, 364, 366, 362, 365, 365, 370, 365, 360,
371, 364, 368, 374, 361, 372, 368, 375, 363, 376,
366, 369, 369, 373, 377, 380, 478, 362, 381, 378,
382, 360, 383, 371, 364, 374, 361, 378, 372, 375,
363, 384, 366, 385, 452, 386, 373, 377, 380, 376,
408, 381, 382, 386, 383, 387, 388, 389, 387, 388,
389, 390, 352, 384, 390, 385, 391, 392, 347, 391,
392, 376, 395, 393, 394, 390, 393, 394, 397, 401,
395, 397, 398, 398, 399, 400, 400, 393, 399, 402,
391, 403, 404, 405, 315, 406, 397, 407, 390, 409,
410, 401, 411, 412, 415, 413, 414, 415, 422, 422,
393, 402, 391, 403, 404, 423, 405, 406, 397, 423,
407, 314, 409, 410, 411, 416, 412, 413, 416, 414,
417, 418, 419, 417, 418, 419, 420, 421, 425, 420,
421, 426, 419, 424, 424, 427, 432, 428, 418, 429,
430, 431, 280, 433, 434, 435, 420, 436, 421, 437,
439, 425, 432, 439, 426, 419, 438, 274, 427, 428,
418, 429, 430, 449, 431, 433, 434, 435, 420, 436,
421, 440, 437, 441, 440, 432, 441, 442, 438, 443,
442, 444, 443, 445, 444, 449, 445, 442, 446, 446,
447, 448, 448, 450, 447, 451, 453, 454, 443, 455,
444, 456, 457, 458, 463, 459, 460, 463, 445, 461,
442, 462, 273, 464, 272, 450, 464, 451, 453, 454,
443, 455, 444, 257, 456, 457, 458, 459, 476, 460,
445, 461, 465, 462, 466, 465, 469, 466, 467, 469,
470, 470, 468, 466, 476, 467, 467, 471, 467, 468,
468, 471, 468, 472, 472, 473, 474, 475, 479, 248,
469, 477, 480, 481, 482, 483, 466, 476, 484, 477,
487, 488, 485, 487, 488, 486, 246, 473, 474, 475,
485, 479, 469, 486, 480, 481, 482, 489, 483, 490,
489, 484, 491, 493, 505, 495, 490, 490, 495, 490,
491, 493, 496, 496, 497, 495, 498, 498, 497, 501,
502, 503, 506, 507, 511, 508, 509, 501, 510, 503,
512, 519, 511, 512, 505, 519, 513, 514, 495, 513,
514, 515, 517, 502, 506, 517, 507, 508, 509, 515,
521, 510, 518, 518, 520, 520, 505, 522, 523, 525,
526, 529, 527, 528, 517, 530, 523, 531, 532, 529,
539, 532, 533, 530, 534, 533, 535, 534, 537, 535,
521, 525, 537, 526, 527, 528, 517, 522, 536, 536,
531, 538, 538, 539, 540, 541, 542, 543, 544, 545,
547, 550, 521, 551, 550, 543, 551, 545, 547, 522,
552, 553, 553, 552, 555, 555, 554, 540, 541, 542,
554, 544, 556, 557, 560, 558, 559, 562, 563, 570,
564, 565, 560, 564, 565, 566, 567, 567, 566, 568,
569, 569, 571, 568, 572, 556, 557, 558, 559, 562,
573, 570, 574, 575, 576, 582, 577, 576, 563, 577,
578, 579, 579, 578, 571, 580, 583, 572, 584, 580,
581, 581, 585, 573, 574, 586, 575, 587, 582, 588,
563, 589, 588, 586, 589, 590, 590, 591, 593, 583,
584, 591, 592, 592, 585, 594, 595, 596, 597, 599,
587, 600, 601, 605, 600, 601, 597, 602, 602, 603,
593, 604, 604, 603, 606, 607, 608, 594, 595, 596,
609, 599, 621, 607, 608, 605, 610, 611, 243, 610,
611, 612, 612, 613, 614, 614, 606, 613, 615, 616,
617, 619, 622, 609, 621, 622, 615, 616, 617, 619,
623, 624, 624, 623, 625, 626, 626, 627, 625, 629,
631, 632, 242, 633, 632, 627, 633, 629, 634, 634,
635, 636, 636, 637, 635, 638, 639, 240, 638, 639,
643, 637, 631, 640, 640, 641, 642, 642, 643, 641,
645, 646, 238, 645, 646, 647, 647, 648, 649, 649,
650, 648, 651, 650, 653, 651, 652, 652, 653, 654,
654, 655, 656, 237, 655, 656, 657, 657, 658, 659,
659, 660, 658, 661, 660, 663, 661, 662, 662, 663,
664, 664, 665, 666, 233, 665, 666, 667, 667, 668,
669, 669, 670, 668, 671, 670, 673, 671, 672, 672,
673, 674, 674, 675, 676, 204, 675, 676, 677, 677,
678, 679, 679, 681, 678, 680, 680, 681, 682, 682,
683, 683, 684, 685, 685, 687, 684, 686, 686, 687,
688, 688, 689, 689, 690, 691, 691, 693, 690, 692,
692, 693, 694, 694, 695, 695, 696, 697, 697, 699,
696, 698, 698, 699, 700, 700, 701, 701, 702, 703,
703, 705, 702, 704, 704, 705, 706, 706, 707, 707,
708, 709, 709, 711, 708, 710, 710, 711, 712, 712,
713, 713, 714, 715, 715, 717, 714, 716, 716, 717,
718, 718, 719, 719, 720, 721, 721, 723, 720, 722,
722, 723, 724, 724, 725, 725, 726, 727, 727, 729,
726, 728, 728, 729, 730, 730, 731, 731, 732, 733,
733, 735, 732, 734, 734, 735, 736, 736, 737, 737,
738, 739, 739, 741, 738, 740, 740, 741, 742, 742,
743, 743, 744, 745, 745, 747, 744, 746, 746, 747,
748, 748, 749, 749, 750, 751, 751, 753, 750, 752,
752, 753, 754, 754, 755, 755, 756, 757, 757, 759,
756, 758, 758, 759, 760, 760, 761, 761, 762, 763,
763, 765, 762, 764, 764, 765, 766, 766, 767, 767,
768, 769, 769, 771, 768, 770, 770, 771, 772, 772,
773, 773, 774, 775, 775, 777, 774, 776, 776, 777,
778, 778, 779, 779, 780, 781, 781, 783, 780, 782,
782, 783, 784, 784, 789, 789, 789, 789, 789, 789,
790, 790, 790, 790, 790, 790, 791, 791, 791, 791,
791, 791, 792, 792, 792, 792, 792, 792, 793, 793,
793, 793, 793, 793, 794, 794, 794, 794, 794, 794,
795, 795, 795, 795, 795, 795, 798, 203, 798, 798,
798, 798, 799, 195, 187, 799, 799, 799, 800, 800,
800, 800, 800, 800, 801, 186, 801, 182, 801, 801,
802, 802, 802, 802, 802, 802, 803, 143, 803, 803,
803, 804, 141, 804, 804, 804, 804, 140, 133, 126,
123, 115, 90, 79, 75, 74, 71, 68, 63, 59,
56, 48, 35, 30, 23, 10, 9, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
788, 788, 788, 788, 788, 788, 788, 788
} ;
/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[76] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1,
1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, };
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
extern int pp_yy_flex_debug;
int pp_yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *pp_yytext;
#line 1 "pp_scanner.l"
/*
* Copyright (C) 2002, 2001, 2000, 1999 David Essex
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*/
/*%option noyywrap*/
#line 26 "pp_scanner.l"
/*#undef pp_yywrap*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
//#include "cobpp.h"
#include "htglobals.h"
/* definitions from YACC */
#include "pp_parser.tab.h"
/* #define DEBUG_COBPP_SCANNER 1 */
#define MAX_COPY_DEPTH 25
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 1024
//#define YY_READ_BUF_SIZE 1024 * 8
#endif
#define MAX_COPY_DEPTH 25
#define MAX_CPYNAME_LEN 65
#define MAXLINEBUF YY_READ_BUF_SIZE
#define MAXBUF 1025
#define FIXFORM_6 6
#define FIXFORM_7 7
#define FIXFORM_65 65
#define FIXFORM_71 71
#define FIXFORM_72 72
#define FIXFORM_73 73
#define FIXFORM_81 81
#define lexchar input
static struct fstack {
YY_BUFFER_STATE buffer;
char *filename;
int lineno;
struct copy_symbols *last_symbol;
} file_stack[MAX_COPY_DEPTH];
static struct copy_symbols {
struct copy_symbols *next;
char *value;
char *replacement;
} *copy_symbols=NULL;
struct copy_symbols *append_copy_symbols=NULL;
struct copy_symbols *append_replace_symbols=NULL;
char *include_cpybook;
char *include_cpylib;
char include_full_filename[MAXBUF];
char toktext[MAXLINEBUF+1];
char ibuf[MAXLINEBUF+1];
//extern FILE *pp_yylist;
FILE *pp_yylist;
static int fsp=0;
int i,j;
unsigned int ret_token;
int copy_state_sw = 0;
int copy_start_sw = 0;
int replace_state_sw = 0;
int replace_start_sw = 0;
int identifier_scan_sw = 0;
int initial_state = 0;
int lf_add = 0;
int quote_sw = 0;
unsigned int columnCount = 0;
static unsigned int lineNumber = 0;
static unsigned int lineNumber_prev = 0;
unsigned int lineCount = 1;
int lineno = 1;
static int zzlineno = 0;
//static int lineno_prev = 1;
static int zzlineno_prev = 1;
static int result_prev = 0;
static int fsp_prev = 0;
char *pp_filename=NULL;
void tabExpand(char *s1, char *s2);
/*void lexError( char * msg ); */
char *savename2(const char *s, int x1, int x2);
void adjust_counters(void);
#ifdef DEBUG_COBPP_SCANNER
char errbuf[MAXLINEBUF+1];
void debug_rtn (const char *s, unsigned long Ccnt, unsigned long Lcnt, int Len, const char *s1);
void debug_rtn_sssd (const char *s1, const char *s2, const char *s3, int z, int sw);
void debug_rtn2 (const char *s1, const char *s2, int sw1, int sw2, int sw3, int sw);
void debug_rtn_dump (const char *s, const char *s1, int fsln, int fsi, int gln);
#define DEBUG_RTN(msg) debug_rtn (msg, columnCount, lineCount, pp_yyleng, pp_yytext);
#define DEBUG_RTN1(msg) debug_rtn (msg, columnCount, lineCount, pp_yyleng, pp_yytext+1);
#define DEBUG_RTN_NL(msg) debug_rtn (msg, columnCount, lineCount, pp_yyleng, "<NL>");
#define DEBUG_RTN_DUMP(msg, msg1) debug_rtn_dump (msg, msg1, lineno, fsp, lineCount);
#define DEBUG_RTN_FSP(msg) \
if (fsp > 0) { \
debug_rtn_sssd (msg, NULL, NULL, fsp, 7); \
}
#define DEBUG_RTN_FSP1(msg) debug_rtn_sssd (msg, NULL, NULL, fsp, 7);
#define DEBUG_RTN_STR1(msg) debug_rtn_sssd (msg, NULL, NULL, 0, 1);
#define DEBUG_RTN_STR2(msg1, msg2) debug_rtn_sssd (msg1, msg2, NULL, 0, 3);
#define DEBUG_RTN_STR3(msg1, msg2, msg3) debug_rtn_sssd (msg1, msg2, msg3, 0, 15);
#define DEBUG_RTN_RLIST() \
for (cs=copy_symbols, i=0; cs != NULL; cs=cs->next, i++) { \
fprintf(stderr, "lextrace: Replace list (%02d) :%s: by :%s:\n", \
i, \
cs->value, \
cs->replacement); \
}
#define DEBUG_RTN_RLIST2() \
for (tmp = append_copy_symbols,i=0; tmp!=NULL; tmp=tmp->next, i++) { \
fprintf(stderr, "lextrace: dump2 copy_symbols(%d) value=%s replacement=%s\n", \
i, \
tmp->value, \
tmp->replacement \
); \
}
#define DEBUG_RTN_RLIST3() \
for (tmp = file_stack[fsp].last_symbol, i=0; tmp!=NULL; tmp=tmp->next, i++) { \
fprintf(stderr, "lextrace: dump3(%d) level=%d, value=%s, replacement=%s\n", \
i, \
fsp, \
tmp->value, \
tmp->replacement \
); \
}
#define DEBUG_RTN_RLIST4() \
for (tmp = append_copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \
fprintf(stderr, "lextrace: add_copy_replacement dump4(%d): value=%s replacement=%s\n", \
i, \
tmp->value, \
tmp->replacement \
); \
}
#define DEBUG_RTN_RLIST5() \
for (tmp = append_copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \
fprintf(stderr, "lextrace: add_replace_replacement dump4(%d): value=%s replacement=%s\n", \
i, \
tmp->value, \
tmp->replacement \
); \
}
#define DEBUG_RTN_DLIST(msg1, msg2, msg3) debug_rtn_sssd (msg1, msg2, msg3, fsp, 106);
#define DEBUG_RTN_FIXLEN(msg1, zz, msg2) debug_rtn_sssd (msg1, msg2, NULL, zz, 26);
#define DEBUG_RTN_LEX1() \
for (tmp = copy_symbols, i=0; tmp!=NULL; tmp=tmp->next, i++) { \
fprintf(stderr, "lextrace: <FREE>{blank}*{eol} copy_symbols(%d) value=%s replacement=%s\n", \
i, \
tmp->value, \
tmp->replacement \
); \
}
#define DEBUG_RTN_LEX2() \
if (copy_state_sw != 0) { \
fprintf(stderr, \
"lextrace: TOK_PSEUDO_TEXT :%s: copy_state_sw=%d\n", \
pp_yytext, copy_state_sw); \
} \
else{ \
fprintf(stderr, \
"lextrace: TOK_PSEUDO_TEXT :%s: replace_state_sw=%d\n", \
pp_yytext, replace_state_sw); \
}
#define DEBUG_RTN_LEX3(msg1, msg2) debug_rtn2 (msg1, msg2, 0, 0, 0, 3);
#define DEBUG_RTN_LEX15(msg1, msg2, i1) debug_rtn2 (msg1, msg2, i1, 0, 0, 15);
#define DEBUG_RTN_LEX35(msg1, i1, i2) debug_rtn2 (msg1, NULL, i1, i2, 0, 35);
#define DEBUG_RTN_LEX105(msg1, msg2, i1, i2) debug_rtn2 (msg1, msg2, i1, i2, 0, 105);
#define DEBUG_RTN_LEX385(msg1, i1, i2, i3) debug_rtn2 (msg1, NULL, i1, i2, i3, 385);
#else
#define DEBUG_RTN(msg)
#define DEBUG_RTN0(msg)
#define DEBUG_RTN1(msg)
#define DEBUG_RTN_NL(msg)
#define DEBUG_RTN_DUMP(msg, msg1)
#define DEBUG_RTN_FSP(msg)
#define DEBUG_RTN_FSP1(msg)
#define DEBUG_RTN_STR1(msg)
#define DEBUG_RTN_STR2(msg1, msg2)
#define DEBUG_RTN_STR3(msg1, msg2, msg3)
#define DEBUG_RTN_RLIST()
#define DEBUG_RTN_DLIST(msg1, msg2, msg3)
#define DEBUG_RTN_RLIST2()
#define DEBUG_RTN_RLIST3()
#define DEBUG_RTN_RLIST4()
#define DEBUG_RTN_RLIST5()
#define DEBUG_RTN_FIXLEN(msg1, zz, msg2)
#define DEBUG_RTN_LEX1()
#define DEBUG_RTN_LEX2()
#define DEBUG_RTN_LEX3(msg1, msg2)
#define DEBUG_RTN_LEX15(msg1, msg2, i1)
#define DEBUG_RTN_LEX35(msg1, i1, i2)
#define DEBUG_RTN_LEX105(msg1, msg2, i1, i2)
#define DEBUG_RTN_LEX385(msg1, i1, i2, i3)
#endif
void pp_setup_scanner_state(void);
void set_scanner_state(int i0, int i1);
void copy_switch(void);
/* void copy_do_replacements(char *buffer); */
void do_copy_replacements(char *buffer);
void do_replace_replacements(char *buffer);
int lex_fgets(char *buf, int maxsize);
#define YY_INPUT(buf,result,max_size) \
{ \
result = pp_lex_fgets( buf, max_size ); \
}
#line 1446 "pp_scanner.c"
#define INITIAL 0
#define FREE 1
#define FIXED_7 2
#define FIXED_AB 3
#define COMMENT 4
#define DQ_LITERAL_FIXED 5
#define DQ_LITERAL_FREE 6
#define SQ_LITERAL_FIXED 7
#define SQ_LITERAL_FREE 8
#define PSEUDO_TEXT 9
#define COMMENT_ENTRY 10
#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int pp_yylex_destroy (void );
int pp_yyget_debug (void );
void pp_yyset_debug (int debug_flag );
YY_EXTRA_TYPE pp_yyget_extra (void );
void pp_yyset_extra (YY_EXTRA_TYPE user_defined );
FILE *pp_yyget_in (void );
void pp_yyset_in (FILE * in_str );
FILE *pp_yyget_out (void );
void pp_yyset_out (FILE * out_str );
int pp_yyget_leng (void );
char *pp_yyget_text (void );
int pp_yyget_lineno (void );
void pp_yyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int pp_yywrap (void );
#else
extern int pp_yywrap (void );
#endif
#endif
static void yyunput (int c,char *buf_ptr );
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO do { if (fwrite( pp_yytext, pp_yyleng, 1, pp_yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
for ( n = 0; n < max_size && \
(c = getc( pp_yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( pp_yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = fread(buf, 1, max_size, pp_yyin))==0 && ferror(pp_yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(pp_yyin); \
} \
}\
\
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* end tables serialization structures and prototypes */
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
extern int pp_yylex (void);
#define YY_DECL int pp_yylex (void)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after pp_yytext and pp_yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
if ( pp_yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(pp_yytext[pp_yyleng - 1] == '\n'); \
YY_USER_ACTION
/** The main scanner function which does all the work.
*/
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
#line 280 "pp_scanner.l"
struct copy_symbols *tmp=NULL;
#line 1654 "pp_scanner.c"
if ( !(yy_init) )
{
(yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
if ( ! pp_yyin )
pp_yyin = stdin;
if ( ! pp_yyout )
pp_yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
pp_yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
pp_yy_create_buffer(pp_yyin,YY_BUF_SIZE );
}
pp_yy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
/* Support of pp_yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 789 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 788 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
yy_find_action:
yy_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
int yyl;
for ( yyl = 0; yyl < pp_yyleng; ++yyl )
if ( pp_yytext[yyl] == '\n' )
pp_yylineno++;
;
}
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = (yy_hold_char);
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
case 1:
#line 290 "pp_scanner.l"
case 2:
#line 291 "pp_scanner.l"
case 3:
#line 292 "pp_scanner.l"
case 4:
YY_RULE_SETUP
#line 292 "pp_scanner.l"
{
DEBUG_RTN ("^* ^/ ^$ *>")
columnCount = columnCount + pp_yyleng;
BEGIN(COMMENT);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 303 "pp_scanner.l"
{
DEBUG_RTN ("D ")
columnCount = columnCount + pp_yyleng;
/* if (globalEnvPtr->IncDebugLines == 0) {*/
if(HTG_debug_lines_flag == FALSE) {
BEGIN(COMMENT);
}
else {
fprintf(pp_yyout, " ");
}
}
YY_BREAK
case 6:
YY_RULE_SETUP
#line 316 "pp_scanner.l"
{
DEBUG_RTN ("-")
columnCount = columnCount + pp_yyleng;
fprintf(pp_yyout, " ");
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 327 "pp_scanner.l"
{
DEBUG_RTN ("COPY")
columnCount = columnCount + pp_yyleng;
copy_state_sw++;
identifier_scan_sw++;
DEBUG_RTN_LEX35("lextrace: TOK_COPY=%d, copy_state_sw=%d;\n", TOK_COPY, copy_state_sw)
return TOK_COPY;
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 340 "pp_scanner.l"
{
DEBUG_RTN ("OF")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX35("lextrace: TOK_OF=%d, copy_state_sw=%d;\n", TOK_OF, copy_state_sw)
if (copy_state_sw != 0) {
return TOK_OF;
}
else {
ECHO;
}
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 356 "pp_scanner.l"
{
DEBUG_RTN ("OFF")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX35("lextrace: TOK_OFF=%d, replace_state_sw=%d;\n", TOK_OFF, replace_state_sw)
if (replace_state_sw != 0) {
return TOK_OFF;
}
else {
ECHO;
}
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 372 "pp_scanner.l"
{
DEBUG_RTN ("IN")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX35("lextrace: TOK_IN=%d, copy_state_sw=%d;\n", TOK_IN, copy_state_sw)
if (copy_state_sw != 0) {
return TOK_IN;
}
else {
ECHO;
}
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 388 "pp_scanner.l"
{
DEBUG_RTN ("BY")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX385("lextrace: TOK_BY=%d, copy_state_sw=%d, replace_state_sw=%d;\n" , TOK_BY, copy_state_sw, replace_state_sw)
if ((copy_state_sw != 0) || (replace_state_sw != 0)) {
return TOK_BY;
}
else {
ECHO;
}
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 404 "pp_scanner.l"
{
DEBUG_RTN ("REPLACE")
columnCount = columnCount + pp_yyleng;
replace_state_sw++;
identifier_scan_sw++;
DEBUG_RTN_LEX35("lextrace: TOK_REPLACE=%d, replace_state_sw=%d;\n", TOK_REPLACE, replace_state_sw)
return TOK_REPLACE;
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 417 "pp_scanner.l"
{
DEBUG_RTN ("REPLACING")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX35("lextrace: TOK_REPLACING=%d, copy_state_sw=%d;\n", TOK_REPLACING, copy_state_sw)
if (copy_state_sw != 0) {
return TOK_REPLACING;
}
else {
ECHO;
}
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 433 "pp_scanner.l"
{
DEBUG_RTN ("SOURCE-COMPUTER")
identifier_scan_sw++;
columnCount = columnCount + pp_yyleng;
ECHO;
return TOK_SOURCE_COMPUTER;
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 443 "pp_scanner.l"
{
DEBUG_RTN ("^{blank}{0,4}AUTHOR{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
/* ECHO; */
BEGIN(COMMENT_ENTRY);
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 452 "pp_scanner.l"
{
DEBUG_RTN ("^{blank}{0,4}INSTALLATION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
/* ECHO; */
BEGIN(COMMENT_ENTRY);
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 461 "pp_scanner.l"
{
DEBUG_RTN ("^{blank}{0,4}DATE-WRITTEN{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
/* ECHO; */
BEGIN(COMMENT_ENTRY);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 470 "pp_scanner.l"
{
DEBUG_RTN ("^{blank}{0,4}DATE-COMPILED{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
/* ECHO; */
BEGIN(COMMENT_ENTRY);
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 479 "pp_scanner.l"
{
DEBUG_RTN ("^{blank}{0,4}SECURITY{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
/* ECHO; */
BEGIN(COMMENT_ENTRY);
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 488 "pp_scanner.l"
{
DEBUG_RTN ("WITH")
columnCount = columnCount + pp_yyleng;
ECHO;
return TOK_WITH;
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 497 "pp_scanner.l"
{
DEBUG_RTN ("DEBUGGING")
columnCount = columnCount + pp_yyleng;
ECHO;
return TOK_DEBUGGING;
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 506 "pp_scanner.l"
{
DEBUG_RTN ("MODE")
columnCount = columnCount + pp_yyleng;
ECHO;
return TOK_MODE;
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 515 "pp_scanner.l"
{
DEBUG_RTN ("{blank}+")
columnCount = columnCount + pp_yyleng;
ECHO;
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 523 "pp_scanner.l"
{
DEBUG_RTN ("{DQuote}")
columnCount++;
quote_sw = 2;
if (copy_state_sw != 0) {
strncpy(toktext, pp_yytext, MAXBUF);
}
else {
ECHO;
}
set_scanner_state(DQ_LITERAL_FIXED, DQ_LITERAL_FREE);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 538 "pp_scanner.l"
{
DEBUG_RTN ("{SQuote}")
columnCount++;
quote_sw = 1;
if (copy_state_sw != 0) {
strncpy(toktext, pp_yytext, MAXBUF);
}
else {
ECHO;
}
set_scanner_state(SQ_LITERAL_FIXED, SQ_LITERAL_FREE);
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 553 "pp_scanner.l"
{
DEBUG_RTN ("{Numeric}")
columnCount = columnCount + pp_yyleng;
if (copy_state_sw != 0) {
strncpy(toktext, pp_yytext, MAXBUF);
pp_yylval.str = savename2(toktext, 0, 0);
return(TOK_LITERAL);
}
else {
ECHO;
}
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 569 "pp_scanner.l"
{
DEBUG_RTN ("{EqSign2}")
columnCount = columnCount + pp_yyleng;
if ((copy_state_sw != 0) || (replace_state_sw != 0)) {
DEBUG_RTN_LEX2()
strncpy(toktext, pp_yytext, MAXBUF);
/*pp_yylval.str = savename2(toktext, 2, 2);*/
/*return(TOK_PSEUDO_TEXT);*/
BEGIN(PSEUDO_TEXT);
}
else {
ECHO;
}
}
YY_BREAK
case 28:
/* rule 28 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up pp_yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up pp_yytext again */
YY_RULE_SETUP
#line 588 "pp_scanner.l"
{
DEBUG_RTN ("{Period}")
columnCount++;
/*if ((copy_state_sw != 0) || (replace_state_sw != 0) || (identifier_scan_sw != 0)) {*/
if ((copy_state_sw != 0) || (replace_state_sw != 0)) {
return(TOK_PERIOD);
}
else {
ECHO;
if (identifier_scan_sw != 0) {
return(TOK_PERIOD);
}
}
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 605 "pp_scanner.l"
{
DEBUG_RTN ("({AlphaNum}*{Alpha}+{AlphaNum}*){1,30}")
columnCount = columnCount + pp_yyleng;
if (identifier_scan_sw != 0) {
DEBUG_RTN_LEX15("lextrace: TOK_IDENTIFIER :%s: identifier_scan_sw=%d\n", pp_yytext, identifier_scan_sw)
strncpy(toktext, pp_yytext, MAXBUF);
pp_yylval.str = savename2(toktext, 0, 0);
}
if ((copy_state_sw != 0) || (replace_state_sw != 0)) {
return(TOK_IDENTIFIER);
}
else {
ECHO;
if (identifier_scan_sw != 0) {
return(TOK_IDENTIFIER);
}
}
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 632 "pp_scanner.l"
{
DEBUG_RTN ("COMMA")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX35("lextrace: TOK_IN=%d, copy_state_sw=%d;\n", TOK_COMMA, copy_state_sw)
if (copy_state_sw != 0) {
return TOK_COMMA;
}
else {
ECHO;
}
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 648 "pp_scanner.l"
{
DEBUG_RTN ("*>")
columnCount = columnCount + pp_yyleng;
/* comment line remove */
BEGIN(COMMENT);
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 657 "pp_scanner.l"
{
DEBUG_RTN (".")
columnCount++;
if ((copy_state_sw != 0) || (replace_state_sw != 0)) {
return(0);
}
else {
ECHO;
}
}
YY_BREAK
case 33:
#line 675 "pp_scanner.l"
case 34:
YY_RULE_SETUP
#line 675 "pp_scanner.l"
{
DEBUG_RTN ("^* *>")
columnCount = columnCount + pp_yyleng;
BEGIN(COMMENT);
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 683 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}REMARKS{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 692 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}ENVIRONMENT{blank}+DIVISION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 701 "pp_scanner.l"
{
DEBUG_RTN ("")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 710 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}INPUT-OUTPUT{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 719 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}DATA{blank}+DIVISION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 728 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}FILE{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 737 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}WORKING-STORAGE{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 746 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}LINKAGE{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 755 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}COMMUNICATION{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 764 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}REPORT{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 773 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}SCREEN{blank}+SECTION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 782 "pp_scanner.l"
{
DEBUG_RTN ("{blank}{0,4}PROCEDURE{blank}+DIVISION{blank}*{Period}")
columnCount = columnCount + pp_yyleng;
ECHO;
set_scanner_state(FIXED_AB, FREE);
}
YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
#line 791 "pp_scanner.l"
{
DEBUG_RTN_NL ("{eol}")
lineno++;
lineCount++;
columnCount=7;
ECHO;
}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 801 "pp_scanner.l"
{
DEBUG_RTN (".")
columnCount++;
}
YY_BREAK
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
#line 809 "pp_scanner.l"
{
DEBUG_RTN_NL ("{blank}*{eol}")
lineno++;
lineCount++;
columnCount=7;
/*ECHO; */
fprintf(pp_yyout, "\n");
DEBUG_RTN_LEX385("debug FIXED_AB - {blank}*{eol}(%lu,%lu): lf_add=%d,\n", lineCount, columnCount, lf_add)
for (i=0; i<lf_add; i++) {
fprintf(pp_yyout, "\n");
}
lf_add=0;
if (copy_start_sw != 0) {
copy_switch();
}
BEGIN(FIXED_7);
}
YY_BREAK
case 50:
/* rule 50 can match eol */
YY_RULE_SETUP
#line 833 "pp_scanner.l"
{
DEBUG_RTN_NL ("{blank}*{eol}")
lineno++;
lineCount++;
columnCount=0;
/*ECHO; */
fprintf(pp_yyout, "\n");
for (i=0; i<lf_add; i++) {
fprintf(pp_yyout, "\n");
}
lf_add=0;
if (copy_start_sw != 0) {
DEBUG_RTN_LEX1()
copy_switch();
}
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 858 "pp_scanner.l"
{
DEBUG_RTN ("D")
columnCount++;
/* if (globalEnvPtr->IncDebugLines == 0) { */
if(HTG_debug_lines_flag == FALSE) {
BEGIN(COMMENT);
}
else {
fprintf(pp_yyout, " ");
BEGIN(FIXED_AB);
}
}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 873 "pp_scanner.l"
{
DEBUG_RTN ("{blank}")
columnCount = columnCount + pp_yyleng;
ECHO;
BEGIN(FIXED_AB);
}
YY_BREAK
case 53:
YY_RULE_SETUP
#line 882 "pp_scanner.l"
{
DEBUG_RTN ("{invalid7}")
/* globalEnvPtr->errFlag++; */
errcnt++;
fprintf(stderr,
"%s:%d:(3) Invaild character (%c) in column %d.\n",
pp_filename,
lineCount,
pp_yytext[0],
columnCount
);
columnCount = columnCount + pp_yyleng;
BEGIN(COMMENT);
}
YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
#line 900 "pp_scanner.l"
{
DEBUG_RTN_NL ("{eol}")
lineno++;
lineCount++;
columnCount=7;
ECHO;
DEBUG_RTN_LEX385("debug FIXED_7 - {eol}(%lu,%lu): lf_add=%d,\n", lineCount, columnCount, lf_add)
for (i=0; i<lf_add; i++) {
fprintf(pp_yyout, "\n");
}
lf_add=0;
if (copy_start_sw != 0) {
copy_switch();
}
BEGIN(FIXED_7);
}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 926 "pp_scanner.l"
{
DEBUG_RTN ("[^<NL>=]+")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX2()
strncat(toktext, pp_yytext, MAXBUF);
}
YY_BREAK
case 56:
*yy_cp = (yy_hold_char); /* undo effects of setting up pp_yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up pp_yytext again */
YY_RULE_SETUP
#line 937 "pp_scanner.l"
{
DEBUG_RTN ("{EqSign}/[^<NL>=]+")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX2()
strncat(toktext, pp_yytext, MAXBUF);
}
YY_BREAK
case 57:
YY_RULE_SETUP
#line 948 "pp_scanner.l"
{
DEBUG_RTN ("{EqSign2}")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX2()
strncat(toktext, pp_yytext, MAXBUF);
pp_yylval.str = savename2(toktext, 2, 2);
set_scanner_state(FIXED_AB, FREE);
return(TOK_PSEUDO_TEXT);
}
YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
#line 962 "pp_scanner.l"
{
DEBUG_RTN1 ("{eol}-{blank}{4,65}{DQuote}")
/* Continuation line remove */
/* lineno_prev = lineno; */
/* yylineno_prev = lineNumber; */
lineno++;
lineCount++;
columnCount = pp_yyleng - 1;
lf_add++;
/*BEGIN(DQ_LITERAL_FIXED); */
}
YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 980 "pp_scanner.l"
{
DEBUG_RTN ("{DQuote}{blank}*{eol}?{blank}*&{blank}*{eol}?{blank}*{DQuote}")
adjust_counters();
}
YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 987 "pp_scanner.l"
{
DEBUG_RTN1 ("{eol}-{blank}{4,65}{DQuote}")
/* Continuation line remove */
/* lineno_prev = lineno; */
/* yylineno_prev = lineNumber; */
lineno++;
lineCount++;
columnCount = pp_yyleng - 1;
lf_add++;
/*BEGIN(DQ_LITERAL_FIXED); */
}
YY_BREAK
case 61:
/* rule 61 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up pp_yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up pp_yytext again */
YY_RULE_SETUP
#line 1001 "pp_scanner.l"
{
DEBUG_RTN ("{DQuote}/{NoDQuote}")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX105("lextrace: DQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw)
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
/* pp_yylval.str = savename2(toktext, 1, 1); */
pp_yylval.str = savename2(toktext, 0, 0);
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
return(TOK_LITERAL);
}
else {
ECHO;
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
}
}
YY_BREAK
case 62:
YY_RULE_SETUP
#line 1024 "pp_scanner.l"
{
DEBUG_RTN ("{DQuote}{2}")
columnCount = columnCount + pp_yyleng;
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
}
else {
ECHO;
}
}
YY_BREAK
case 63:
YY_RULE_SETUP
#line 1039 "pp_scanner.l"
{
DEBUG_RTN ("{DQuote}")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw)
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
if (quote_sw == 1) {
/* pp_yylval.str = savename2(toktext, 1, 1); */
pp_yylval.str = savename2(toktext, 0, 0);
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
return(TOK_LITERAL);
}
}
else {
ECHO;
if (quote_sw == 1) {
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
}
}
}
YY_BREAK
case 64:
YY_RULE_SETUP
#line 1066 "pp_scanner.l"
{
DEBUG_RTN ("{NoQuoteEol}+")
/*columnCount++;*/
columnCount = columnCount + pp_yyleng;
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
}
else {
ECHO;
}
}
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
#line 1082 "pp_scanner.l"
{
DEBUG_RTN ("{eol}")
columnCount=0;
lineCount++;
lineno++;
if (copy_state_sw != 0) {
DEBUG_RTN_LEX15("lextrace: TOK_LITERAL :%s: copy_state_sw=%d\n", pp_yytext, copy_state_sw)
}
else {
set_scanner_state(FIXED_7, FREE);
}
}
YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
#line 1104 "pp_scanner.l"
{
DEBUG_RTN ("{SQuote}{blank}*{eol}?{blank}*&{blank}*{eol}?{blank}*{SQuote}")
adjust_counters();
}
YY_BREAK
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
#line 1111 "pp_scanner.l"
{
DEBUG_RTN1 ("{eol}-{blank}{4,65}{SQuote}")
/* Continuation line remove */
/* lineno_prev = lineno; */
/* yylineno_prev = lineNumber; */
lineno++;
lineCount++;
columnCount = pp_yyleng - 1;
lf_add++;
/* BEGIN(SQ_LITERAL_FIXED); */
}
YY_BREAK
case 68:
/* rule 68 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up pp_yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up pp_yytext again */
YY_RULE_SETUP
#line 1125 "pp_scanner.l"
{
DEBUG_RTN ("{SQuote}/{NoSQuote}")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw)
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
/* pp_yylval.str = savename2(toktext, 1, 1); */
pp_yylval.str = savename2(toktext, 0, 0);
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
return(TOK_LITERAL);
}
else {
ECHO;
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
}
}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 1148 "pp_scanner.l"
{
DEBUG_RTN ("{SQuote}{2}")
columnCount = columnCount + pp_yyleng;
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
}
else {
ECHO;
}
}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 1163 "pp_scanner.l"
{
DEBUG_RTN ("{SQuote}")
columnCount = columnCount + pp_yyleng;
DEBUG_RTN_LEX105("lextrace: SQuote :%s: copy_state_sw=%d, quote_sw=%d\n", pp_yytext, copy_state_sw, quote_sw)
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
if (quote_sw == 1) {
/* pp_yylval.str = savename2(toktext, 1, 1); */
pp_yylval.str = savename2(toktext, 0, 0);
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
return(TOK_LITERAL);
}
}
else {
ECHO;
if (quote_sw == 1) {
quote_sw = 0;
set_scanner_state(FIXED_AB, FREE);
}
}
}
YY_BREAK
case 71:
YY_RULE_SETUP
#line 1190 "pp_scanner.l"
{
DEBUG_RTN ("{NoSQuoteEol}+")
columnCount = columnCount + pp_yyleng;
if (copy_state_sw != 0) {
strcat(toktext, pp_yytext);
}
else {
ECHO;
}
}
YY_BREAK
case 72:
/* rule 72 can match eol */
YY_RULE_SETUP
#line 1205 "pp_scanner.l"
{
DEBUG_RTN ("{eol}")
columnCount=0;
lineCount++;
lineno++;
if (copy_state_sw != 0) {
DEBUG_RTN_LEX15("lextrace: TOK_LITERAL :%s: copy_state_sw=%d\n", pp_yytext, copy_state_sw)
}
else {
set_scanner_state(FIXED_7, FREE);
}
}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 1227 "pp_scanner.l"
{
DEBUG_RTN (".+")
columnCount = columnCount + pp_yyleng;
}
YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
#line 1234 "pp_scanner.l"
{
DEBUG_RTN_NL ("COMMENT - {eol} ")
lineno++;
lineCount++;
columnCount=0;
ECHO;
set_scanner_state(FIXED_7, FREE);
}
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(FREE):
case YY_STATE_EOF(FIXED_7):
case YY_STATE_EOF(FIXED_AB):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(DQ_LITERAL_FIXED):
case YY_STATE_EOF(DQ_LITERAL_FREE):
case YY_STATE_EOF(SQ_LITERAL_FIXED):
case YY_STATE_EOF(SQ_LITERAL_FREE):
case YY_STATE_EOF(PSEUDO_TEXT):
case YY_STATE_EOF(COMMENT_ENTRY):
#line 1246 "pp_scanner.l"
{
struct copy_symbols *cs=NULL,*cs1=NULL;
if (fsp == 0) {
DEBUG_RTN_FSP1("lextrace: receiving <<EOF>> for fsp = %d:\n")
yyterminate();
}
else {
// tmp = lineno;
// pp_yy_delete_buffer(YY_CURRENT_BUFFER );
// pp_yy_switch_to_buffer(file_stack[fsp].buffer );
// lineno = file_stack[ fsp ].line;
/* free all replacements in this dead context */
DEBUG_RTN_FSP1("lextrace: begin delete fsp = %d:\n")
cs1 = file_stack[fsp].last_symbol;
cs = copy_symbols;
if (cs == cs1)
copy_symbols = NULL;
while (cs) {
if (cs->next == cs1)
break;
cs = cs->next;
}
if (cs)
cs->next = NULL;
if (cs1) {
while (cs1) {
DEBUG_RTN_DLIST("lextrace: delete fsp=%d, value=%s, replacement=%s:\n", cs1->value, cs1->replacement)
if (cs1->value) free( cs1->value );
if (cs1->replacement) free( cs1->replacement );
cs = cs1->next;
cs1->next = NULL;
free( cs1 );
cs1 = cs;
cs = NULL;
}
}
pp_yy_delete_buffer(YY_CURRENT_BUFFER );
fsp--;
pp_yy_switch_to_buffer(file_stack[fsp].buffer );
if (pp_filename) { free (pp_filename); pp_filename=NULL;}
pp_filename = file_stack[fsp].filename;
lineno = file_stack[fsp].lineno;
zzlineno = file_stack[fsp].lineno;
fprintf (pp_yyout, "# %d \"%s\"\n", lineno, pp_filename);
}
}
YY_BREAK
case 75:
YY_RULE_SETUP
#line 1301 "pp_scanner.l"
ECHO;
YY_BREAK
#line 3003 "pp_scanner.c"
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed pp_yyin at a new source and called
* pp_yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
YY_CURRENT_BUFFER_LVALUE->yy_input_file = pp_yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
(yy_did_buffer_switch_on_eof) = 0;
if ( pp_yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* pp_yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
(yy_c_buf_p) =
(yytext_ptr) + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( );
yy_cp = (yy_c_buf_p);
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
(yy_c_buf_p) =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
yy_current_state = yy_get_previous_state( );
yy_cp = (yy_c_buf_p);
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of pp_yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer (void)
{
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = (yytext_ptr);
register int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
pp_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
pp_yyrestart(pp_yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pp_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
(yy_n_chars) += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 789 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
register int yy_is_jam;
register char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 789 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 788);
return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up pp_yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
if ( c == '\n' ){
--pp_yylineno;
}
(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
#else
static int input (void)
#endif
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
/* This was really a NUL. */
*(yy_c_buf_p) = '\0';
else
{ /* need more input */
int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
pp_yyrestart(pp_yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
if ( pp_yywrap( ) )
return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
(yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
*(yy_c_buf_p) = '\0'; /* preserve pp_yytext */
(yy_hold_char) = *++(yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
pp_yylineno++;
;
return c;
}
#endif /* ifndef YY_NO_INPUT */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void pp_yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
pp_yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
pp_yy_create_buffer(pp_yyin,YY_BUF_SIZE );
}
pp_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
pp_yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
void pp_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* pp_yypop_buffer_state();
* pp_yypush_buffer_state(new_buffer);
*/
pp_yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
pp_yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (pp_yywrap()) processing, but the only time this flag
* is looked at is after pp_yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
static void pp_yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
pp_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE pp_yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) pp_yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) pp_yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in pp_yy_create_buffer()" );
b->yy_is_our_buffer = 1;
pp_yy_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
* @param b a buffer created with pp_yy_create_buffer()
*
*/
void pp_yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
pp_yyfree((void *) b->yy_ch_buf );
pp_yyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a pp_yyrestart() or at EOF.
*/
static void pp_yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
pp_yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
/* If b is the current buffer, then pp_yy_init_buffer was _probably_
* called from pp_yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
b->yy_bs_lineno = 1;
b->yy_bs_column = 0;
}
b->yy_is_interactive = 0;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
void pp_yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
pp_yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
*
*/
void pp_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
pp_yyensure_buffer_stack();
/* This block is copied from pp_yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
/* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER)
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from pp_yy_switch_to_buffer. */
pp_yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
*
*/
void pp_yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
pp_yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
pp_yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
static void pp_yyensure_buffer_stack (void)
{
int num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
(yy_buffer_stack) = (struct yy_buffer_state**)pp_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in pp_yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
}
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)pp_yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in pp_yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
}
}
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE pp_yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) pp_yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
pp_yy_switch_to_buffer(b );
return b;
}
/** Setup the input buffer state to scan a string. The next call to pp_yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* pp_yy_scan_bytes() instead.
*/
YY_BUFFER_STATE pp_yy_scan_string (yyconst char * yystr )
{
return pp_yy_scan_bytes(yystr,strlen(yystr) );
}
/** Setup the input buffer state to scan the given bytes. The next call to pp_yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE pp_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) pp_yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in pp_yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = pp_yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in pp_yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
static void yy_fatal_error (yyconst char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up pp_yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
pp_yytext[pp_yyleng] = (yy_hold_char); \
(yy_c_buf_p) = pp_yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
pp_yyleng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*/
int pp_yyget_lineno (void)
{
return pp_yylineno;
}
/** Get the input stream.
*
*/
FILE *pp_yyget_in (void)
{
return pp_yyin;
}
/** Get the output stream.
*
*/
FILE *pp_yyget_out (void)
{
return pp_yyout;
}
/** Get the length of the current token.
*
*/
int pp_yyget_leng (void)
{
return pp_yyleng;
}
/** Get the current token.
*
*/
char *pp_yyget_text (void)
{
return pp_yytext;
}
/** Set the current line number.
* @param line_number
*
*/
void pp_yyset_lineno (int line_number )
{
pp_yylineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
*
* @see pp_yy_switch_to_buffer
*/
void pp_yyset_in (FILE * in_str )
{
pp_yyin = in_str ;
}
void pp_yyset_out (FILE * out_str )
{
pp_yyout = out_str ;
}
int pp_yyget_debug (void)
{
return pp_yy_flex_debug;
}
void pp_yyset_debug (int bdebug )
{
pp_yy_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
* This function is called from pp_yylex_destroy(), so don't allocate here.
*/
/* We do not touch pp_yylineno unless the option is enabled. */
pp_yylineno = 1;
(yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
(yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
pp_yyin = stdin;
pp_yyout = stdout;
#else
pp_yyin = (FILE *) 0;
pp_yyout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
* pp_yylex_init()
*/
return 0;
}
/* pp_yylex_destroy is for both reentrant and non-reentrant scanners. */
int pp_yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
pp_yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
pp_yypop_buffer_state();
}
/* Destroy the stack itself. */
pp_yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* pp_yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
}
/*
* Internal utility routines.
*/
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
void *pp_yyalloc (yy_size_t size )
{
return (void *) malloc( size );
}
void *pp_yyrealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
}
void pp_yyfree (void * ptr )
{
free( (char *) ptr ); /* see pp_yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 1301 "pp_scanner.l"
/* Expand tabs to spaces */
void tabExpand(char *s1, char *s2) {
int i, j, k, y, len, sw=0;
char delm = '0';
len = strlen(s2);
for (i=0, j=0; i<len; i++) {
if ((s2[i] == '\'') || (s2[i] == '"')) {
if (sw == 0) {
sw = 1;
delm = s2[i];
}
else {
if (s2[i] == delm) {
sw = 0;
delm = '0';
}
}
}
if ((s2[i] == '\t') && (sw == 0)) {
// k = ( globalEnvPtr->tab2space * ((j/globalEnvPtr->tab2space) + 1)) - j;
k = ( HTG_tab2space * ((j/HTG_tab2space) + 1)) - j;
y = j + k;
for (j=j; j<y; j++) {
s1[j] = ' ';
}
}
else {
s1[j] = s2[i];
j++;
}
}
s1[j] = CHR_EOS;
}
/*
void lexError( char * msg ) {
(void)fprintf(stderr,
"%s:%d: %s\n"
,pp_filename
,lineCount
,msg
);
// globalEnvPtr->errFlag++;
errcnt++;
return;
}
*/
int pp_yywrap(void) {
// pp_yywrap will be called to open files from the List of Files in the
// Global Env struct.
//
return 1;
}
char *savename2(const char *s, int x1, int x2) {
char *ap, *s1;
int len;
ap = (char *) malloc( strlen(s) + 1 );
if (ap != NULL) {
strncpy(ap, s + x1, strlen(s) + 1);
len = strlen(ap);
s1 = ap + len - x2;
*s1 = '\0';
s1++;
*s1 = '\0';
DEBUG_RTN_LEX3("lextrace: savename2 :%s:\n", ap)
}
return(ap);
}
int pp_lex_fgets(char *buf, int maxsize) {
int result, len;
char *s;
// char ibuf[MAXLINEBUF];
// char ibuf[YY_READ_BUF_SIZE];
if ((pp_yylist != NULL) && (lineNumber > 0) && (result_prev != YY_NULL)) {
fprintf(pp_yylist, "%6d %6d [%02d]: %s", lineNumber_prev, zzlineno_prev, fsp_prev, ibuf);
len = strlen(ibuf);
// if (len > 0) {
// fprintf(pp_yylist, "%6d %6d : %s", yylineno_prev, lineno_prev, ibuf);
// if (copy_state_sw != 0) {
// // fprintf(pp_yylist, "%6d %6d * %s", lineCount - 1, lineno_prev, ibuf);
// fprintf(pp_yylist, "%6d %6d * %s", yylineno_prev, lineno_prev, ibuf);
// }
// else {
// fprintf(pp_yylist, "%6d %6d : %s", yylineno_prev, lineno_prev, ibuf);
// // fprintf(pp_yylist, "%6d %6d : %s", lineCount - 1, lineno_prev, ibuf);
// // fprintf(pp_yylist, "%06d : %s", lineNumber - 1, ibuf);
// }
// }
}
s = fgets(buf, maxsize, pp_yyin);
// lineNumber++;
if (s == NULL) {
// strcpy(ibuf, "\n");
strcpy(ibuf, "");
/* lineno_prev = lineno; */
zzlineno_prev = zzlineno;
lineNumber_prev = lineNumber;
fsp_prev = fsp;
result_prev = YY_NULL;
result = YY_NULL;
return result;
}
// walter para resolver problema de caracters no windows
// result = 0;
// while(result < strlen(s)) {
// switch(buf[result]) {
// case 'L': buf[result] = '(';
// break;
// }
// result++;
// }
result = strlen(s);
result_prev = result;
lineNumber++;
zzlineno++;
// result = (s==NULL) ? YY_NULL: strlen(s);
// if (pp_yylist != NULL) {
// fprintf(pp_yylist, "%6d %s", lineCount, ibuf);
// }
/* Remove tabs from line */
strcpy(ibuf, buf);
tabExpand(buf, ibuf);
s = buf;
// result = (s==NULL) ? YY_NULL: strlen(s);
result = strlen(s);
// if (globalEnvPtr->debugFlag != 0 ) {
// fprintf(stderr, "lextrace: result[%d]=%d;\n", lineCount, result);
// }
// This code will remove the <CR> from buffer, as found in DOS format files
//
if (result > 1) {
// if (globalEnvPtr->debugFlag != 0 ) {
// fprintf(stderr,"lextrace: buf(%d) before: |%s|\n", strlen(buf), buf);
// }
if (buf[result - 2] == CHR_CR) {
buf[result - 2] = CHR_LF;
buf[result - 1] = CHR_EOS;
// result = (s==NULL) ? YY_NULL: strlen(s);
result = strlen(s);
}
// if (globalEnvPtr->debugFlag != 0 ) {
// fprintf(stderr,"lextrace: buf(%d) after: |%s|\n", strlen(buf), buf);
// fprintf(stderr, "lextrace: result[%d]=%d;\n", lineCount, result);
// }
}
DEBUG_RTN_FSP("lextrace: fsp = %d:\n")
if ((result) && (fsp > 0)) {
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} - before do_copy_replacements |%s<NL>|\n", buf)
do_copy_replacements(buf);
result = strlen(buf);
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} after do_copy_replacements |%s<NL>|\n", buf)
}
// if (pp_yylist != NULL) {
// /*fprintf(pp_yylist, "%6d : %s", lineCount, buf); */
// /* free == 1, fixed == 0 */
// if ((globalEnvPtr->codeFormat == 0) && (result > FIXFORM_81)) {
// fprintf(pp_yylist, "%6d * %s", lineNumber, buf);
// }
// else {
// // fprintf(pp_yylist, "%6d : %s", lineNumber, buf);
// fprintf(pp_yylist, "%06d : %s", lineNumber, buf);
// }
// }
strcpy(ibuf, buf);
/* lineno_prev = lineno;; */
/* yylineno_prev = pp_yylineno; */
/* yylineno_prev = lineNumber; */
fsp_prev = fsp;
zzlineno_prev = zzlineno;
lineNumber_prev = lineNumber;
result = strlen(buf);
/* free == 1, fixed == 0 */
/* if ( globalEnvPtr->codeFormat == 0 ) { */
if ( HTG_codeFormat == FORMAT_FIXED ) {
if (result > FIXFORM_81) {
}
if (result < FIXFORM_7) {
strcpy(buf, "\n");
}
if (result > FIXFORM_6) {
if (result < FIXFORM_73) {
strcpy(buf, ibuf+FIXFORM_6);
}
if (result > FIXFORM_72) {
strncpy(buf, ibuf+FIXFORM_6, FIXFORM_65+1);
buf[FIXFORM_65+1] = '\n';
buf[FIXFORM_65+2] = CHR_EOS;
}
}
}
result = strlen(buf);
s = buf;
return result;
}
void set_scanner_state(int i0, int i1) {
// pp_filename = strdup (input_filename);
// if (globalEnvPtr->codeFormat == FORMAT_FREE) {
if (HTG_codeFormat == FORMAT_FREE) {
BEGIN(i1);
}
// if (globalEnvPtr->codeFormat == FORMAT_FIXED) {
if (HTG_codeFormat == FORMAT_FIXED) {
BEGIN(i0);
}
}
void pp_setup_scanner_state () {
/* free == 1, fixed == 0 */
// if (globalEnvPtr->codeFormat == FORMAT_FREE) {
if (HTG_codeFormat == FORMAT_FREE) {
BEGIN(FREE) ;
}
else {
// if (globalEnvPtr->codeFormat == FORMAT_FIXED) {
if (HTG_codeFormat == FORMAT_FIXED) {
BEGIN(FIXED_7) ;
}
else {
assert(1);
}
}
fprintf (pp_yyout, "# %d \"%s\"\n", lineno, pp_filename);
}
void copy_switch(void) {
struct copy_symbols *tmp=NULL;
if (fsp>=MAX_COPY_DEPTH) {
/* yyerror("Impossible to redirect input!"); */
fprintf(stderr, "Copy nested too deeply (max=%d)\n", MAX_COPY_DEPTH);
exit(1);
}
file_stack[ fsp ].buffer = YY_CURRENT_BUFFER;
file_stack[ fsp ].filename = pp_filename;
/* file_stack[ fsp ].lineno = lineno; */
file_stack[ fsp ].lineno = zzlineno;
zzlineno = 0;
// file_stack[ fsp ].copybook = include_cpybook;
// file_stack[ fsp ].copylib = include_cpylib;
DEBUG_RTN_RLIST2()
copy_symbols = NULL;
fsp++;
file_stack[ fsp ].last_symbol = append_copy_symbols;
append_copy_symbols = NULL;
DEBUG_RTN_DLIST("lextrace: fsp=%d, copybook=%s copylib=%s\n", include_cpybook, include_cpylib)
DEBUG_RTN_RLIST3()
if (find_copybook_file(include_cpybook, include_cpylib) != 0) {
fprintf(stderr, "error: copybook file %s not found\n", include_cpybook);
exit(16);
}
pp_yyin = fopen( include_full_filename, "r" );
if (pp_yyin == NULL) {
fprintf(stderr, "Cannot open copy file %s\n", include_full_filename);
exit(1);
}
pp_yy_switch_to_buffer(pp_yy_create_buffer(pp_yyin,YY_BUF_SIZE) );
pp_filename = strdup (include_full_filename);
lineno = 1;
fprintf (pp_yyout, "# %d \"%s\"\n", lineno, pp_filename);
copy_start_sw--;
}
void add_copy_replacement(char *orig_value, char *replacement) {
struct copy_symbols *cs=NULL,*tmp=NULL;
int i;
DEBUG_RTN_STR3("lextrace: add_copy_replacement - %s will be replaced by %s\n", orig_value, replacement)
cs = malloc(sizeof(struct copy_symbols));
cs->value = orig_value;
cs->replacement = replacement;
cs->next = NULL;
if (append_copy_symbols==NULL)
append_copy_symbols = cs;
else {
tmp=append_copy_symbols;
while (tmp->next)
tmp=tmp->next;
tmp->next = cs;
}
DEBUG_RTN_RLIST4()
}
void do_copy_replacements(char *buffer) {
struct copy_symbols *cs;
char *s, *s1, *tmp = NULL;
int len, end, i, sw, cnt;
DEBUG_RTN_FSP("lextrace: do_copy_replacements fsp = %d:\n")
// Replacement table empty
copy_symbols = file_stack[fsp].last_symbol;
if (file_stack[fsp].last_symbol == NULL) {
DEBUG_RTN_STR1("lextrace: Empty replace list \n")
return;
}
DEBUG_RTN_STR1("lextrace: Replace list is NOT empty \n")
DEBUG_RTN_RLIST()
// ignore comments
// if (globalEnvPtr->codeFormat == 1) {
if (HTG_codeFormat == FORMAT_FREE) {
if (*buffer == CHR_ASTERIX) {
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s<NL>|\n", buffer)
return;
}
}
len = strlen(buffer);
if (len > FIXFORM_7) {
if (*(buffer + FIXFORM_6) == CHR_ASTERIX) {
// comment
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s<NL>|\n", buffer)
return;
}
}
else {
// empty line
DEBUG_RTN_STR2("lextrace: Ignoring empty fixed format line :%s:\n", buffer)
return;
}
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After comment check, Before copy replace : |%s<NL>|\n", buffer)
/*tmp = malloc(MAXLINEBUF);*/
tmp = malloc(YY_READ_BUF_SIZE);
//tmp = malloc(500);
//strcpy(tmp, "");
tmp[0]='\0';
s = buffer;
s1 = tmp;
len = strlen(buffer);
// if (globalEnvPtr->codeFormat == 0) {
if (HTG_codeFormat == FORMAT_FIXED) {
//fixed format
for (i=0; i<FIXFORM_7; i++) {
*s1++ = *s++;
}
*(s1+1) = '\0';
i = FIXFORM_7;
if (len > FIXFORM_72) {
//end = len - (len - FIXFORM_72);
end = FIXFORM_72;
}
else {
end = len;
}
}
else {
// free format
i = 0;
end = len;
}
copy_symbols = file_stack[fsp].last_symbol;
cnt = 0;
for (i=i; i<end; ) {
if (*s && (*s == ' ' || *s == '\t')) {
*s1 = *s;
s1++;
*s1 = '\0';
s++;
i++;
}
else {
sw = 0;
for (cs=copy_symbols; cs != NULL; ) {
if (!strncmp(s, cs->value, strlen(cs->value))) {
strcat(s1, cs->replacement);
cnt++;
s += strlen(cs->value);
i += strlen(cs->value);
s1 += strlen(cs->replacement);
DEBUG_RTN_STR3("lextrace: Now replacing :%s: by :%s:\n", cs->value, cs->replacement)
cs = NULL;
sw = 1;
}
else {
cs=cs->next;
}
}
if (sw == 0) {
*s1 = *s;
s++;
s1++;
*s1 = '\0';
i++;
}
}
}
if (cnt != 0) {
// Try to fix 73-80 cols.
// if (globalEnvPtr->codeFormat == 0) { // fixed format
if (HTG_codeFormat == FORMAT_FIXED) { // fixed format
len = strlen(tmp);
DEBUG_RTN_FIXLEN("lextrace: Before 73-80 cols fix len=%d :%s:\n", len, tmp)
if (len > FIXFORM_72) {
sw = 0;
for (i=len-1; i>=FIXFORM_71; i--) {
s1 = tmp + i;
if (*s1 != ' ') {
sw++;
i = 0;
}
else {
s1 = tmp + i;
*s1 = '\0';
}
}
s1 = buffer + FIXFORM_71;
strcat(tmp, s1);
}
else {
if (len < FIXFORM_72) {
for (i=len - 1; i<FIXFORM_72; i++) {
s1 = tmp + i;
*s1 = ' ';
*(s1+1) = '\0';
}
}
s1 = buffer + FIXFORM_72;
strcat(tmp, s1);
}
}
strcpy(buffer, tmp);
}
// strcat(buffer, "\n");
if (tmp) {free(tmp); tmp=NULL;}
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After copy replace loop : |%s<NL>|\n", buffer)
}
void add_replace_replacement(char *orig_value, char *replacement) {
struct copy_symbols *cs,*tmp;
int i;
DEBUG_RTN_STR3("lextrace: add_replace_replacement - %s will be replaced by %s\n", orig_value, replacement)
cs = malloc(sizeof(struct copy_symbols));
cs->value = orig_value;
cs->replacement = replacement;
cs->next = NULL;
if (append_replace_symbols==NULL)
append_replace_symbols = cs;
else {
tmp=append_replace_symbols;
while (tmp->next)
tmp=tmp->next;
tmp->next = cs;
}
DEBUG_RTN_RLIST5()
}
void do_replace_replacements(char *buffer) {
struct copy_symbols *cs;
char *s, *s1, *tmp = NULL;
int len, end, i, sw, cnt;
DEBUG_RTN_FSP("lextrace: do_replace_replacements fsp = %d:\n")
// Replacement table empty
copy_symbols = file_stack[fsp].last_symbol;
if (file_stack[fsp].last_symbol == NULL) {
DEBUG_RTN_STR1("lextrace: Empty replace list \n")
return;
}
DEBUG_RTN_STR1("lextrace: Replace list is NOT empty \n")
DEBUG_RTN_RLIST()
// ignore comments
// if (globalEnvPtr->codeFormat == 1) {
if (HTG_codeFormat == FORMAT_FREE) {
if (*buffer == CHR_ASTERIX) {
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s<NL>|\n", buffer)
return;
}
}
len = strlen(buffer);
if (len > FIXFORM_7) {
if (*(buffer + FIXFORM_6) == CHR_ASTERIX) {
// comment
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} Ignoring comment line |%s<NL>|\n", buffer)
return;
}
}
else {
// empty line
DEBUG_RTN_STR2("lextrace: Ignoring empty fixed format line :%s:\n", buffer)
return;
}
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After comment check, Before copy replace : |%s<NL>|\n", buffer)
/*tmp = malloc(MAXLINEBUF);*/
tmp = malloc(YY_READ_BUF_SIZE);
//strcpy(tmp, "");
tmp[0]='\0';
s = buffer;
s1 = tmp;
len = strlen(buffer);
// if (globalEnvPtr->codeFormat == 0) {
if (HTG_codeFormat == FORMAT_FIXED) {
//fixed format
for (i=0; i<FIXFORM_7; i++) {
*s1++ = *s++;
}
*(s1+1) = '\0';
i = FIXFORM_7;
if (len > FIXFORM_72) {
//end = len - (len - FIXFORM_72);
end = FIXFORM_72;
}
else {
end = len;
}
}
else {
// free format
i = 0;
end = len;
}
copy_symbols = file_stack[fsp].last_symbol;
cnt = 0;
for (i=i; i<end; ) {
if (*s && (*s == ' ' || *s == '\t')) {
*s1 = *s;
s1++;
*s1 = '\0';
s++;
i++;
}
else {
sw = 0;
for (cs=copy_symbols; cs != NULL; ) {
if (!strncmp(s, cs->value, strlen(cs->value))) {
strcat(s1, cs->replacement);
cnt++;
s += strlen(cs->value);
i += strlen(cs->value);
s1 += strlen(cs->replacement);
DEBUG_RTN_STR3("lextrace: Now replacing :%s: by :%s:\n", cs->value, cs->replacement)
cs = NULL;
sw = 1;
}
else {
cs=cs->next;
}
}
if (sw == 0) {
*s1 = *s;
s++;
s1++;
*s1 = '\0';
i++;
}
}
}
if (cnt != 0) {
// Try to fix 73-80 cols.
// if (globalEnvPtr->codeFormat == 0) { // fixed format
if (HTG_codeFormat == FORMAT_FIXED) { // fixed format
len = strlen(tmp);
DEBUG_RTN_FIXLEN("lextrace: Before 73-80 cols fix len=%d :%s:\n", len, tmp)
if (len > FIXFORM_72) {
sw = 0;
for (i=len-1; i>=FIXFORM_71; i--) {
s1 = tmp + i;
if (*s1 != ' ') {
sw++;
i = 0;
}
else {
s1 = tmp + i;
*s1 = '\0';
}
}
s1 = buffer + FIXFORM_71;
strcat(tmp, s1);
}
else {
if (len < FIXFORM_72) {
for (i=len - 1; i<FIXFORM_72; i++) {
s1 = tmp + i;
*s1 = ' ';
*(s1+1) = '\0';
}
}
s1 = buffer + FIXFORM_72;
strcat(tmp, s1);
}
}
strcpy(buffer, tmp);
}
// strcat(buffer, "\n");
DEBUG_RTN_DUMP("lextrace: dump{%d, %d, %d, %d} After copy replace loop : |%s<NL>|\n", buffer)
if (tmp) { free(tmp); tmp=NULL; }
}
void adjust_counters(void) {
int i, l=0, c=0, sw=0;
for (i=pp_yyleng-1; i>=0; i--) {
if (pp_yytext[i] == CHR_LF) {
l++;
sw=1;
}
if (sw == 0) {
c++;
}
}
lineno = lineno + l;
lineCount = lineCount + l;
lf_add = lf_add + l;
columnCount = c;
}
#ifdef DEBUG_COBPP_SCANNER
void debug_rtn (const char *s, unsigned long Ccnt, unsigned long Lcnt, int Len, const char *s1) {
char scstate[50];
switch (YYSTATE)
{
case FREE:
strcpy(scstate, "FREE");
break;
case FIXED_7:
strcpy(scstate, "FIXED_7");
break;
case FIXED_AB:
strcpy(scstate, "FIXED_AB");
break;
case COMMENT:
strcpy(scstate, "COMMENT");
break;
case DQ_LITERAL_FIXED:
strcpy(scstate, "DQ_LITERAL_FIXED");
break;
case DQ_LITERAL_FREE:
strcpy(scstate, "DQ_LITERAL_FREE");
break;
case SQ_LITERAL_FIXED:
strcpy(scstate, "SQ_LITERAL_FIXED");
break;
case SQ_LITERAL_FREE:
strcpy(scstate, "SQ_LITERAL_FREE");
break;
default:
strcpy(scstate, "none");
break;
}
fprintf(stderr,
"debug lex %s - %s (%lu,%lu): length=%d, :%s:\n",
scstate,
s,
Lcnt,
Ccnt,
Len,
s1
);
}
void debug_rtn2 (const char *s1, const char *s2, int sw1, int sw2, int sw3, int sw)
{
switch (sw)
{
case 3:
sprintf(errbuf, s1, s2);
break;
case 5:
sprintf(errbuf, s1, sw1);
break;
case 7:
sprintf(errbuf, s1, sw2);
break;
case 11:
sprintf(errbuf, s1, sw3);
break;
case 15:
sprintf(errbuf, s1, s2, sw1);
break;
case 21:
sprintf(errbuf, s1, s2, sw2);
break;
case 33:
sprintf(errbuf, s1, s2, sw3);
break;
case 35:
sprintf(errbuf, s1, sw1, sw2);
break;
case 105:
sprintf(errbuf, s1, s2, sw1, sw2);
break;
case 385:
sprintf(errbuf, s1, sw1, sw2, sw3);
break;
default:
sprintf(errbuf, "%s", s1);
break;
}
fprintf(stderr, "%s", errbuf);
}
void debug_rtn_sssd (const char *s1, const char *s2, const char *s3, int z, int sw)
{
switch (sw)
{
case 3:
sprintf(errbuf, s1, s2);
break;
case 5:
sprintf(errbuf, s1, s3);
break;
case 7:
sprintf(errbuf, s1, z);
break;
case 15:
sprintf(errbuf, s1, s2, s3);
break;
case 21:
sprintf(errbuf, s1, s2, z);
break;
case 22:
sprintf(errbuf, s1, z, s2);
break;
case 105:
sprintf(errbuf, s1, s2, s3, z);
break;
case 106:
sprintf(errbuf, s1, z, s2, s3);
break;
default:
sprintf(errbuf, "%s", s1);
break;
}
fprintf(stderr, "%s", errbuf);
}
void debug_rtn_dump (const char *s, const char *s1, int fsln, int fsi, int gln)
{
char wkbuf[MAXLINEBUF+1];
int ln, idx;
strcpy(wkbuf, s1);
ln = strlen(wkbuf);
idx = ln - 1;
if (wkbuf[idx] == CHR_LF) {
wkbuf[idx] = CHR_EOS;
}
fprintf(stderr, s, fsi, fsln, gln, ln, wkbuf);
}
#endif