PIPS
|
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "genC.h"
#include "misc.h"
#include "tpips.h"
#include "tp_yacc.h"
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | yy_buffer_state |
struct | yy_trans_info |
This struct is not used in this scanner, but its presence is necessary. More... | |
Macros | |
#define | YY_INT_ALIGNED short int |
#define | yy_create_buffer tp__create_buffer |
A lexical scanner generated by flex. More... | |
#define | yy_delete_buffer tp__delete_buffer |
#define | yy_scan_buffer tp__scan_buffer |
#define | yy_scan_string tp__scan_string |
#define | yy_scan_bytes tp__scan_bytes |
#define | yy_init_buffer tp__init_buffer |
#define | yy_flush_buffer tp__flush_buffer |
#define | yy_load_buffer_state tp__load_buffer_state |
#define | yy_switch_to_buffer tp__switch_to_buffer |
#define | yypush_buffer_state tp_push_buffer_state |
#define | yypop_buffer_state tp_pop_buffer_state |
#define | yyensure_buffer_stack tp_ensure_buffer_stack |
#define | yy_flex_debug tp__flex_debug |
#define | yyin tp_in |
#define | yyleng tp_leng |
#define | yylex tp_lex |
#define | yylineno tp_lineno |
#define | yyout tp_out |
#define | yyrestart tp_restart |
#define | yytext tp_text |
#define | yywrap(void) tp_wrap |
Macros after this point can all be overridden by user definitions in section 1. More... | |
#define | yyalloc tp_alloc |
#define | yyrealloc tp_realloc |
#define | yyfree tp_free |
#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 | tp__create_buffer_ALREADY_DEFINED |
#define | tp__delete_buffer_ALREADY_DEFINED |
#define | tp__scan_buffer_ALREADY_DEFINED |
#define | tp__scan_string_ALREADY_DEFINED |
#define | tp__scan_bytes_ALREADY_DEFINED |
#define | tp__init_buffer_ALREADY_DEFINED |
#define | tp__flush_buffer_ALREADY_DEFINED |
#define | tp__load_buffer_state_ALREADY_DEFINED |
#define | tp__switch_to_buffer_ALREADY_DEFINED |
#define | tp_push_buffer_state_ALREADY_DEFINED |
#define | tp_pop_buffer_state_ALREADY_DEFINED |
#define | tp_ensure_buffer_stack_ALREADY_DEFINED |
#define | tp_lex_ALREADY_DEFINED |
#define | tp_restart_ALREADY_DEFINED |
#define | yylex_init tp_lex_init |
#define | yylex_init_extra tp_lex_init_extra |
#define | yylex_destroy(void) tp_lex_destroy |
Accessor methods to globals. More... | |
#define | yyget_debug tp_get_debug |
#define | yyset_debug tp_set_debug |
#define | yyget_extra tp_get_extra |
#define | yyset_extra tp_set_extra |
#define | yyget_in tp_get_in |
#define | yyset_in tp_set_in |
#define | yyget_out tp_get_out |
#define | yyset_out tp_set_out |
#define | yyget_leng tp_get_leng |
#define | yyget_text tp_get_text |
#define | yyget_lineno tp_get_lineno |
#define | yyset_lineno tp_set_lineno |
#define | tp_wrap_ALREADY_DEFINED |
#define | tp_alloc_ALREADY_DEFINED |
#define | tp_realloc_ALREADY_DEFINED |
#define | tp_free_ALREADY_DEFINED |
#define | tp_text_ALREADY_DEFINED |
#define | tp_leng_ALREADY_DEFINED |
#define | tp_in_ALREADY_DEFINED |
#define | tp_out_ALREADY_DEFINED |
#define | tp__flex_debug_ALREADY_DEFINED |
#define | tp_lineno_ALREADY_DEFINED |
#define | FLEXINT_H |
First, we deal with platform-specific or compiler-specific issues. More... | |
#define | INT8_MIN (-128) |
Limits of integral types. More... | |
#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 |
! C99 More... | |
#define | yynoreturn |
#define | YY_NULL 0 |
Returned upon end-of-file. More... | |
#define | YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
Promotes a possibly negative, possibly signed char to an integer in range [0..255] for use as an array index. More... | |
#define | BEGIN (yy_start) = 1 + 2 * |
Enter a start condition. More... | |
#define | YY_START (((yy_start) - 1) / 2) |
Translate the current start state into a value that can be later handed to BEGIN to return to the state. More... | |
#define | YYSTATE YY_START |
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
Action number for EOF rule of a given start state. More... | |
#define | YY_NEW_FILE yyrestart( yyin ) |
Special action meaning "start processing a new file". More... | |
#define | YY_END_OF_BUFFER_CHAR 0 |
#define | YY_BUF_SIZE 16384 |
Size of default input buffer. More... | |
#define | YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
ia64 More... | |
#define | YY_TYPEDEF_YY_BUFFER_STATE |
#define | YY_TYPEDEF_YY_SIZE_T |
#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) |
Return all but the first "n" matched characters back to the input stream. More... | |
#define | unput(c) yyunput( c, (yytext_ptr) ) |
#define | YY_STRUCT_YY_BUFFER_STATE |
#define | YY_BUFFER_NEW 0 |
#define | YY_BUFFER_NORMAL 1 |
#define | YY_BUFFER_EOF_PENDING 2 |
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. More... | |
#define | YY_CURRENT_BUFFER |
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". More... | |
#define | YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Same as previous macro, but useful when we know that the buffer stack is not NULL or when we need an lvalue. More... | |
#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 | yytext_ptr yytext |
#define | YY_DO_BEFORE_ACTION |
Done after the current pattern has been matched and before the corresponding action - sets up yytext. More... | |
#define | YY_NUM_RULES 73 |
#define | YY_END_OF_BUFFER 74 |
#define | REJECT reject_used_but_not_detected |
The intent behind this definition is that it'll catch any uses of REJECT which flex missed. More... | |
#define | yymore() yymore_used_but_not_detected |
#define | YY_MORE_ADJ 0 |
#define | YY_RESTORE_YY_MORE_OFFSET |
#define | YY_NO_INPUT 1 |
#define | ECHO ; |
disable echoing unmatched characters More... | |
#define | YY_INPUT(buf, result, max_size) |
now get the characters from a string, not from a file More... | |
#define | RETURN(x) pips_debug(8, "init %d\n", x); return x |
one char lines are not implicit shells More... | |
#define | KEYWORD(x) pips_debug(8, "key %d\n", x); BEGIN INITIAL; return x |
#define | LITTERAL(x) |
#define | RESTART(x) pips_debug(8, "rst %d\n", x); BEGIN KEY; return x |
#define | INITIAL 0 |
#define | KEY 1 |
#define | STR 2 |
#define | SPC 3 |
#define | LIT 4 |
#define | UNK 5 |
#define | YY_EXTRA_TYPE void * |
Special case for "unistd.h", since it is non-ANSI. More... | |
#define | YY_READ_BUF_SIZE 8192 |
Amount of stuff to slurp up with each read. More... | |
#define | yyterminate() return YY_NULL |
ia64 More... | |
#define | YY_START_STACK_INCR 25 |
Number of entries by which start-condition stack grows. More... | |
#define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
Report a fatal error. More... | |
#define | YY_DECL_IS_OURS 1 |
end tables serialization structures and prototypes More... | |
#define | YY_DECL int yylex (void) |
#define | YY_USER_ACTION |
!YY_DECL More... | |
#define | YY_BREAK /**INTED*/break; |
Code executed at the end of each rule. More... | |
#define | YY_RULE_SETUP YY_USER_ACTION |
#define | YY_EXIT_FAILURE 2 |
#define | yyless(n) |
Return all but the first "n" matched characters back to the input stream. More... | |
#define | YYTABLES_NAME "yytables" |
Typedefs | |
typedef signed char | flex_int8_t |
C99 systems have <inttypes.h>. More... | |
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 |
Begin user sect3. More... | |
typedef int | yy_state_type |
Variables | |
int | yyleng |
number of characters read into yy_ch_buf More... | |
FILE * | yyin |
FILE * | yyout |
static size_t | yy_buffer_stack_top = 0 |
!YY_STRUCT_YY_BUFFER_STATE More... | |
static size_t | yy_buffer_stack_max = 0 |
capacity of stack. More... | |
static YY_BUFFER_STATE * | yy_buffer_stack = NULL |
Stack as an array. More... | |
static char | yy_hold_char |
yy_hold_char holds the character lost when yytext is formed. More... | |
static int | yy_n_chars |
static char * | yy_c_buf_p = NULL |
Points to current character in buffer. More... | |
static int | yy_init = 0 |
static int | yy_start = 0 |
whether we need to initialize More... | |
static int | yy_did_buffer_switch_on_eof |
start state number More... | |
int | yylineno = 1 |
Begin user sect3. More... | |
char * | yytext |
static const flex_int16_t | yy_accept [289] |
static const YY_CHAR | yy_ec [256] |
static const YY_CHAR | yy_meta [58] |
static const flex_int16_t | yy_base [301] |
static const flex_int16_t | yy_def [301] |
static const flex_int16_t | yy_nxt [416] |
static const flex_int16_t | yy_chk [416] |
static yy_state_type | yy_last_accepting_state |
static char * | yy_last_accepting_cpos |
int | yy_flex_debug = 0 |
string | tpips_unknown_string = string_undefined |
static bool | cr_not_returned |
static char * | line_to_parse |
static char * | line_parsed |
static int | back = 0 |
static char | unk [2] |
string to be processed by some other lexer/parser. More... | |
YY_DECL | |
The main scanner function which does all the work. More... | |
char * | yy_cp |
char * | yy_bp |
int | yy_act |
#define BEGIN (yy_start) = 1 + 2 * |
#define FLEXINT_H |
#define LITTERAL | ( | x | ) |
#define REJECT reject_used_but_not_detected |
#define RETURN | ( | x | ) | pips_debug(8, "init %d\n", x); return x |
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define YY_BREAK /**INTED*/break; |
#define YY_BUFFER_EOF_PENDING 2 |
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 yyrestart()), so that the user can continue scanning by just pointing yyin at a new input file.
#define yy_create_buffer tp__create_buffer |
#define YY_CURRENT_BUFFER |
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_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define YY_DECL_IS_OURS 1 |
#define YY_DO_BEFORE_ACTION |
Done after the current pattern has been matched and before the corresponding action - sets up yytext.
#define YY_EXIT_FAILURE 2 |
#define YY_EXTRA_TYPE void * |
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
#define yy_flex_debug tp__flex_debug |
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
now get the characters from a string, not from a file
#define yy_load_buffer_state | ( | void | ) | tp__load_buffer_state |
#define yy_new_buffer yy_create_buffer |
#define YY_READ_BUF_SIZE 8192 |
#define YY_RULE_SETUP YY_USER_ACTION |
#define YY_SC_TO_UI | ( | c | ) | ((YY_CHAR) (c)) |
#define yy_set_bol | ( | at_bol | ) |
#define yy_set_interactive | ( | is_interactive | ) |
#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 YY_USER_ACTION |
#define yyconst const |
#define yyensure_buffer_stack | ( | void | ) | tp_ensure_buffer_stack |
#define yyget_debug | ( | void | ) | tp_get_debug |
#define yyget_leng | ( | void | ) | tp_get_leng |
#define yyget_lineno | ( | void | ) | tp_get_lineno |
#define yyget_out | ( | void | ) | tp_get_out |
#define yyget_text | ( | void | ) | tp_get_text |
#define yyless | ( | n | ) |
Return all but the first "n" matched characters back to the input stream.
#define yyless | ( | n | ) |
Return all but the first "n" matched characters back to the input stream.
#define yylex_destroy | ( | void | ) | tp_lex_destroy |
#define yypop_buffer_state | ( | void | ) | tp_pop_buffer_state |
#define yyrealloc tp_realloc |
#define yyrestart tp_restart |
#define yyset_debug tp_set_debug |
#define yyset_lineno tp_set_lineno |
#define yyset_out tp_set_out |
#define YYTABLES_NAME "yytables" |
ia64
Copy whatever the last rule matched to the standard output. Gets input and stuffs it into "buf". number of characters read, or YY_NULL, is returned in "result". 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.
#define yywrap | ( | void | ) | tp_wrap |
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 int yy_state_type |
if | ( | ! | yy_init | ) |
first start state
Definition at line 1195 of file tp_lex.c.
References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init, yy_load_buffer_state, yy_start, yyensure_buffer_stack, yyin, and yyout.
char* tpips_get_line_to_parse | ( | void | ) |
Definition at line 961 of file tp_lex.c.
References line_to_parse.
Referenced by handle().
|
static |
a fake
is provided, to check for nargs in the syntax...
Definition at line 978 of file tp_lex.c.
References cr_not_returned, line_to_parse, and pips_debug.
void tpips_lex_print_pos | ( | FILE * | fout | ) |
fout | out |
Definition at line 968 of file tp_lex.c.
References back, fprintf(), int, line_parsed, line_to_parse, tpips_current_line(), and tpips_current_name().
void tpips_set_line_to_parse | ( | char * | line | ) |
in lex file
store line pointer
line | ine |
Definition at line 953 of file tp_lex.c.
References cr_not_returned, line, line_parsed, line_to_parse, and skip_blanks.
Referenced by handle(), and process_file_list().
YY_BUFFER_STATE yy_create_buffer | ( | FILE * | file, |
int | size | ||
) |
void yy_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
|
static |
void yy_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
|
static |
|
static |
|
static |
|
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 | ) |
void yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
|
static |
void yyfree | ( | 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 | ) |
|
static |
Definition at line 966 of file tp_lex.c.
Referenced by tpips_lex_print_pos().
|
static |
Definition at line 949 of file tp_lex.c.
Referenced by tpips_lex_input(), and tpips_set_line_to_parse().
|
static |
Definition at line 951 of file tp_lex.c.
Referenced by tpips_lex_print_pos(), and tpips_set_line_to_parse().
|
static |
Definition at line 950 of file tp_lex.c.
Referenced by tpips_get_line_to_parse(), tpips_lex_input(), tpips_lex_print_pos(), and tpips_set_line_to_parse().
string tpips_unknown_string = string_undefined |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
YY_DECL |
The main scanner function which does all the work.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |