The lex input parser. More...
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <math.h>
#include "ergo_input_processor.h"
#include "ergo_scripted.h"
#include <unistd.h>
Classes | |
struct | yy_buffer_state |
struct | yy_trans_info |
Defines | |
#define | YY_INT_ALIGNED short int |
#define | FLEX_SCANNER |
#define | YY_FLEX_MAJOR_VERSION 2 |
#define | YY_FLEX_MINOR_VERSION 6 |
#define | YY_FLEX_SUBMINOR_VERSION 4 |
#define | FLEX_BETA |
#define | INT8_MIN (-128) |
#define | INT16_MIN (-32767-1) |
#define | INT32_MIN (-2147483647-1) |
#define | INT8_MAX (127) |
#define | INT16_MAX (32767) |
#define | INT32_MAX (2147483647) |
#define | UINT8_MAX (255U) |
#define | UINT16_MAX (65535U) |
#define | UINT32_MAX (4294967295U) |
#define | SIZE_MAX (~(size_t)0) |
#define | yyconst const |
#define | yynoreturn |
#define | YY_NULL 0 |
#define | YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
#define | BEGIN (yy_start) = 1 + 2 * |
#define | YY_START (((yy_start) - 1) / 2) |
#define | YYSTATE YY_START |
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
#define | YY_NEW_FILE yyrestart( yyin ) |
#define | YY_END_OF_BUFFER_CHAR 0 |
#define | YY_BUF_SIZE 16384 |
#define | YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
#define | EOB_ACT_CONTINUE_SCAN 0 |
#define | EOB_ACT_END_OF_FILE 1 |
#define | EOB_ACT_LAST_MATCH 2 |
#define | YY_LESS_LINENO(n) |
#define | YY_LINENO_REWIND_TO(ptr) |
#define | yyless(n) |
#define | unput(c) yyunput( c, (yytext_ptr) ) |
#define | YY_BUFFER_NEW 0 |
#define | YY_BUFFER_NORMAL 1 |
#define | YY_BUFFER_EOF_PENDING 2 |
#define | YY_CURRENT_BUFFER |
#define | YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define | YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
#define | yy_new_buffer yy_create_buffer |
#define | yy_set_interactive(is_interactive) |
#define | yy_set_bol(at_bol) |
#define | YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define | yywrap() (/*CONSTCOND*/1) |
#define | YY_SKIP_YYWRAP |
#define | yytext_ptr yytext |
#define | YY_DO_BEFORE_ACTION |
#define | YY_NUM_RULES 37 |
#define | YY_END_OF_BUFFER 38 |
#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 |
#define | YY_NO_INPUT 1 |
#define | YY_DECL int yylex(void) |
#define | INITIAL 0 |
#define | YY_EXTRA_TYPE void * |
#define | YY_READ_BUF_SIZE 8192 |
#define | ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
#define | YY_INPUT(buf, result, max_size) |
#define | yyterminate() return YY_NULL |
#define | YY_START_STACK_INCR 25 |
#define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
#define | YY_BREAK /*LINTED*/break; |
#define | YY_RULE_SETUP |
#define | YY_EXIT_FAILURE 2 |
#define | yyless(n) |
#define | YYTABLES_NAME "yytables" |
Typedefs | |
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 |
typedef struct yy_buffer_state * | YY_BUFFER_STATE |
typedef size_t | yy_size_t |
typedef flex_uint8_t | YY_CHAR |
typedef int | yy_state_type |
Functions | |
void | yyrestart (FILE *input_file) |
void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
void | yy_delete_buffer (YY_BUFFER_STATE b) |
void | yy_flush_buffer (YY_BUFFER_STATE b) |
void | yypush_buffer_state (YY_BUFFER_STATE new_buffer) |
void | yypop_buffer_state (void) |
static void | yyensure_buffer_stack (void) |
static void | yy_load_buffer_state (void) |
static void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
YY_BUFFER_STATE | yy_scan_buffer (char *base, yy_size_t size) |
YY_BUFFER_STATE | yy_scan_string (const char *yy_str) |
YY_BUFFER_STATE | yy_scan_bytes (const char *bytes, int len) |
void * | yyalloc (yy_size_t) |
void * | yyrealloc (void *, yy_size_t) |
void | yyfree (void *) |
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 yynoreturn | yy_fatal_error (const char *msg) |
int | fileno (FILE *stream) |
void | yyset_lineno (int line_number) |
int | yyget_lineno (void) |
static int | yy_init_globals (void) |
int | yylex_destroy (void) |
int | yyget_debug (void) |
void | yyset_debug (int debug_flag) |
YY_EXTRA_TYPE | yyget_extra (void) |
void | yyset_extra (YY_EXTRA_TYPE user_defined) |
FILE * | yyget_in (void) |
void | yyset_in (FILE *_in_str) |
FILE * | yyget_out (void) |
void | yyset_out (FILE *_out_str) |
int | yyget_leng (void) |
char * | yyget_text (void) |
Variables | |
int | yyleng |
FILE * | yyin = NULL |
FILE * | yyout = NULL |
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 = NULL |
Stack as an array. | |
static char | yy_hold_char |
static int | yy_n_chars |
static char * | yy_c_buf_p = NULL |
static int | yy_init = 0 |
static int | yy_start = 0 |
static int | yy_did_buffer_switch_on_eof |
int | yylineno = 1 |
char * | yytext |
static const flex_int16_t | yy_accept [181] |
static const YY_CHAR | yy_ec [256] |
static const YY_CHAR | yy_meta [45] |
static const flex_int16_t | yy_base [185] |
static const flex_int16_t | yy_def [185] |
static const flex_int16_t | yy_nxt [257] |
static const flex_int16_t | yy_chk [257] |
static yy_state_type | yy_last_accepting_state |
static char * | yy_last_accepting_cpos |
int | yy_flex_debug = 0 |
YY_DECL |
The lex input parser.
Defines the grammar
#define BEGIN (yy_start) = 1 + 2 * |
#define EOB_ACT_CONTINUE_SCAN 0 |
#define EOB_ACT_END_OF_FILE 1 |
#define EOB_ACT_LAST_MATCH 2 |
#define FLEX_BETA |
#define FLEX_SCANNER |
#define INITIAL 0 |
#define INT16_MAX (32767) |
#define INT16_MIN (-32767-1) |
#define INT32_MAX (2147483647) |
#define INT32_MIN (-2147483647-1) |
#define INT8_MAX (127) |
#define INT8_MIN (-128) |
#define REJECT reject_used_but_not_detected |
#define SIZE_MAX (~(size_t)0) |
#define UINT16_MAX (65535U) |
#define UINT32_MAX (4294967295U) |
#define UINT8_MAX (255U) |
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define YY_BREAK /*LINTED*/break; |
#define YY_BUF_SIZE 16384 |
#define YY_BUFFER_EOF_PENDING 2 |
#define YY_BUFFER_NEW 0 |
#define YY_BUFFER_NORMAL 1 |
#define YY_CURRENT_BUFFER |
( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL)
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define YY_DECL int yylex(void) |
#define YY_DO_BEFORE_ACTION |
(yytext_ptr) = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp;
#define YY_END_OF_BUFFER 38 |
#define YY_END_OF_BUFFER_CHAR 0 |
#define YY_EXIT_FAILURE 2 |
#define YY_EXTRA_TYPE void * |
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
#define YY_FLEX_MAJOR_VERSION 2 |
#define YY_FLEX_MINOR_VERSION 6 |
#define YY_FLEX_SUBMINOR_VERSION 4 |
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
#define YY_INPUT | ( | buf, | |||
result, | |||||
max_size | ) |
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \
#define YY_INT_ALIGNED short int |
#define YY_LESS_LINENO | ( | n | ) |
#define YY_LINENO_REWIND_TO | ( | ptr | ) |
#define YY_MORE_ADJ 0 |
#define yy_new_buffer yy_create_buffer |
#define YY_NEW_FILE yyrestart( yyin ) |
#define YY_NO_INPUT 1 |
#define YY_NULL 0 |
#define YY_NUM_RULES 37 |
#define YY_READ_BUF_SIZE 8192 |
#define YY_RESTORE_YY_MORE_OFFSET |
#define YY_RULE_SETUP |
if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION
#define YY_SC_TO_UI | ( | c | ) | ((YY_CHAR) (c)) |
#define yy_set_bol | ( | at_bol | ) |
{ \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ }
#define yy_set_interactive | ( | is_interactive | ) |
{ \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ }
#define YY_SKIP_YYWRAP |
#define YY_START (((yy_start) - 1) / 2) |
#define YY_START_STACK_INCR 25 |
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
#define yyconst const |
#define yyless | ( | n | ) |
do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 )
#define yyless | ( | n | ) |
do \ { \ /* Undo effects of setting up 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 yytext again */ \ } \ while ( 0 )
#define yymore | ( | ) | yymore_used_but_not_detected |
#define yynoreturn |
#define YYSTATE YY_START |
#define YYTABLES_NAME "yytables" |
#define yyterminate | ( | ) | return YY_NULL |
#define yytext_ptr yytext |
#define yywrap | ( | ) | (/*CONSTCOND*/1) |
typedef short int flex_int16_t |
typedef int flex_int32_t |
typedef signed char flex_int8_t |
typedef unsigned short int flex_uint16_t |
typedef unsigned int flex_uint32_t |
typedef unsigned char flex_uint8_t |
typedef struct yy_buffer_state* YY_BUFFER_STATE |
typedef flex_uint8_t YY_CHAR |
typedef size_t yy_size_t |
typedef int yy_state_type |
int fileno | ( | FILE * | stream | ) |
Referenced by ddf_writeShellListAndDensityMatricesToFile_sparse(), ergo_parse_file(), and main().
YY_BUFFER_STATE yy_create_buffer | ( | FILE * | file, | |
int | size | |||
) |
Referenced by ergo_parse_file().
void yy_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Referenced by ergo_parse_file(), and ergo_parse_string().
static void yynoreturn yy_fatal_error | ( | const char * | msg | ) | [static] |
void yy_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
static int yy_get_next_buffer | ( | void | ) | [static] |
static yy_state_type yy_get_previous_state | ( | void | ) | [static] |
static void yy_init_buffer | ( | YY_BUFFER_STATE | b, | |
FILE * | file | |||
) | [static] |
static int yy_init_globals | ( | void | ) | [static] |
static void yy_load_buffer_state | ( | void | ) | [static] |
YY_BUFFER_STATE yy_scan_buffer | ( | char * | base, | |
yy_size_t | size | |||
) |
YY_BUFFER_STATE yy_scan_bytes | ( | const char * | bytes, | |
int | len | |||
) |
YY_BUFFER_STATE yy_scan_string | ( | const char * | yy_str | ) |
Referenced by ergo_parse_string().
void yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Referenced by ergo_parse_file(), and ergo_parse_string().
static yy_state_type yy_try_NUL_trans | ( | yy_state_type | current_state | ) | [static] |
static void yyensure_buffer_stack | ( | void | ) | [static] |
void yyfree | ( | void * | ) |
int yyget_debug | ( | void | ) |
YY_EXTRA_TYPE yyget_extra | ( | void | ) |
FILE* yyget_in | ( | void | ) |
int yyget_leng | ( | void | ) |
int yyget_lineno | ( | void | ) |
FILE* yyget_out | ( | void | ) |
char* yyget_text | ( | void | ) |
int yylex_destroy | ( | void | ) |
Referenced by main().
void yypop_buffer_state | ( | void | ) |
void yypush_buffer_state | ( | YY_BUFFER_STATE | new_buffer | ) |
void* yyrealloc | ( | void * | , | |
yy_size_t | ||||
) |
void yyrestart | ( | FILE * | input_file | ) |
void yyset_debug | ( | int | debug_flag | ) |
void yyset_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
void yyset_in | ( | FILE * | _in_str | ) |
void yyset_lineno | ( | int | line_number | ) |
void yyset_out | ( | FILE * | _out_str | ) |
const flex_int16_t yy_accept[181] [static] |
{ 0, 0, 0, 38, 37, 1, 15, 37, 12, 13, 9, 6, 7, 5, 10, 4, 16, 14, 36, 36, 11, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 3, 36, 1, 0, 35, 4, 0, 0, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 3, 36, 4, 0, 4, 36, 27, 36, 36, 36, 36, 36, 36, 36, 36, 36, 32, 36, 36, 36, 36, 36, 36, 36, 18, 36, 36, 36, 36, 31, 36, 36, 36, 36, 8, 36, 36, 36, 17, 36, 36, 36, 36, 22, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 33, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 23, 36, 36, 36, 36, 36, 30, 36, 36, 34, 36, 36, 36, 36, 36, 36, 21, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 20, 36, 36, 36, 36, 36, 29, 36, 36, 24, 36, 36, 36, 36, 36, 36, 19, 36, 36, 36, 28, 36, 36, 25, 36, 26, 0 }
const flex_int16_t yy_base[185] [static] |
{ 0, 0, 40, 211, 212, 208, 212, 205, 212, 212, 212, 212, 195, 212, 212, 35, 212, 212, 173, 0, 212, 174, 20, 178, 165, 172, 167, 163, 159, 26, 24, 176, 0, 0, 178, 195, 192, 212, 46, 182, 56, 0, 165, 161, 152, 156, 158, 167, 149, 155, 159, 154, 150, 149, 142, 142, 142, 0, 0, 160, 43, 165, 164, 137, 0, 153, 135, 137, 147, 131, 143, 144, 128, 138, 0, 144, 125, 126, 160, 122, 36, 121, 0, 130, 137, 133, 126, 0, 129, 121, 127, 130, 212, 114, 108, 115, 127, 108, 121, 105, 106, 0, 104, 110, 108, 106, 115, 107, 107, 115, 108, 103, 103, 103, 0, 92, 98, 99, 106, 94, 86, 86, 98, 89, 85, 78, 0, 81, 82, 87, 79, 95, 94, 81, 87, 0, 86, 81, 80, 83, 81, 77, 0, 84, 80, 66, 70, 77, 61, 67, 74, 77, 75, 70, 0, 62, 63, 55, 54, 68, 0, 66, 59, 0, 49, 57, 48, 52, 62, 52, 0, 56, 41, 47, 0, 44, 20, 0, 11, 0, 212, 73, 49, 76, 79 }
YY_BUFFER_STATE* yy_buffer_stack = NULL [static] |
Stack as an array.
size_t yy_buffer_stack_max = 0 [static] |
capacity of stack.
size_t yy_buffer_stack_top = 0 [static] |
index of top of stack.
char* yy_c_buf_p = NULL [static] |
const flex_int16_t yy_chk[257] [static] |
const flex_int16_t yy_def[185] [static] |
{ 0, 180, 1, 180, 180, 180, 180, 181, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 182, 182, 180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 183, 184, 182, 180, 181, 180, 180, 180, 180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 183, 184, 182, 180, 180, 180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 0, 180, 180, 180, 180 }
int yy_did_buffer_switch_on_eof [static] |
int yy_flex_debug = 0 |
char yy_hold_char [static] |
int yy_init = 0 [static] |
char* yy_last_accepting_cpos [static] |
yy_state_type yy_last_accepting_state [static] |
{ 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }
int yy_n_chars [static] |
const flex_int16_t yy_nxt[257] [static] |
int yy_start = 0 [static] |
FILE * yyin = NULL |
int yyleng |
int yylineno = 1 |
FILE * yyout = NULL |
char * yytext |