PIPS
|
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "misc.h"
#include "splitc.h"
#include "preprocessor.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 splitc__create_buffer |
A lexical scanner generated by flex. More... | |
#define | yy_delete_buffer splitc__delete_buffer |
#define | yy_scan_buffer splitc__scan_buffer |
#define | yy_scan_string splitc__scan_string |
#define | yy_scan_bytes splitc__scan_bytes |
#define | yy_init_buffer splitc__init_buffer |
#define | yy_flush_buffer splitc__flush_buffer |
#define | yy_load_buffer_state splitc__load_buffer_state |
#define | yy_switch_to_buffer splitc__switch_to_buffer |
#define | yypush_buffer_state splitc_push_buffer_state |
#define | yypop_buffer_state splitc_pop_buffer_state |
#define | yyensure_buffer_stack splitc_ensure_buffer_stack |
#define | yy_flex_debug splitc__flex_debug |
#define | yyin splitc_in |
#define | yyleng splitc_leng |
#define | yylex splitc_lex |
#define | yylineno splitc_lineno |
#define | yyout splitc_out |
#define | yyrestart splitc_restart |
#define | yytext splitc_text |
#define | yywrap(void) splitc_wrap |
Macros after this point can all be overridden by user definitions in section 1. More... | |
#define | yyalloc splitc_alloc |
#define | yyrealloc splitc_realloc |
#define | yyfree splitc_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 | splitc__create_buffer_ALREADY_DEFINED |
#define | splitc__delete_buffer_ALREADY_DEFINED |
#define | splitc__scan_buffer_ALREADY_DEFINED |
#define | splitc__scan_string_ALREADY_DEFINED |
#define | splitc__scan_bytes_ALREADY_DEFINED |
#define | splitc__init_buffer_ALREADY_DEFINED |
#define | splitc__flush_buffer_ALREADY_DEFINED |
#define | splitc__load_buffer_state_ALREADY_DEFINED |
#define | splitc__switch_to_buffer_ALREADY_DEFINED |
#define | splitc_push_buffer_state_ALREADY_DEFINED |
#define | splitc_pop_buffer_state_ALREADY_DEFINED |
#define | splitc_ensure_buffer_stack_ALREADY_DEFINED |
#define | splitc_lex_ALREADY_DEFINED |
#define | splitc_restart_ALREADY_DEFINED |
#define | yylex_init splitc_lex_init |
#define | yylex_init_extra splitc_lex_init_extra |
#define | yylex_destroy(void) splitc_lex_destroy |
Accessor methods to globals. More... | |
#define | yyget_debug splitc_get_debug |
#define | yyset_debug splitc_set_debug |
#define | yyget_extra splitc_get_extra |
#define | yyset_extra splitc_set_extra |
#define | yyget_in splitc_get_in |
#define | yyset_in splitc_set_in |
#define | yyget_out splitc_get_out |
#define | yyset_out splitc_set_out |
#define | yyget_leng splitc_get_leng |
#define | yyget_text splitc_get_text |
#define | yyget_lineno splitc_get_lineno |
#define | yyset_lineno splitc_set_lineno |
#define | splitc_wrap_ALREADY_DEFINED |
#define | splitc_alloc_ALREADY_DEFINED |
#define | splitc_realloc_ALREADY_DEFINED |
#define | splitc_free_ALREADY_DEFINED |
#define | splitc_text_ALREADY_DEFINED |
#define | splitc_leng_ALREADY_DEFINED |
#define | splitc_in_ALREADY_DEFINED |
#define | splitc_out_ALREADY_DEFINED |
#define | splitc__flex_debug_ALREADY_DEFINED |
#define | splitc_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) |
Note: We specifically omit the test for yy_rule_can_match_eol because it requires access to the local variable yy_act. More... | |
#define | YY_LINENO_REWIND_TO(dst) |
#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 72 |
#define | YY_END_OF_BUFFER 73 |
#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 | YY_USER_ACTION update_csplit_file_offset_information(); |
To track current file position: More... | |
#define | TOKEN_UNDEFINED (-1) |
The lexer cannot handle the ambiguity between named types and variables without extra-help. More... | |
#define | LEXER_RETURN(t) return(previous_keyword_token=t) |
This is going to be the previous token because LEXER_RETURN is not used in case the lexer handles either a named type or a variable. More... | |
#define | TK_TYPE_P(tk) |
#define | INITIAL 0 |
To track file line number automatically: More... | |
#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 | ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
ia64 More... | |
#define | YY_INPUT(buf, result, max_size) |
Gets input and stuffs it into "buf". More... | |
#define | yyterminate() return YY_NULL |
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. 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_BREAK /**INTED*/break; |
!YY_DECL More... | |
#define | YY_RULE_SETUP |
#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 |
Enumerations | |
enum | gather_comment_state_t { PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT , GATHER_SPACES , GATHER_COMMENT } |
A state-machine to gather the trailing comments of a statement with an heuristic to decide if some comments and spaces will go into the previous or next top-level construct: More... | |
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) |
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) |
static void | gdb_marker () |
void | reset_csplit_line_number () |
Reinitialise global position numbers for a new file. More... | |
static void | update_csplit_current_beginning () |
If we encounter a possible function begin, just snapshot the position of the function beginning: More... | |
void | reset_csplit_current_beginning () |
This function is called at the end of any top-level C construct: More... | |
int | get_csplit_current_beginning () |
int | get_user_current_beginning () |
Get the current line number in the file to split from the user point of view (before preprocessor expansion): More... | |
size_t | get_csplit_file_offset_beginning () |
Get the file position in the file to split where the current function begins: More... | |
size_t | get_current_csplit_file_offset () |
Get the current file position in the file to split: More... | |
void | update_csplit_file_offset_information () |
Function called each time a token is read to trac file position information: More... | |
static int | lf_count (string s) |
static int | is_c_preprocessor_keyword_typedef (char *id) |
See if id is a keyword, a typedef or an identifier. More... | |
static int | yy_init_globals (void) |
void | yyset_debug (int debug_flag) |
void | yyset_extra (YY_EXTRA_TYPE user_defined) |
void | yyset_in (FILE *_in_str) |
void | yyset_out (FILE *_out_str) |
void | yyset_lineno (int _line_number) |
if (!(yy_init)) | |
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 [271] |
static const YY_CHAR | yy_ec [256] |
static const YY_CHAR | yy_meta [65] |
static const flex_int16_t | yy_base [316] |
static const flex_int16_t | yy_def [316] |
static const flex_int16_t | yy_nxt [860] |
static const flex_int16_t | yy_chk [860] |
static const flex_int32_t | yy_rule_can_match_eol [73] |
Table of booleans, true if rule could match eol. More... | |
static yy_state_type | yy_last_accepting_state |
static char * | yy_last_accepting_cpos |
int | yy_flex_debug = 0 |
int | csplit_line_number = 1 |
To be exported to the parser for splitting the preprocessed file. More... | |
int | user_line_number = 1 |
To be exported to the parser for error messages related to the user file. More... | |
size_t | current_csplit_file_offset = 0 |
size_t | csplit_file_offset_beginning = 0 |
static int | bracket_depth = 0 |
To track nesting in brackets. More... | |
enum gather_comment_state_t | gather_comment_state_machine = PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT |
Indeed it does not work since csplit_copy() is called from splitc.y when a function definition is found and thus we cannot gather the comment in it... More... | |
static int | csplit_current_beginning = 1000000 |
static int | user_current_beginning = 1000000 |
static int | previous_keyword_token = TOKEN_UNDEFINED |
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 INITIAL 0 |
#define LEXER_RETURN | ( | t | ) | return(previous_keyword_token=t) |
#define REJECT reject_used_but_not_detected |
#define TK_TYPE_P | ( | tk | ) |
#define TOKEN_UNDEFINED (-1) |
#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 splitc__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 splitc__flex_debug |
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
Gets input and stuffs it into "buf".
number of characters read, or YY_NULL, is returned in "result".
#define YY_LESS_LINENO | ( | n | ) |
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 yylex. One obvious solution it to make yy_act a global. I tried that, and saw a 5% performance hit in a non-yylineno scanner, because yy_act is normally declared as a register variable– so it is not worth it.
#define YY_LINENO_REWIND_TO | ( | dst | ) |
#define yy_load_buffer_state | ( | void | ) | splitc__load_buffer_state |
#define yy_new_buffer yy_create_buffer |
#define YY_NO_INPUT 1 |
#define YY_READ_BUF_SIZE 8192 |
#define YY_RULE_SETUP |
#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 update_csplit_file_offset_information(); |
#define yyalloc splitc_alloc |
#define yyconst const |
#define yyensure_buffer_stack | ( | void | ) | splitc_ensure_buffer_stack |
#define yyfree splitc_free |
#define yyget_debug | ( | void | ) | splitc_get_debug |
#define yyget_in | ( | void | ) | splitc_get_in |
#define yyget_leng | ( | void | ) | splitc_get_leng |
#define yyget_lineno | ( | void | ) | splitc_get_lineno |
#define yyget_out | ( | void | ) | splitc_get_out |
#define yyget_text | ( | void | ) | splitc_get_text |
#define yyleng splitc_leng |
#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 | ( | void | ) | splitc_lex |
#define yylex_destroy | ( | void | ) | splitc_lex_destroy |
#define yylineno splitc_lineno |
#define yyout splitc_out |
#define yypop_buffer_state | ( | void | ) | splitc_pop_buffer_state |
#define yyrealloc splitc_realloc |
#define yyrestart splitc_restart |
#define yyset_debug splitc_set_debug |
#define yyset_in splitc_set_in |
#define yyset_lineno splitc_set_lineno |
#define yyset_out splitc_set_out |
#define YYTABLES_NAME "yytables" |
#define yytext splitc_text |
#define yywrap | ( | void | ) | splitc_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 |
A state-machine to gather the trailing comments of a statement with an heuristic to decide if some comments and spaces will go into the previous or next top-level construct:
Definition at line 1101 of file lexer.c.
|
static |
int get_csplit_current_beginning | ( | void | ) |
size_t get_csplit_file_offset_beginning | ( | void | ) |
Get the file position in the file to split where the current function begins:
Definition at line 1205 of file lexer.c.
References csplit_file_offset_beginning.
size_t get_current_csplit_file_offset | ( | void | ) |
Get the current file position in the file to split:
Definition at line 1211 of file lexer.c.
References current_csplit_file_offset.
int get_user_current_beginning | ( | void | ) |
Get the current line number in the file to split from the user point of view (before preprocessor expansion):
Definition at line 1198 of file lexer.c.
References user_current_beginning.
if | ( | ! | yy_init | ) |
first start state
Definition at line 1498 of file lexer.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.
|
static |
See if id is a keyword, a typedef or an identifier.
Returns the token number for keywords and typedefs. Returns 0 for variable identifiers.
No need to bother for scopes when dealing with C keywords, but do not take into account top-level typedefs which may be masked.
Check again for a global typedef
FI: we bet here that "extern foo(t1, t2, t3);" with t1, t2 and t3 named type is not possible:-(
Definition at line 1250 of file lexer.c.
References bracket_depth, concatenate(), fprintf(), free(), get_preprocessor_current_scope(), get_preprocessor_nth_scope(), ifdebug, is_c_keyword_typedef(), pips_debug, preprocessor_scope_number(), previous_keyword_token, strdup(), TK_NAMED_TYPE, TK_STATIC, TK_STATIC_DIMENSION, and TK_TYPE_P.
void reset_csplit_current_beginning | ( | void | ) |
This function is called at the end of any top-level C construct:
Snapshot the current file position as a potential function begin:
Aggregate following spaces and comments on the sameline to the previous top-level construct:
FI: I'm not ready to abort() here...
Definition at line 1152 of file lexer.c.
References check_signature_balance(), csplit_current_beginning, csplit_current_function_name, csplit_current_function_name2, csplit_definite_function_name, csplit_definite_function_signature, csplit_file_offset_beginning, csplit_is_static_p, current_csplit_file_offset, free(), GATHER_COMMENT, gather_comment_state_machine, pips_debug, string_undefined, string_undefined_p, and user_current_beginning.
void reset_csplit_line_number | ( | void | ) |
Reinitialise global position numbers for a new file.
Definition at line 1124 of file lexer.c.
References bracket_depth, csplit_file_offset_beginning, csplit_line_number, current_csplit_file_offset, gather_comment_state_machine, PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT, and user_line_number.
Referenced by csplit_error_handler(), and csplit_reset().
|
static |
If we encounter a possible function begin, just snapshot the position of the function beginning:
From now, the comments and spaces are associated to the current top-level construct:
Definition at line 1140 of file lexer.c.
References csplit_current_beginning, csplit_line_number, gather_comment_state_machine, PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT, user_current_beginning, and user_line_number.
void update_csplit_file_offset_information | ( | void | ) |
Function called each time a token is read to trac file position information:
Definition at line 1218 of file lexer.c.
References current_csplit_file_offset, and yyleng.
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 |
To track nesting in brackets.
Definition at line 1096 of file lexer.c.
Referenced by is_c_preprocessor_keyword_typedef(), and reset_csplit_line_number().
|
static |
Definition at line 1134 of file lexer.c.
Referenced by get_csplit_current_beginning(), reset_csplit_current_beginning(), and update_csplit_current_beginning().
size_t csplit_file_offset_beginning = 0 |
Definition at line 1093 of file lexer.c.
Referenced by get_csplit_file_offset_beginning(), reset_csplit_current_beginning(), and reset_csplit_line_number().
int csplit_line_number = 1 |
To be exported to the parser for splitting the preprocessed file.
Definition at line 1085 of file lexer.c.
Referenced by csplit_parser_warning_alist(), reset_csplit_line_number(), and update_csplit_current_beginning().
size_t current_csplit_file_offset = 0 |
Definition at line 1092 of file lexer.c.
Referenced by get_current_csplit_file_offset(), reset_csplit_current_beginning(), reset_csplit_line_number(), and update_csplit_file_offset_information().
enum gather_comment_state_t gather_comment_state_machine = PUT_IN_NEXT_TOP_LEVEL_CONSTRUCT |
Indeed it does not work since csplit_copy() is called from splitc.y when a function definition is found and thus we cannot gather the comment in it...
:-(
Definition at line 1096 of file lexer.c.
Referenced by reset_csplit_current_beginning(), reset_csplit_line_number(), and update_csplit_current_beginning().
|
static |
Definition at line 1240 of file lexer.c.
Referenced by is_c_preprocessor_keyword_typedef().
|
static |
Definition at line 1135 of file lexer.c.
Referenced by get_user_current_beginning(), reset_csplit_current_beginning(), and update_csplit_current_beginning().
int user_line_number = 1 |
To be exported to the parser for error messages related to the user file.
Definition at line 1087 of file lexer.c.
Referenced by c_parser_error(), reset_csplit_line_number(), and update_csplit_current_beginning().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
YY_DECL |
The main scanner function which does all the work.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Table of booleans, true if rule could match eol.
|
static |