diff options
author | Adam Mitz <mitza@ociweb.com> | 2015-04-17 09:19:14 -0500 |
---|---|---|
committer | Adam Mitz <mitza@ociweb.com> | 2015-04-17 09:19:14 -0500 |
commit | 8a6e0893941061b06716dabf2bcfb0a808dd6e97 (patch) | |
tree | 9c89e036c2c5c176a14d3d11e7fc587c9d16fd18 /TAO/TAO_IDL/fe | |
parent | a062f5e8bd0dff4c584152e32b1fb3c7823ec572 (diff) | |
download | ATCD-8a6e0893941061b06716dabf2bcfb0a808dd6e97.tar.gz |
Debugging lexer and parser. Fixed some warnings.
Diffstat (limited to 'TAO/TAO_IDL/fe')
-rw-r--r-- | TAO/TAO_IDL/fe/idl.tab.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.ypp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.yy.cpp | 338 |
3 files changed, 334 insertions, 8 deletions
diff --git a/TAO/TAO_IDL/fe/idl.tab.cpp b/TAO/TAO_IDL/fe/idl.tab.cpp index fa098b0a64c..38d5828e00d 100644 --- a/TAO/TAO_IDL/fe/idl.tab.cpp +++ b/TAO/TAO_IDL/fe/idl.tab.cpp @@ -145,7 +145,7 @@ AST_Enum *tao_enum_constant_decl = 0; AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none; #define TAO_YYDEBUG_LEXER_TEXT (tao_yytext[tao_yyleng] = '\0', tao_yytext) // Force the pretty debugging code to compile. -#define TAO_YYDEBUG 1 +#define YYDEBUG 1 #line 151 "fe/idl.tab.cpp" /* yacc.c:339 */ diff --git a/TAO/TAO_IDL/fe/idl.ypp b/TAO/TAO_IDL/fe/idl.ypp index a49b5f88b3f..ef971843508 100644 --- a/TAO/TAO_IDL/fe/idl.ypp +++ b/TAO/TAO_IDL/fe/idl.ypp @@ -144,7 +144,7 @@ AST_Enum *tao_enum_constant_decl = 0; AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none; #define TAO_YYDEBUG_LEXER_TEXT (tao_yytext[tao_yyleng] = '\0', tao_yytext) // Force the pretty debugging code to compile. -#define TAO_YYDEBUG 1 +#define YYDEBUG 1 %} /* diff --git a/TAO/TAO_IDL/fe/idl.yy.cpp b/TAO/TAO_IDL/fe/idl.yy.cpp index 909664306b8..95e69cc69d5 100644 --- a/TAO/TAO_IDL/fe/idl.yy.cpp +++ b/TAO/TAO_IDL/fe/idl.yy.cpp @@ -1,10 +1,15 @@ +#line 2 "fe/idl.yy.cpp" -#line 3 "<stdout>" +#line 4 "fe/idl.yy.cpp" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ +/* %not-for-header */ + +/* %if-c-only */ +/* %if-not-reentrant */ #define yy_create_buffer tao_yy_create_buffer #define yy_delete_buffer tao_yy_delete_buffer #define yy_flex_debug tao_yy_flex_debug @@ -24,6 +29,10 @@ #define yyrealloc tao_yyrealloc #define yyfree tao_yyfree +/* %endif */ +/* %endif */ +/* %ok-for-header */ + #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 @@ -32,13 +41,29 @@ #define FLEX_BETA #endif +/* %if-c++-only */ +/* %endif */ + +/* %if-c-only */ + +/* %endif */ + +/* %if-c-only */ + +/* %endif */ + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ +/* %if-c-only */ #include "ace/OS_NS_stdio.h" +/* %endif */ +/* %if-tables-serialization */ +/* %endif */ /* end standard C headers. */ +/* %if-c-or-c++ */ /* flex integer type definitions */ #ifndef FLEXINT_H @@ -103,6 +128,11 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ +/* %endif */ + +/* %if-c++-only */ +/* %endif */ + #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ @@ -124,8 +154,13 @@ typedef unsigned int flex_uint32_t; #define yyconst #endif +/* %not-for-header */ + /* Returned upon end-of-file. */ #define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, @@ -133,6 +168,14 @@ typedef unsigned int flex_uint32_t; * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ /* 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 @@ -177,9 +220,15 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +/* %if-not-reentrant */ extern int tao_yyleng; +/* %endif */ +/* %if-c-only */ +/* %if-not-reentrant */ extern FILE *tao_yyin, *tao_yyout; +/* %endif */ +/* %endif */ #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 @@ -212,7 +261,12 @@ typedef size_t yy_size_t; #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { +/* %if-c-only */ FILE *yy_input_file; +/* %endif */ + +/* %if-c++-only */ +/* %endif */ char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ @@ -273,10 +327,19 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ + +/* %if-not-reentrant */ + /* 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. */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -293,6 +356,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] +/* %if-c-only Standard (non-C++) definition */ + +/* %if-not-reentrant */ +/* %not-for-header */ + /* yy_hold_char holds the character lost when tao_yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ @@ -307,6 +375,9 @@ static int yy_start = 0; /* start state number */ * instead of setting up a fresh tao_yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; +/* %ok-for-header */ + +/* %endif */ void tao_yyrestart (FILE *input_file ); void tao_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); @@ -326,6 +397,8 @@ YY_BUFFER_STATE tao_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE tao_yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE tao_yy_scan_bytes (yyconst char *bytes,int len ); +/* %endif */ + void *tao_yyalloc (yy_size_t ); void *tao_yyrealloc (void *,yy_size_t ); void tao_yyfree (void * ); @@ -354,8 +427,11 @@ void tao_yyfree (void * ); #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) +/* %% [1.0] tao_yytext/tao_yyin/tao_yyout/yy_state_type/tao_yylineno etc. def's & init go here */ /* Begin user sect3 */ +#define FLEX_DEBUG + typedef unsigned char YY_CHAR; FILE *tao_yyin = (FILE *) 0, *tao_yyout = (FILE *) 0; @@ -368,24 +444,31 @@ int tao_yylineno = 1; extern char tao_yytext[]; +/* %if-c-only Standard (non-C++) definition */ + 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[] ); +/* %endif */ + /* Done after the current pattern has been matched and before the * corresponding action - sets up tao_yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ +/* %% [2.0] code to fiddle tao_yytext and tao_yyleng for yymore() goes here \ */\ tao_yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to tao_yytext[] goes here, if %array \ */\ if ( tao_yyleng >= YYLMAX ) \ YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ yy_flex_strncpy( tao_yytext, (yytext_ptr), tao_yyleng + 1 ); \ (yy_c_buf_p) = yy_cp; +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ #define YY_NUM_RULES 111 #define YY_END_OF_BUFFER 112 /* This struct is not used in this scanner, @@ -935,7 +1018,23 @@ static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int tao_yy_flex_debug; -int tao_yy_flex_debug = 0; +int tao_yy_flex_debug = 1; + +static yyconst flex_int16_t yy_rule_linenum[111] = + { 0, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 155, 156, 157, 158, 159, 160, + 161, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, + 183, 184, 185, 186, 188, 189, 191, 192, 193, 194, + 196, 197, 198, 203, 236, 240, 245, 250, 254, 258, + 262, 266, 270, 275, 295, 313, 317, 322, 327, 331, + 336, 341, 342, 347, 348, 352, 353, 357, 358, 362, + + 363, 367, 368, 372, 373, 378, 383, 401, 402, 405 + } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1061,7 +1160,7 @@ static AST_Decl * idl_find_node (char *); #endif /*USE_MCPP_BUFFER_LEXING*/ /* SO we don't choke on files that use \r\n */ -#line 1068 "<stdout>" +#line 1167 "fe/idl.yy.cpp" #define INITIAL 0 @@ -1070,15 +1169,28 @@ static AST_Decl * idl_find_node (char *); * 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. */ +/* %if-c-only */ #include "ace/os_include/os_ctype.h" +/* %endif */ +/* %if-c++-only */ +/* %endif */ #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ + static int yy_init_globals (void ); +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif End reentrant structures and macros. */ + /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ @@ -1108,6 +1220,9 @@ int tao_yyget_lineno (void ); void tao_yyset_lineno (int line_number ); +/* %if-bison-bridge */ +/* %endif */ + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -1120,8 +1235,14 @@ extern int tao_yywrap (void ); #endif #endif +/* %not-for-header */ + static void yyunput (int c,char *buf_ptr ); +/* %ok-for-header */ + +/* %endif */ + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -1131,15 +1252,23 @@ static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif +/* %ok-for-header */ +/* %endif */ #endif +/* %if-c-only */ + +/* %endif */ + /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ @@ -1152,10 +1281,14 @@ static int input (void ); /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( tao_yytext, tao_yyleng, 1, tao_yyout )) {} } while (0) +/* %endif */ +/* %if-c++-only C++ definition */ +/* %endif */ #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1163,6 +1296,7 @@ static int input (void ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ +/* %% [5.0] static_cast<int> (fread())/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ @@ -1191,6 +1325,8 @@ static int input (void ); } \ }\ \ +/* %if-c++-only C++ definition \ */\ +/* %endif */ #endif @@ -1209,20 +1345,39 @@ static int input (void ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR +/* %if-c-only */ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ #endif +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %not-for-header */ + +/* %tables-yydmap generated elements */ +/* %endif */ /* end tables serialization structures and prototypes */ +/* %ok-for-header */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ extern int tao_yylex (void); #define YY_DECL int tao_yylex (void) +/* %endif */ +/* %if-c++-only C++ definition */ +/* %endif */ #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after tao_yytext and tao_yyleng @@ -1237,12 +1392,15 @@ extern int tao_yylex (void); #define YY_BREAK ACE_NOTREACHED (break;) #endif +/* %% [6.0] YY_RULE_SETUP definition goes here */ #define YY_RULE_SETUP \ if ( tao_yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (tao_yytext[tao_yyleng - 1] == '\n'); \ YY_USER_ACTION +/* %not-for-header */ + /** The main scanner function which does all the work. */ YY_DECL @@ -1251,10 +1409,11 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; +/* %% [7.0] user's declarations go here */ #line 118 "fe/idl.ll" -#line 1261 "<stdout>" +#line 1420 "fe/idl.yy.cpp" if ( !(yy_init) ) { @@ -1268,10 +1427,18 @@ YY_DECL (yy_start) = 1; /* first start state */ if ( ! tao_yyin ) +/* %if-c-only */ tao_yyin = stdin; +/* %endif */ +/* %if-c++-only */ +/* %endif */ if ( ! tao_yyout ) +/* %if-c-only */ tao_yyout = stdout; +/* %endif */ +/* %if-c++-only */ +/* %endif */ if ( ! YY_CURRENT_BUFFER ) { tao_yyensure_buffer_stack (); @@ -1284,6 +1451,7 @@ YY_DECL while ( 1 ) /* loops until end-of-file is reached */ { +/* %% [8.0] yymore()-related code goes here */ yy_cp = (yy_c_buf_p); /* Support of tao_yytext. */ @@ -1294,6 +1462,7 @@ YY_DECL */ yy_bp = yy_cp; +/* %% [9.0] code to set up and find next match goes here */ yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); yy_match: @@ -1319,14 +1488,35 @@ yy_match: yy_current_state = (yy_last_accepting_state); yy_find_action: +/* %% [10.0] code to find the action number goes here */ yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; +/* %% [11.0] code for tao_yylineno update goes here */ + do_action: /* This label is used only to access EOF actions. */ +/* %% [12.0] debug code goes here */ + if ( tao_yy_flex_debug ) + { + if ( yy_act == 0 ) + fprintf( stderr, "--scanner backing up\n" ); + else if ( yy_act < 111 ) + fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", + (long)yy_rule_linenum[yy_act], tao_yytext ); + else if ( yy_act == 111 ) + fprintf( stderr, "--accepting default rule (\"%s\")\n", + tao_yytext ); + else if ( yy_act == 112 ) + fprintf( stderr, "--(end of buffer or a NUL)\n" ); + else + fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); + } + switch ( yy_act ) { /* beginning of action switch */ +/* %% [13.0] actions go here */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); @@ -2051,7 +2241,7 @@ YY_RULE_SETUP #line 407 "fe/idl.ll" ECHO; YY_BREAK -#line 2058 "<stdout>" +#line 2248 "fe/idl.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2118,6 +2308,7 @@ case YY_STATE_EOF(INITIAL): else { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; @@ -2184,6 +2375,14 @@ case YY_STATE_EOF(INITIAL): } /* end of action switch */ } /* end of scanning one token */ } /* end of tao_yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ /* yy_get_next_buffer - try to read in a new buffer * @@ -2192,7 +2391,11 @@ case YY_STATE_EOF(INITIAL): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ +/* %if-c-only */ static int yy_get_next_buffer (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); @@ -2326,16 +2529,24 @@ static int yy_get_next_buffer (void) /* yy_get_previous_state - get the state just before the EOB char was reached */ +/* %if-c-only */ +/* %not-for-header */ + static yy_state_type yy_get_previous_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { register yy_state_type yy_current_state; register char *yy_cp; +/* %% [15.0] code to get the start state into yy_current_state goes here */ 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 ) { +/* %% [16.0] code to find the next state goes here */ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { @@ -2359,10 +2570,15 @@ static int yy_get_next_buffer (void) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ +/* %if-c-only */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) @@ -2382,7 +2598,12 @@ static int yy_get_next_buffer (void) return yy_is_jam ? 0 : yy_current_state; } +/* %if-c-only */ + static void yyunput (int c, register char * yy_bp ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { register char *yy_cp; @@ -2414,11 +2635,17 @@ static int yy_get_next_buffer (void) *--yy_cp = (char) c; +/* %% [18.0] update tao_yylineno here */ + (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } +/* %if-c-only */ + +/* %endif */ +/* %if-c-only */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -2426,6 +2653,9 @@ static int yy_get_next_buffer (void) static int input (void) #endif +/* %endif */ +/* %if-c++-only */ +/* %endif */ { int c; @@ -2489,18 +2719,25 @@ static int yy_get_next_buffer (void) *(yy_c_buf_p) = '\0'; /* preserve tao_yytext */ (yy_hold_char) = *++(yy_c_buf_p); +/* %% [19.0] update BOL and tao_yylineno */ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } +/* %if-c-only */ #endif /* ifndef YY_NO_INPUT */ +/* %endif */ /** 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 . */ +/* %if-c-only */ void tao_yyrestart (FILE * input_file ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { if ( ! YY_CURRENT_BUFFER ){ @@ -2517,7 +2754,11 @@ static int yy_get_next_buffer (void) * @param new_buffer The new input buffer. * */ +/* %if-c-only */ void tao_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { /* TODO. We should be able to replace this entire function body @@ -2548,7 +2789,11 @@ static int yy_get_next_buffer (void) (yy_did_buffer_switch_on_eof) = 1; } +/* %if-c-only */ static void tao_yy_load_buffer_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; @@ -2562,7 +2807,11 @@ static void tao_yy_load_buffer_state (void) * * @return the allocated buffer state. */ +/* %if-c-only */ YY_BUFFER_STATE tao_yy_create_buffer (FILE * file, int size ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { YY_BUFFER_STATE b; @@ -2590,7 +2839,11 @@ static void tao_yy_load_buffer_state (void) * @param b a buffer created with tao_yy_create_buffer() * */ +/* %if-c-only */ void tao_yy_delete_buffer (YY_BUFFER_STATE b ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { if ( ! b ) @@ -2605,11 +2858,22 @@ static void tao_yy_load_buffer_state (void) tao_yyfree((void *) b ); } +/* %if-c-only */ + +/* %endif */ + +/* %if-c++-only */ +/* %endif */ + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a tao_yyrestart() or at EOF. */ +/* %if-c-only */ static void tao_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { int oerrno = errno; @@ -2628,8 +2892,13 @@ static void tao_yy_load_buffer_state (void) b->yy_bs_column = 0; } +/* %if-c-only */ + b->yy_is_interactive = 0; +/* %endif */ +/* %if-c++-only */ +/* %endif */ errno = oerrno; } @@ -2637,7 +2906,11 @@ static void tao_yy_load_buffer_state (void) * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ +/* %if-c-only */ void tao_yy_flush_buffer (YY_BUFFER_STATE b ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { if ( ! b ) return; @@ -2660,13 +2933,18 @@ static void tao_yy_load_buffer_state (void) tao_yy_load_buffer_state( ); } +/* %if-c-or-c++ */ /** 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. * */ +/* %if-c-only */ void tao_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { if (new_buffer == 0) return; @@ -2691,12 +2969,18 @@ void tao_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) tao_yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } +/* %endif */ +/* %if-c-or-c++ */ /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ +/* %if-c-only */ void tao_yypop_buffer_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { if (!YY_CURRENT_BUFFER) return; @@ -2711,11 +2995,17 @@ void tao_yypop_buffer_state (void) (yy_did_buffer_switch_on_eof) = 1; } } +/* %endif */ +/* %if-c-or-c++ */ /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ +/* %if-c-only */ static void tao_yyensure_buffer_stack (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ { int num_to_alloc; @@ -2757,7 +3047,9 @@ static void tao_yyensure_buffer_stack (void) (yy_buffer_stack_max) = num_to_alloc; } } +/* %endif */ +/* %if-c-only */ /** 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 @@ -2792,7 +3084,9 @@ YY_BUFFER_STATE tao_yy_scan_buffer (char * base, yy_size_t size ) return b; } +/* %endif */ +/* %if-c-only */ /** Setup the input buffer state to scan a string. The next call to tao_yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan @@ -2806,7 +3100,9 @@ YY_BUFFER_STATE tao_yy_scan_string (yyconst char * yystr ) return tao_yy_scan_bytes(yystr,strlen(yystr) ); } +/* %endif */ +/* %if-c-only */ /** Setup the input buffer state to scan the given bytes. The next call to tao_yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan @@ -2843,16 +3139,21 @@ YY_BUFFER_STATE tao_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) return b; } +/* %endif */ #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif +/* %if-c-only */ static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } +/* %endif */ +/* %if-c++-only */ +/* %endif */ /* Redefine yyless() so it works in section 3 code. */ @@ -2873,6 +3174,10 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ + /** Get the current line number. * */ @@ -2915,6 +3220,9 @@ char *tao_yyget_text (void) return tao_yytext; } +/* %if-reentrant */ +/* %endif */ + /** Set the current line number. * @param line_number * @@ -2951,6 +3259,14 @@ void tao_yyset_debug (int bdebug ) tao_yy_flex_debug = bdebug ; } +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif if-c-only */ + +/* %if-c-only */ static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. @@ -2978,7 +3294,9 @@ static int yy_init_globals (void) */ return 0; } +/* %endif */ +/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ /* tao_yylex_destroy is for both reentrant and non-reentrant scanners. */ int tao_yylex_destroy (void) { @@ -2998,8 +3316,11 @@ int tao_yylex_destroy (void) * tao_yylex() is called, initialization will occur. */ yy_init_globals( ); +/* %if-reentrant */ +/* %endif */ return 0; } +/* %endif */ /* * Internal utility routines. @@ -3047,7 +3368,12 @@ void tao_yyfree (void * ptr ) free( (char *) ptr ); /* see tao_yyrealloc() for (char *) cast */ } +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ #define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ #line 407 "fe/idl.ll" |