diff options
author | Adam Mitz <mitza-oci@users.noreply.github.com> | 2009-06-25 14:18:49 +0000 |
---|---|---|
committer | Adam Mitz <mitza-oci@users.noreply.github.com> | 2009-06-25 14:18:49 +0000 |
commit | 4f8ec33d664657b2f14f8bbe31e8e6ab331bfad3 (patch) | |
tree | 744d55cbff17d2a14028a9d4b244d6a3d512dcb0 | |
parent | 595288066599a58afd6577988ba481b65bd94612 (diff) | |
download | ATCD-4f8ec33d664657b2f14f8bbe31e8e6ab331bfad3.tar.gz |
ChangeLogTag: Thu Jun 25 14:17:46 UTC 2009 Adam Mitz <mitza@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/lex.yy.cpp | 1730 |
2 files changed, 871 insertions, 865 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 460682905c1..80b564dae93 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,9 @@ +Thu Jun 25 14:17:46 UTC 2009 Adam Mitz <mitza@ociweb.com> + + * TAO_IDL/fe/lex.yy.cpp: + + Untabify. + Tue Jun 23 20:06:54 UTC 2009 Adam Mitz <mitza@ociweb.com> * TAO_IDL/ast/ast_interface.cpp: diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp index 82d9a9e4b1f..3f455965d83 100644 --- a/TAO/TAO_IDL/fe/lex.yy.cpp +++ b/TAO/TAO_IDL/fe/lex.yy.cpp @@ -88,14 +88,14 @@ typedef unsigned int flex_uint32_t; /* The "const" storage-class-modifier is valid. */ #define TAO_YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ #if __STDC__ #define TAO_YY_USE_CONST -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ #ifdef TAO_YY_USE_CONST #define tao_yyconst const @@ -160,17 +160,17 @@ extern FILE *tao_yyin, *tao_yyout; /* Return all but the first "n" matched characters back to the input stream. */ #define tao_yyless(n) \ - do \ - { \ - /* Undo effects of setting up tao_yytext. */ \ + do \ + { \ + /* Undo effects of setting up tao_yytext. */ \ int tao_yyless_macro_arg = (n); \ TAO_YY_LESS_LINENO(tao_yyless_macro_arg);\ - *tao_yy_cp = (tao_yy_hold_char); \ - TAO_YY_RESTORE_TAO_YY_MORE_OFFSET \ - (tao_yy_c_buf_p) = tao_yy_cp = tao_yy_bp + tao_yyless_macro_arg - TAO_YY_MORE_ADJ; \ - TAO_YY_DO_BEFORE_ACTION; /* set up tao_yytext again */ \ - } \ - while ( 0 ) + *tao_yy_cp = (tao_yy_hold_char); \ + TAO_YY_RESTORE_TAO_YY_MORE_OFFSET \ + (tao_yy_c_buf_p) = tao_yy_cp = tao_yy_bp + tao_yyless_macro_arg - TAO_YY_MORE_ADJ; \ + TAO_YY_DO_BEFORE_ACTION; /* set up tao_yytext again */ \ + } \ + while ( 0 ) #define unput(c) tao_yyunput( c, (tao_yytext_ptr) ) @@ -187,66 +187,66 @@ typedef unsigned int tao_yy_size_t; #ifndef TAO_YY_STRUCT_TAO_YY_BUFFER_STATE #define TAO_YY_STRUCT_TAO_YY_BUFFER_STATE struct tao_yy_buffer_state - { - FILE *tao_yy_input_file; - - char *tao_yy_ch_buf; /* input buffer */ - char *tao_yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - tao_yy_size_t tao_yy_buf_size; - - /* Number of characters read into tao_yy_ch_buf, not including EOB - * characters. - */ - int tao_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 tao_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 static_cast<int> (fread()), to make sure we stop fetching input after - * each newline. - */ - int tao_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 tao_yy_at_bol; + { + FILE *tao_yy_input_file; + + char *tao_yy_ch_buf; /* input buffer */ + char *tao_yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + tao_yy_size_t tao_yy_buf_size; + + /* Number of characters read into tao_yy_ch_buf, not including EOB + * characters. + */ + int tao_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 tao_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 static_cast<int> (fread()), to make sure we stop fetching input after + * each newline. + */ + int tao_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 tao_yy_at_bol; int tao_yy_bs_lineno; /**< The line count. */ int tao_yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int tao_yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int tao_yy_fill_buffer; - int tao_yy_buffer_status; + int tao_yy_buffer_status; #define TAO_YY_BUFFER_NEW 0 #define TAO_YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as TAO_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 tao_yyrestart()), so that the user can continue scanning by - * just pointing tao_yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as TAO_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 tao_yyrestart()), so that the user can continue scanning by + * just pointing tao_yyin at a new input file. + */ #define TAO_YY_BUFFER_EOF_PENDING 2 - }; + }; #endif /* !TAO_YY_STRUCT_TAO_YY_BUFFER_STATE */ /* Stack of input buffers. */ @@ -271,13 +271,13 @@ static TAO_YY_BUFFER_STATE * tao_yy_buffer_stack = 0; /**< Stack as an array. */ /* tao_yy_hold_char holds the character lost when tao_yytext is formed. */ static char tao_yy_hold_char; -static int tao_yy_n_chars; /* number of characters read into tao_yy_ch_buf */ +static int tao_yy_n_chars; /* number of characters read into tao_yy_ch_buf */ int tao_yyleng; /* Points to current character in buffer. */ static char *tao_yy_c_buf_p = (char *) 0; -static int tao_yy_init = 0; /* whether we need to initialize */ -static int tao_yy_start = 0; /* start state number */ +static int tao_yy_init = 0; /* whether we need to initialize */ +static int tao_yy_start = 0; /* start state number */ /* Flag which is used to allow tao_yywrap()'s to do buffer switches * instead of setting up a fresh tao_yyin. A bit of a hack ... @@ -309,24 +309,24 @@ void tao_yyfree (void * ); #define tao_yy_new_buffer tao_yy_create_buffer #define tao_yy_set_interactive(is_interactive) \ - { \ - if ( ! TAO_YY_CURRENT_BUFFER ){ \ + { \ + if ( ! TAO_YY_CURRENT_BUFFER ){ \ tao_yyensure_buffer_stack (); \ - TAO_YY_CURRENT_BUFFER_LVALUE = \ + TAO_YY_CURRENT_BUFFER_LVALUE = \ tao_yy_create_buffer(tao_yyin,TAO_YY_BUF_SIZE ); \ - } \ - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_is_interactive = is_interactive; \ - } + } \ + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_is_interactive = is_interactive; \ + } #define tao_yy_set_bol(at_bol) \ - { \ - if ( ! TAO_YY_CURRENT_BUFFER ){\ + { \ + if ( ! TAO_YY_CURRENT_BUFFER ){\ tao_yyensure_buffer_stack (); \ - TAO_YY_CURRENT_BUFFER_LVALUE = \ + TAO_YY_CURRENT_BUFFER_LVALUE = \ tao_yy_create_buffer(tao_yyin,TAO_YY_BUF_SIZE ); \ - } \ - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = at_bol; \ - } + } \ + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = at_bol; \ + } #define TAO_YY_AT_BOL() (TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol) @@ -353,24 +353,24 @@ static void tao_yy_fatal_error (tao_yyconst char msg[] ); * corresponding action - sets up tao_yytext. */ #define TAO_YY_DO_BEFORE_ACTION \ - (tao_yytext_ptr) = tao_yy_bp; \ - tao_yyleng = (size_t) (tao_yy_cp - tao_yy_bp); \ - (tao_yy_hold_char) = *tao_yy_cp; \ - *tao_yy_cp = '\0'; \ - if ( tao_yyleng >= TAO_YYLMAX ) \ - TAO_YY_FATAL_ERROR( "token too large, exceeds TAO_YYLMAX" ); \ - tao_yy_flex_strncpy( tao_yytext, (tao_yytext_ptr), tao_yyleng + 1 ); \ - (tao_yy_c_buf_p) = tao_yy_cp; + (tao_yytext_ptr) = tao_yy_bp; \ + tao_yyleng = (size_t) (tao_yy_cp - tao_yy_bp); \ + (tao_yy_hold_char) = *tao_yy_cp; \ + *tao_yy_cp = '\0'; \ + if ( tao_yyleng >= TAO_YYLMAX ) \ + TAO_YY_FATAL_ERROR( "token too large, exceeds TAO_YYLMAX" ); \ + tao_yy_flex_strncpy( tao_yytext, (tao_yytext_ptr), tao_yyleng + 1 ); \ + (tao_yy_c_buf_p) = tao_yy_cp; #define TAO_YY_NUM_RULES 104 #define TAO_YY_END_OF_BUFFER 105 /* This struct is not used in this scanner, but its presence is necessary. */ struct tao_yy_trans_info - { - flex_int32_t tao_yy_verify; - flex_int32_t tao_yy_nxt; - }; + { + flex_int32_t tao_yy_verify; + flex_int32_t tao_yy_nxt; + }; static tao_yyconst flex_int16_t tao_yy_accept[562] = { 0, 101, 101, 105, 103, 101, 102, 102, 103, 103, 103, @@ -1075,33 +1075,33 @@ static int input (void ); */ #ifndef TAO_YY_INPUT #define TAO_YY_INPUT(buf,result,max_size) \ - if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( tao_yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( tao_yyin ) ) \ - TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = static_cast<int> (fread(buf, 1, max_size, tao_yyin)))==0 && ferror(tao_yyin)) \ - { \ - if( errno != EINTR) \ - { \ - TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(tao_yyin); \ - } \ - }\ + if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( tao_yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( tao_yyin ) ) \ + TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = static_cast<int> (fread(buf, 1, max_size, tao_yyin)))==0 && ferror(tao_yyin)) \ + { \ + if( errno != EINTR) \ + { \ + TAO_YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(tao_yyin); \ + } \ + }\ \ #endif @@ -1150,368 +1150,368 @@ extern int tao_yylex (void); #endif #define TAO_YY_RULE_SETUP \ - if ( tao_yyleng > 0 ) \ - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = \ - (tao_yytext[tao_yyleng - 1] == '\n'); \ - TAO_YY_USER_ACTION + if ( tao_yyleng > 0 ) \ + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = \ + (tao_yytext[tao_yyleng - 1] == '\n'); \ + TAO_YY_USER_ACTION /** The main scanner function which does all the work. */ TAO_YY_DECL { - register tao_yy_state_type tao_yy_current_state; - register char *tao_yy_cp, *tao_yy_bp; - register int tao_yy_act; + register tao_yy_state_type tao_yy_current_state; + register char *tao_yy_cp, *tao_yy_bp; + register int tao_yy_act; - if ( !(tao_yy_init) ) - { - (tao_yy_init) = 1; + if ( !(tao_yy_init) ) + { + (tao_yy_init) = 1; #ifdef TAO_YY_USER_INIT - TAO_YY_USER_INIT; + TAO_YY_USER_INIT; #endif - if ( ! (tao_yy_start) ) - (tao_yy_start) = 1; /* first start state */ + if ( ! (tao_yy_start) ) + (tao_yy_start) = 1; /* first start state */ - if ( ! tao_yyin ) - tao_yyin = stdin; + if ( ! tao_yyin ) + tao_yyin = stdin; - if ( ! tao_yyout ) - tao_yyout = stdout; + if ( ! tao_yyout ) + tao_yyout = stdout; - if ( ! TAO_YY_CURRENT_BUFFER ) { - tao_yyensure_buffer_stack (); - TAO_YY_CURRENT_BUFFER_LVALUE = - tao_yy_create_buffer(tao_yyin,TAO_YY_BUF_SIZE ); - } + if ( ! TAO_YY_CURRENT_BUFFER ) { + tao_yyensure_buffer_stack (); + TAO_YY_CURRENT_BUFFER_LVALUE = + tao_yy_create_buffer(tao_yyin,TAO_YY_BUF_SIZE ); + } - tao_yy_load_buffer_state( ); - } + tao_yy_load_buffer_state( ); + } - while ( 1 ) /* loops until end-of-file is reached */ - { - tao_yy_cp = (tao_yy_c_buf_p); + while ( 1 ) /* loops until end-of-file is reached */ + { + tao_yy_cp = (tao_yy_c_buf_p); - /* Support of tao_yytext. */ - *tao_yy_cp = (tao_yy_hold_char); + /* Support of tao_yytext. */ + *tao_yy_cp = (tao_yy_hold_char); - /* tao_yy_bp points to the position in tao_yy_ch_buf of the start of - * the current run. - */ - tao_yy_bp = tao_yy_cp; + /* tao_yy_bp points to the position in tao_yy_ch_buf of the start of + * the current run. + */ + tao_yy_bp = tao_yy_cp; - tao_yy_current_state = (tao_yy_start); - tao_yy_current_state += TAO_YY_AT_BOL(); + tao_yy_current_state = (tao_yy_start); + tao_yy_current_state += TAO_YY_AT_BOL(); tao_yy_match: - do - { - register TAO_YY_CHAR tao_yy_c = tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)]; - if ( tao_yy_accept[tao_yy_current_state] ) - { - (tao_yy_last_accepting_state) = tao_yy_current_state; - (tao_yy_last_accepting_cpos) = tao_yy_cp; - } - while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) - { - tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; - if ( tao_yy_current_state >= 562 ) - tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; - } - tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; - ++tao_yy_cp; - } - while ( tao_yy_current_state != 561 ); - tao_yy_cp = (tao_yy_last_accepting_cpos); - tao_yy_current_state = (tao_yy_last_accepting_state); + do + { + register TAO_YY_CHAR tao_yy_c = tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)]; + if ( tao_yy_accept[tao_yy_current_state] ) + { + (tao_yy_last_accepting_state) = tao_yy_current_state; + (tao_yy_last_accepting_cpos) = tao_yy_cp; + } + while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) + { + tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; + if ( tao_yy_current_state >= 562 ) + tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; + } + tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; + ++tao_yy_cp; + } + while ( tao_yy_current_state != 561 ); + tao_yy_cp = (tao_yy_last_accepting_cpos); + tao_yy_current_state = (tao_yy_last_accepting_state); tao_yy_find_action: - tao_yy_act = tao_yy_accept[tao_yy_current_state]; + tao_yy_act = tao_yy_accept[tao_yy_current_state]; - TAO_YY_DO_BEFORE_ACTION; + TAO_YY_DO_BEFORE_ACTION; -do_action: /* This label is used only to access EOF actions. */ +do_action: /* This label is used only to access EOF actions. */ - switch ( tao_yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of TAO_YY_DO_BEFORE_ACTION */ - *tao_yy_cp = (tao_yy_hold_char); - tao_yy_cp = (tao_yy_last_accepting_cpos); - tao_yy_current_state = (tao_yy_last_accepting_state); - goto tao_yy_find_action; + switch ( tao_yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of TAO_YY_DO_BEFORE_ACTION */ + *tao_yy_cp = (tao_yy_hold_char); + tao_yy_cp = (tao_yy_last_accepting_cpos); + tao_yy_current_state = (tao_yy_last_accepting_state); + goto tao_yy_find_action; case 1: TAO_YY_RULE_SETUP return IDL_ANY; - TAO_YY_BREAK + TAO_YY_BREAK case 2: TAO_YY_RULE_SETUP return IDL_OBJECT; - TAO_YY_BREAK + TAO_YY_BREAK case 3: TAO_YY_RULE_SETUP return IDL_MODULE; - TAO_YY_BREAK + TAO_YY_BREAK case 4: TAO_YY_RULE_SETUP return IDL_RAISES; - TAO_YY_BREAK + TAO_YY_BREAK case 5: TAO_YY_RULE_SETUP return IDL_READONLY; - TAO_YY_BREAK + TAO_YY_BREAK case 6: TAO_YY_RULE_SETUP return IDL_ATTRIBUTE; - TAO_YY_BREAK + TAO_YY_BREAK case 7: TAO_YY_RULE_SETUP return IDL_EXCEPTION; - TAO_YY_BREAK + TAO_YY_BREAK case 8: TAO_YY_RULE_SETUP return IDL_CONTEXT; - TAO_YY_BREAK + TAO_YY_BREAK case 9: TAO_YY_RULE_SETUP return IDL_INTERFACE; - TAO_YY_BREAK + TAO_YY_BREAK case 10: TAO_YY_RULE_SETUP return IDL_CONST; - TAO_YY_BREAK + TAO_YY_BREAK case 11: TAO_YY_RULE_SETUP return IDL_TYPEDEF; - TAO_YY_BREAK + TAO_YY_BREAK case 12: TAO_YY_RULE_SETUP return IDL_STRUCT; - TAO_YY_BREAK + TAO_YY_BREAK case 13: TAO_YY_RULE_SETUP return IDL_ENUM; - TAO_YY_BREAK + TAO_YY_BREAK case 14: TAO_YY_RULE_SETUP return IDL_STRING; - TAO_YY_BREAK + TAO_YY_BREAK case 15: TAO_YY_RULE_SETUP return IDL_WSTRING; - TAO_YY_BREAK + TAO_YY_BREAK case 16: TAO_YY_RULE_SETUP return IDL_SEQUENCE; - TAO_YY_BREAK + TAO_YY_BREAK case 17: TAO_YY_RULE_SETUP return IDL_UNION; - TAO_YY_BREAK + TAO_YY_BREAK case 18: TAO_YY_RULE_SETUP return IDL_FIXED; - TAO_YY_BREAK + TAO_YY_BREAK case 19: TAO_YY_RULE_SETUP return IDL_SWITCH; - TAO_YY_BREAK + TAO_YY_BREAK case 20: TAO_YY_RULE_SETUP return IDL_CASE; - TAO_YY_BREAK + TAO_YY_BREAK case 21: TAO_YY_RULE_SETUP return IDL_DEFAULT; - TAO_YY_BREAK + TAO_YY_BREAK case 22: TAO_YY_RULE_SETUP return IDL_FLOAT; - TAO_YY_BREAK + TAO_YY_BREAK case 23: TAO_YY_RULE_SETUP return IDL_DOUBLE; - TAO_YY_BREAK + TAO_YY_BREAK case 24: TAO_YY_RULE_SETUP return IDL_LONG; - TAO_YY_BREAK + TAO_YY_BREAK case 25: TAO_YY_RULE_SETUP return IDL_SHORT; - TAO_YY_BREAK + TAO_YY_BREAK case 26: TAO_YY_RULE_SETUP return IDL_UNSIGNED; - TAO_YY_BREAK + TAO_YY_BREAK case 27: TAO_YY_RULE_SETUP return IDL_CHAR; - TAO_YY_BREAK + TAO_YY_BREAK case 28: TAO_YY_RULE_SETUP return IDL_WCHAR; - TAO_YY_BREAK + TAO_YY_BREAK case 29: TAO_YY_RULE_SETUP return IDL_BOOLEAN; - TAO_YY_BREAK + TAO_YY_BREAK case 30: TAO_YY_RULE_SETUP return IDL_OCTET; - TAO_YY_BREAK + TAO_YY_BREAK case 31: TAO_YY_RULE_SETUP return IDL_VOID; - TAO_YY_BREAK + TAO_YY_BREAK case 32: TAO_YY_RULE_SETUP return IDL_NATIVE; - TAO_YY_BREAK + TAO_YY_BREAK case 33: TAO_YY_RULE_SETUP return IDL_LOCAL; - TAO_YY_BREAK + TAO_YY_BREAK case 34: TAO_YY_RULE_SETUP return IDL_ABSTRACT; - TAO_YY_BREAK + TAO_YY_BREAK case 35: TAO_YY_RULE_SETUP return IDL_CUSTOM; - TAO_YY_BREAK + TAO_YY_BREAK case 36: TAO_YY_RULE_SETUP return IDL_FACTORY; - TAO_YY_BREAK + TAO_YY_BREAK case 37: TAO_YY_RULE_SETUP return IDL_PRIVATE; - TAO_YY_BREAK + TAO_YY_BREAK case 38: TAO_YY_RULE_SETUP return IDL_PUBLIC; - TAO_YY_BREAK + TAO_YY_BREAK case 39: TAO_YY_RULE_SETUP return IDL_SUPPORTS; - TAO_YY_BREAK + TAO_YY_BREAK case 40: TAO_YY_RULE_SETUP return IDL_TRUNCATABLE; - TAO_YY_BREAK + TAO_YY_BREAK case 41: TAO_YY_RULE_SETUP return IDL_VALUETYPE; - TAO_YY_BREAK + TAO_YY_BREAK case 42: TAO_YY_RULE_SETUP return IDL_COMPONENT; - TAO_YY_BREAK + TAO_YY_BREAK case 43: TAO_YY_RULE_SETUP return IDL_CONSUMES; - TAO_YY_BREAK + TAO_YY_BREAK case 44: TAO_YY_RULE_SETUP return IDL_EMITS; - TAO_YY_BREAK + TAO_YY_BREAK case 45: TAO_YY_RULE_SETUP return IDL_EVENTTYPE; - TAO_YY_BREAK + TAO_YY_BREAK case 46: TAO_YY_RULE_SETUP return IDL_FINDER; - TAO_YY_BREAK + TAO_YY_BREAK case 47: TAO_YY_RULE_SETUP return IDL_GETRAISES; - TAO_YY_BREAK + TAO_YY_BREAK case 48: TAO_YY_RULE_SETUP return IDL_HOME; - TAO_YY_BREAK + TAO_YY_BREAK case 49: TAO_YY_RULE_SETUP return IDL_IMPORT; - TAO_YY_BREAK + TAO_YY_BREAK case 50: TAO_YY_RULE_SETUP return IDL_MULTIPLE; - TAO_YY_BREAK + TAO_YY_BREAK case 51: TAO_YY_RULE_SETUP return IDL_PRIMARYKEY; - TAO_YY_BREAK + TAO_YY_BREAK case 52: TAO_YY_RULE_SETUP return IDL_PROVIDES; - TAO_YY_BREAK + TAO_YY_BREAK case 53: TAO_YY_RULE_SETUP return IDL_PUBLISHES; - TAO_YY_BREAK + TAO_YY_BREAK case 54: TAO_YY_RULE_SETUP return IDL_SETRAISES; - TAO_YY_BREAK + TAO_YY_BREAK case 55: TAO_YY_RULE_SETUP return IDL_TYPEID; - TAO_YY_BREAK + TAO_YY_BREAK case 56: TAO_YY_RULE_SETUP return IDL_TYPEPREFIX; - TAO_YY_BREAK + TAO_YY_BREAK case 57: TAO_YY_RULE_SETUP return IDL_USES; - TAO_YY_BREAK + TAO_YY_BREAK case 58: TAO_YY_RULE_SETUP return IDL_MANAGES; - TAO_YY_BREAK + TAO_YY_BREAK case 59: TAO_YY_RULE_SETUP return IDL_TRUETOK; - TAO_YY_BREAK + TAO_YY_BREAK case 60: TAO_YY_RULE_SETUP return IDL_FALSETOK; - TAO_YY_BREAK + TAO_YY_BREAK case 61: TAO_YY_RULE_SETUP return IDL_INOUT; - TAO_YY_BREAK + TAO_YY_BREAK case 62: TAO_YY_RULE_SETUP return IDL_IN; - TAO_YY_BREAK + TAO_YY_BREAK case 63: TAO_YY_RULE_SETUP return IDL_OUT; - TAO_YY_BREAK + TAO_YY_BREAK case 64: TAO_YY_RULE_SETUP return IDL_ONEWAY; - TAO_YY_BREAK + TAO_YY_BREAK case 65: TAO_YY_RULE_SETUP return IDL_LEFT_SHIFT; - TAO_YY_BREAK + TAO_YY_BREAK case 66: TAO_YY_RULE_SETUP return IDL_RIGHT_SHIFT; - TAO_YY_BREAK + TAO_YY_BREAK case 67: TAO_YY_RULE_SETUP { tao_yylval.strval = ACE::strnew ("::"); return IDL_SCOPE_DELIMITOR; } - TAO_YY_BREAK + TAO_YY_BREAK case 68: TAO_YY_RULE_SETUP { @@ -1546,63 +1546,63 @@ TAO_YY_RULE_SETUP return IDENTIFIER; } - TAO_YY_BREAK + TAO_YY_BREAK case 69: TAO_YY_RULE_SETUP { tao_yylval.dval = idl_atof(ace_tao_yytext); return IDL_FLOATING_PT_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 70: TAO_YY_RULE_SETUP { tao_yylval.dval = idl_atof(ace_tao_yytext); return IDL_FLOATING_PT_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 71: TAO_YY_RULE_SETUP { tao_yylval.ival = idl_atoi(ace_tao_yytext, 10); return IDL_INTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 72: TAO_YY_RULE_SETUP { tao_yylval.uival = idl_atoui(ace_tao_yytext, 10); return IDL_UINTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 73: TAO_YY_RULE_SETUP { tao_yylval.ival = idl_atoi(ace_tao_yytext, 16); return IDL_INTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 74: TAO_YY_RULE_SETUP { tao_yylval.uival = idl_atoui(ace_tao_yytext, 16); return IDL_UINTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 75: TAO_YY_RULE_SETUP { tao_yylval.ival = idl_atoi(ace_tao_yytext, 8); return IDL_INTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 76: TAO_YY_RULE_SETUP { tao_yylval.uival = idl_atoui(ace_tao_yytext, 8); return IDL_UINTEGER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 77: /* rule 77 can match eol */ TAO_YY_RULE_SETUP @@ -1623,7 +1623,7 @@ TAO_YY_RULE_SETUP IDL_STRING_LITERAL); return IDL_STRING_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 78: /* rule 78 can match eol */ TAO_YY_RULE_SETUP @@ -1642,14 +1642,14 @@ TAO_YY_RULE_SETUP tao_yylval.wsval = idl_wstring_escape_reader(tmp + 2); return IDL_WSTRING_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 79: TAO_YY_RULE_SETUP { tao_yylval.cval = ace_tao_yytext [1]; return IDL_CHARACTER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 80: TAO_YY_RULE_SETUP { @@ -1657,7 +1657,7 @@ TAO_YY_RULE_SETUP tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1); return IDL_CHARACTER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 81: TAO_YY_RULE_SETUP { @@ -1665,14 +1665,14 @@ TAO_YY_RULE_SETUP tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1); return IDL_CHARACTER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 82: TAO_YY_RULE_SETUP { tao_yylval.cval = idl_escape_reader(ace_tao_yytext + 1); return IDL_CHARACTER_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 83: TAO_YY_RULE_SETUP { @@ -1680,7 +1680,7 @@ TAO_YY_RULE_SETUP tao_yylval.wcval = ace_tao_yytext [2]; return IDL_WCHAR_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 84: TAO_YY_RULE_SETUP { @@ -1688,7 +1688,7 @@ TAO_YY_RULE_SETUP tao_yylval.wcval = idl_wchar_escape_reader(ace_tao_yytext + 2); return IDL_WCHAR_LITERAL; } - TAO_YY_BREAK + TAO_YY_BREAK case 85: /* rule 85 can match eol */ case 86: @@ -1698,7 +1698,7 @@ TAO_YY_RULE_SETUP idl_global->set_lineno(idl_global->lineno() + 1); idl_store_pragma(ace_tao_yytext); } - break; + break; case 87: /* rule 87 can match eol */ case 88: @@ -1707,7 +1707,7 @@ TAO_YY_RULE_SETUP {/* ignore file */ idl_global->set_lineno(idl_global->lineno() + 1); } - break; + break; case 89: /* rule 89 can match eol */ case 90: @@ -1725,7 +1725,7 @@ TAO_YY_RULE_SETUP { idl_parse_line_and_file(ace_tao_yytext); } - break; + break; case 93: /* rule 93 can match eol */ case 94: @@ -1734,7 +1734,7 @@ TAO_YY_RULE_SETUP { idl_parse_line_and_file(ace_tao_yytext); } - break; + break; case 95: /* rule 95 can match eol */ case 96: @@ -1743,7 +1743,7 @@ TAO_YY_RULE_SETUP { idl_parse_line_and_file(ace_tao_yytext); } - break; + break; case 97: /* rule 97 can match eol */ case 98: @@ -1779,7 +1779,7 @@ TAO_YY_RULE_SETUP } } } - TAO_YY_BREAK + TAO_YY_BREAK case 101: TAO_YY_RULE_SETUP ; @@ -1794,368 +1794,368 @@ TAO_YY_RULE_SETUP case 103: TAO_YY_RULE_SETUP return ace_tao_yytext [0]; - TAO_YY_BREAK + TAO_YY_BREAK case 104: TAO_YY_RULE_SETUP TAO_YY_ECHO; - break; + break; case TAO_YY_STATE_EOF(INITIAL): - tao_yyterminate(); - - case TAO_YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int tao_yy_amount_of_matched_text = (int) (tao_yy_cp - (tao_yytext_ptr)) - 1; - - /* Undo the effects of TAO_YY_DO_BEFORE_ACTION. */ - *tao_yy_cp = (tao_yy_hold_char); - TAO_YY_RESTORE_TAO_YY_MORE_OFFSET - - if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status == TAO_YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed tao_yyin at a new source and called - * tao_yylex(). If so, then we have to assure - * consistency between TAO_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. - */ - (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars; - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_input_file = tao_yyin; - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status = TAO_YY_BUFFER_NORMAL; - } - - /* Note that here we test for tao_yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since tao_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 ( (tao_yy_c_buf_p) <= &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] ) - { /* This was really a NUL. */ - tao_yy_state_type tao_yy_next_state; - - (tao_yy_c_buf_p) = (tao_yytext_ptr) + tao_yy_amount_of_matched_text; - - tao_yy_current_state = tao_yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * tao_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). - */ - - tao_yy_next_state = tao_yy_try_NUL_trans( tao_yy_current_state ); - - tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; - - if ( tao_yy_next_state ) - { - /* Consume the NUL. */ - tao_yy_cp = ++(tao_yy_c_buf_p); - tao_yy_current_state = tao_yy_next_state; - goto tao_yy_match; - } - - else - { - tao_yy_cp = (tao_yy_last_accepting_cpos); - tao_yy_current_state = (tao_yy_last_accepting_state); - goto tao_yy_find_action; - } - } - - else switch ( tao_yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (tao_yy_did_buffer_switch_on_eof) = 0; - - if ( tao_yywrap( ) ) - { - /* Note: because we've taken care in - * tao_yy_get_next_buffer() to have set up - * tao_yytext, we can now set up - * tao_yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * TAO_YY_NULL, it'll still work - another - * TAO_YY_NULL will get returned. - */ - (tao_yy_c_buf_p) = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; - - tao_yy_act = TAO_YY_STATE_EOF(TAO_YY_START); - goto do_action; - } - - else - { - if ( ! (tao_yy_did_buffer_switch_on_eof) ) - TAO_YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (tao_yy_c_buf_p) = - (tao_yytext_ptr) + tao_yy_amount_of_matched_text; - - tao_yy_current_state = tao_yy_get_previous_state( ); - - tao_yy_cp = (tao_yy_c_buf_p); - tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; - goto tao_yy_match; - - case EOB_ACT_LAST_MATCH: - (tao_yy_c_buf_p) = - &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)]; - - tao_yy_current_state = tao_yy_get_previous_state( ); - - tao_yy_cp = (tao_yy_c_buf_p); - tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; - goto tao_yy_find_action; - } - break; - } - - default: - TAO_YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ + tao_yyterminate(); + + case TAO_YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int tao_yy_amount_of_matched_text = (int) (tao_yy_cp - (tao_yytext_ptr)) - 1; + + /* Undo the effects of TAO_YY_DO_BEFORE_ACTION. */ + *tao_yy_cp = (tao_yy_hold_char); + TAO_YY_RESTORE_TAO_YY_MORE_OFFSET + + if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status == TAO_YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed tao_yyin at a new source and called + * tao_yylex(). If so, then we have to assure + * consistency between TAO_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. + */ + (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars; + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_input_file = tao_yyin; + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status = TAO_YY_BUFFER_NORMAL; + } + + /* Note that here we test for tao_yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since tao_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 ( (tao_yy_c_buf_p) <= &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] ) + { /* This was really a NUL. */ + tao_yy_state_type tao_yy_next_state; + + (tao_yy_c_buf_p) = (tao_yytext_ptr) + tao_yy_amount_of_matched_text; + + tao_yy_current_state = tao_yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * tao_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). + */ + + tao_yy_next_state = tao_yy_try_NUL_trans( tao_yy_current_state ); + + tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; + + if ( tao_yy_next_state ) + { + /* Consume the NUL. */ + tao_yy_cp = ++(tao_yy_c_buf_p); + tao_yy_current_state = tao_yy_next_state; + goto tao_yy_match; + } + + else + { + tao_yy_cp = (tao_yy_last_accepting_cpos); + tao_yy_current_state = (tao_yy_last_accepting_state); + goto tao_yy_find_action; + } + } + + else switch ( tao_yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (tao_yy_did_buffer_switch_on_eof) = 0; + + if ( tao_yywrap( ) ) + { + /* Note: because we've taken care in + * tao_yy_get_next_buffer() to have set up + * tao_yytext, we can now set up + * tao_yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * TAO_YY_NULL, it'll still work - another + * TAO_YY_NULL will get returned. + */ + (tao_yy_c_buf_p) = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; + + tao_yy_act = TAO_YY_STATE_EOF(TAO_YY_START); + goto do_action; + } + + else + { + if ( ! (tao_yy_did_buffer_switch_on_eof) ) + TAO_YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (tao_yy_c_buf_p) = + (tao_yytext_ptr) + tao_yy_amount_of_matched_text; + + tao_yy_current_state = tao_yy_get_previous_state( ); + + tao_yy_cp = (tao_yy_c_buf_p); + tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; + goto tao_yy_match; + + case EOB_ACT_LAST_MATCH: + (tao_yy_c_buf_p) = + &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)]; + + tao_yy_current_state = tao_yy_get_previous_state( ); + + tao_yy_cp = (tao_yy_c_buf_p); + tao_yy_bp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; + goto tao_yy_find_action; + } + break; + } + + default: + TAO_YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ } /* end of tao_yylex */ /* tao_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 + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ static int tao_yy_get_next_buffer (void) { - register char *dest = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf; - register char *source = (tao_yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (tao_yy_c_buf_p) > &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars) + 1] ) - TAO_YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (tao_yy_c_buf_p) - (tao_yytext_ptr) - TAO_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) ((tao_yy_c_buf_p) - (tao_yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status == TAO_YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars) = 0; - - else - { - int num_to_read = - TAO_YY_CURRENT_BUFFER_LVALUE->tao_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 */ - TAO_YY_BUFFER_STATE b = TAO_YY_CURRENT_BUFFER; - - int tao_yy_c_buf_p_offset = - (int) ((tao_yy_c_buf_p) - b->tao_yy_ch_buf); - - if ( b->tao_yy_is_our_buffer ) - { - int new_size = b->tao_yy_buf_size * 2; - - if ( new_size <= 0 ) - b->tao_yy_buf_size += b->tao_yy_buf_size / 8; - else - b->tao_yy_buf_size *= 2; - - b->tao_yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - tao_yyrealloc((void *) b->tao_yy_ch_buf,b->tao_yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->tao_yy_ch_buf = 0; - - if ( ! b->tao_yy_ch_buf ) - TAO_YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (tao_yy_c_buf_p) = &b->tao_yy_ch_buf[tao_yy_c_buf_p_offset]; - - num_to_read = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > TAO_YY_READ_BUF_SIZE ) - num_to_read = TAO_YY_READ_BUF_SIZE; - - /* Read in more data. */ - TAO_YY_INPUT( (&TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[number_to_move]), - (tao_yy_n_chars), (size_t) num_to_read ); - - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); - } - - if ( (tao_yy_n_chars) == 0 ) - { - if ( number_to_move == TAO_YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - tao_yyrestart(tao_yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status = - TAO_YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - (tao_yy_n_chars) += number_to_move; - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] = TAO_YY_END_OF_BUFFER_CHAR; - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars) + 1] = TAO_YY_END_OF_BUFFER_CHAR; - - (tao_yytext_ptr) = &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[0]; + register char *dest = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf; + register char *source = (tao_yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (tao_yy_c_buf_p) > &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars) + 1] ) + TAO_YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (tao_yy_c_buf_p) - (tao_yytext_ptr) - TAO_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) ((tao_yy_c_buf_p) - (tao_yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status == TAO_YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars) = 0; + + else + { + int num_to_read = + TAO_YY_CURRENT_BUFFER_LVALUE->tao_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 */ + TAO_YY_BUFFER_STATE b = TAO_YY_CURRENT_BUFFER; + + int tao_yy_c_buf_p_offset = + (int) ((tao_yy_c_buf_p) - b->tao_yy_ch_buf); + + if ( b->tao_yy_is_our_buffer ) + { + int new_size = b->tao_yy_buf_size * 2; + + if ( new_size <= 0 ) + b->tao_yy_buf_size += b->tao_yy_buf_size / 8; + else + b->tao_yy_buf_size *= 2; + + b->tao_yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + tao_yyrealloc((void *) b->tao_yy_ch_buf,b->tao_yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->tao_yy_ch_buf = 0; + + if ( ! b->tao_yy_ch_buf ) + TAO_YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (tao_yy_c_buf_p) = &b->tao_yy_ch_buf[tao_yy_c_buf_p_offset]; + + num_to_read = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size - + number_to_move - 1; - return ret_val; + } + + if ( num_to_read > TAO_YY_READ_BUF_SIZE ) + num_to_read = TAO_YY_READ_BUF_SIZE; + + /* Read in more data. */ + TAO_YY_INPUT( (&TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[number_to_move]), + (tao_yy_n_chars), (size_t) num_to_read ); + + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); + } + + if ( (tao_yy_n_chars) == 0 ) + { + if ( number_to_move == TAO_YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + tao_yyrestart(tao_yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buffer_status = + TAO_YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (tao_yy_n_chars) += number_to_move; + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] = TAO_YY_END_OF_BUFFER_CHAR; + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars) + 1] = TAO_YY_END_OF_BUFFER_CHAR; + + (tao_yytext_ptr) = &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[0]; + + return ret_val; } /* tao_yy_get_previous_state - get the state just before the EOB char was reached */ static tao_yy_state_type tao_yy_get_previous_state (void) { - register tao_yy_state_type tao_yy_current_state; - register char *tao_yy_cp; - - tao_yy_current_state = (tao_yy_start); - tao_yy_current_state += TAO_YY_AT_BOL(); - - for ( tao_yy_cp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; tao_yy_cp < (tao_yy_c_buf_p); ++tao_yy_cp ) - { - register TAO_YY_CHAR tao_yy_c = (*tao_yy_cp ? tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)] : 1); - if ( tao_yy_accept[tao_yy_current_state] ) - { - (tao_yy_last_accepting_state) = tao_yy_current_state; - (tao_yy_last_accepting_cpos) = tao_yy_cp; - } - while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) - { - tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; - if ( tao_yy_current_state >= 562 ) - tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; - } - tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; - } - - return tao_yy_current_state; + register tao_yy_state_type tao_yy_current_state; + register char *tao_yy_cp; + + tao_yy_current_state = (tao_yy_start); + tao_yy_current_state += TAO_YY_AT_BOL(); + + for ( tao_yy_cp = (tao_yytext_ptr) + TAO_YY_MORE_ADJ; tao_yy_cp < (tao_yy_c_buf_p); ++tao_yy_cp ) + { + register TAO_YY_CHAR tao_yy_c = (*tao_yy_cp ? tao_yy_ec[TAO_YY_SC_TO_UI(*tao_yy_cp)] : 1); + if ( tao_yy_accept[tao_yy_current_state] ) + { + (tao_yy_last_accepting_state) = tao_yy_current_state; + (tao_yy_last_accepting_cpos) = tao_yy_cp; + } + while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) + { + tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; + if ( tao_yy_current_state >= 562 ) + tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; + } + tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; + } + + return tao_yy_current_state; } /* tao_yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = tao_yy_try_NUL_trans( current_state ); + * next_state = tao_yy_try_NUL_trans( current_state ); */ static tao_yy_state_type tao_yy_try_NUL_trans (tao_yy_state_type tao_yy_current_state ) { - register int tao_yy_is_jam; - register char *tao_yy_cp = (tao_yy_c_buf_p); - - register TAO_YY_CHAR tao_yy_c = 1; - if ( tao_yy_accept[tao_yy_current_state] ) - { - (tao_yy_last_accepting_state) = tao_yy_current_state; - (tao_yy_last_accepting_cpos) = tao_yy_cp; - } - while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) - { - tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; - if ( tao_yy_current_state >= 562 ) - tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; - } - tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; - tao_yy_is_jam = (tao_yy_current_state == 561); - - return tao_yy_is_jam ? 0 : tao_yy_current_state; + register int tao_yy_is_jam; + register char *tao_yy_cp = (tao_yy_c_buf_p); + + register TAO_YY_CHAR tao_yy_c = 1; + if ( tao_yy_accept[tao_yy_current_state] ) + { + (tao_yy_last_accepting_state) = tao_yy_current_state; + (tao_yy_last_accepting_cpos) = tao_yy_cp; + } + while ( tao_yy_chk[tao_yy_base[tao_yy_current_state] + tao_yy_c] != tao_yy_current_state ) + { + tao_yy_current_state = (int) tao_yy_def[tao_yy_current_state]; + if ( tao_yy_current_state >= 562 ) + tao_yy_c = tao_yy_meta[(unsigned int) tao_yy_c]; + } + tao_yy_current_state = tao_yy_nxt[tao_yy_base[tao_yy_current_state] + (unsigned int) tao_yy_c]; + tao_yy_is_jam = (tao_yy_current_state == 561); + + return tao_yy_is_jam ? 0 : tao_yy_current_state; } static void tao_yyunput (int c, register char * tao_yy_bp ) { - register char *tao_yy_cp; + register char *tao_yy_cp; tao_yy_cp = (tao_yy_c_buf_p); - /* undo effects of setting up tao_yytext */ - *tao_yy_cp = (tao_yy_hold_char); + /* undo effects of setting up tao_yytext */ + *tao_yy_cp = (tao_yy_hold_char); - if ( tao_yy_cp < TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (tao_yy_n_chars) + 2; - register char *dest = &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[ - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size + 2]; - register char *source = - &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[number_to_move]; + if ( tao_yy_cp < TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (tao_yy_n_chars) + 2; + register char *dest = &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[ + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size + 2]; + register char *source = + &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[number_to_move]; - while ( source > TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf ) - *--dest = *--source; + while ( source > TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf ) + *--dest = *--source; - tao_yy_cp += (int) (dest - source); - tao_yy_bp += (int) (dest - source); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = - (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size; + tao_yy_cp += (int) (dest - source); + tao_yy_bp += (int) (dest - source); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = + (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_size; - if ( tao_yy_cp < TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf + 2 ) - TAO_YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } + if ( tao_yy_cp < TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf + 2 ) + TAO_YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } - *--tao_yy_cp = (char) c; + *--tao_yy_cp = (char) c; - (tao_yytext_ptr) = tao_yy_bp; - (tao_yy_hold_char) = *tao_yy_cp; - (tao_yy_c_buf_p) = tao_yy_cp; + (tao_yytext_ptr) = tao_yy_bp; + (tao_yy_hold_char) = *tao_yy_cp; + (tao_yy_c_buf_p) = tao_yy_cp; } #ifndef TAO_YY_NO_INPUT @@ -2166,73 +2166,73 @@ static int tao_yy_get_next_buffer (void) #endif { - int c; - - *(tao_yy_c_buf_p) = (tao_yy_hold_char); - - if ( *(tao_yy_c_buf_p) == TAO_YY_END_OF_BUFFER_CHAR ) - { - /* tao_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 ( (tao_yy_c_buf_p) < &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] ) - /* This was really a NUL. */ - *(tao_yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (tao_yy_c_buf_p) - (tao_yytext_ptr); - ++(tao_yy_c_buf_p); - - switch ( tao_yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because tao_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. */ - tao_yyrestart(tao_yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( tao_yywrap( ) ) - return EOF; - - if ( ! (tao_yy_did_buffer_switch_on_eof) ) - TAO_YY_NEW_FILE; + int c; + + *(tao_yy_c_buf_p) = (tao_yy_hold_char); + + if ( *(tao_yy_c_buf_p) == TAO_YY_END_OF_BUFFER_CHAR ) + { + /* tao_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 ( (tao_yy_c_buf_p) < &TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_ch_buf[(tao_yy_n_chars)] ) + /* This was really a NUL. */ + *(tao_yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (tao_yy_c_buf_p) - (tao_yytext_ptr); + ++(tao_yy_c_buf_p); + + switch ( tao_yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because tao_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. */ + tao_yyrestart(tao_yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( tao_yywrap( ) ) + return EOF; + + if ( ! (tao_yy_did_buffer_switch_on_eof) ) + TAO_YY_NEW_FILE; #ifdef __cplusplus - return tao_yyinput(); + return tao_yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (tao_yy_c_buf_p) = (tao_yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (tao_yy_c_buf_p) = (tao_yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *) (tao_yy_c_buf_p); /* cast for 8-bit char's */ - *(tao_yy_c_buf_p) = '\0'; /* preserve tao_yytext */ - (tao_yy_hold_char) = *++(tao_yy_c_buf_p); + c = *(unsigned char *) (tao_yy_c_buf_p); /* cast for 8-bit char's */ + *(tao_yy_c_buf_p) = '\0'; /* preserve tao_yytext */ + (tao_yy_hold_char) = *++(tao_yy_c_buf_p); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = (c == '\n'); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef TAO_YY_NO_INPUT */ +#endif /* ifndef TAO_YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. @@ -2242,14 +2242,14 @@ static int tao_yy_get_next_buffer (void) void tao_yyrestart (FILE * input_file ) { - if ( ! TAO_YY_CURRENT_BUFFER ){ + if ( ! TAO_YY_CURRENT_BUFFER ){ tao_yyensure_buffer_stack (); - TAO_YY_CURRENT_BUFFER_LVALUE = + TAO_YY_CURRENT_BUFFER_LVALUE = tao_yy_create_buffer(tao_yyin,TAO_YY_BUF_SIZE ); - } + } - tao_yy_init_buffer(TAO_YY_CURRENT_BUFFER,input_file ); - tao_yy_load_buffer_state( ); + tao_yy_init_buffer(TAO_YY_CURRENT_BUFFER,input_file ); + tao_yy_load_buffer_state( ); } /** Switch to a different input buffer. @@ -2259,40 +2259,40 @@ static int tao_yy_get_next_buffer (void) void tao_yy_switch_to_buffer (TAO_YY_BUFFER_STATE new_buffer ) { - /* TODO. We should be able to replace this entire function body - * with - * tao_yypop_buffer_state(); - * tao_yypush_buffer_state(new_buffer); + /* TODO. We should be able to replace this entire function body + * with + * tao_yypop_buffer_state(); + * tao_yypush_buffer_state(new_buffer); */ - tao_yyensure_buffer_stack (); - if ( TAO_YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( TAO_YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(tao_yy_c_buf_p) = (tao_yy_hold_char); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos = (tao_yy_c_buf_p); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); - } - - TAO_YY_CURRENT_BUFFER_LVALUE = new_buffer; - tao_yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (tao_yywrap()) processing, but the only time this flag - * is looked at is after tao_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (tao_yy_did_buffer_switch_on_eof) = 1; + tao_yyensure_buffer_stack (); + if ( TAO_YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( TAO_YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(tao_yy_c_buf_p) = (tao_yy_hold_char); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos = (tao_yy_c_buf_p); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); + } + + TAO_YY_CURRENT_BUFFER_LVALUE = new_buffer; + tao_yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (tao_yywrap()) processing, but the only time this flag + * is looked at is after tao_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (tao_yy_did_buffer_switch_on_eof) = 1; } static void tao_yy_load_buffer_state (void) { - (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars; - (tao_yytext_ptr) = (tao_yy_c_buf_p) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos; - tao_yyin = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_input_file; - (tao_yy_hold_char) = *(tao_yy_c_buf_p); + (tao_yy_n_chars) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars; + (tao_yytext_ptr) = (tao_yy_c_buf_p) = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos; + tao_yyin = TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_input_file; + (tao_yy_hold_char) = *(tao_yy_c_buf_p); } /** Allocate and initialize an input buffer state. @@ -2303,26 +2303,26 @@ static void tao_yy_load_buffer_state (void) */ TAO_YY_BUFFER_STATE tao_yy_create_buffer (FILE * file, int size ) { - TAO_YY_BUFFER_STATE b; + TAO_YY_BUFFER_STATE b; - b = (TAO_YY_BUFFER_STATE) tao_yyalloc(sizeof( struct tao_yy_buffer_state ) ); - if ( ! b ) - TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" ); + b = (TAO_YY_BUFFER_STATE) tao_yyalloc(sizeof( struct tao_yy_buffer_state ) ); + if ( ! b ) + TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" ); - b->tao_yy_buf_size = size; + b->tao_yy_buf_size = size; - /* tao_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->tao_yy_ch_buf = (char *) tao_yyalloc(b->tao_yy_buf_size + 2 ); - if ( ! b->tao_yy_ch_buf ) - TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" ); + /* tao_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->tao_yy_ch_buf = (char *) tao_yyalloc(b->tao_yy_buf_size + 2 ); + if ( ! b->tao_yy_ch_buf ) + TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_create_buffer()" ); - b->tao_yy_is_our_buffer = 1; + b->tao_yy_is_our_buffer = 1; - tao_yy_init_buffer(b,file ); + tao_yy_init_buffer(b,file ); - return b; + return b; } /** Destroy the buffer. @@ -2332,16 +2332,16 @@ static void tao_yy_load_buffer_state (void) void tao_yy_delete_buffer (TAO_YY_BUFFER_STATE b ) { - if ( ! b ) - return; + if ( ! b ) + return; - if ( b == TAO_YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - TAO_YY_CURRENT_BUFFER_LVALUE = (TAO_YY_BUFFER_STATE) 0; + if ( b == TAO_YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + TAO_YY_CURRENT_BUFFER_LVALUE = (TAO_YY_BUFFER_STATE) 0; - if ( b->tao_yy_is_our_buffer ) - tao_yyfree((void *) b->tao_yy_ch_buf ); + if ( b->tao_yy_is_our_buffer ) + tao_yyfree((void *) b->tao_yy_ch_buf ); - tao_yyfree((void *) b ); + tao_yyfree((void *) b ); } /* Initializes or reinitializes a buffer. @@ -2351,12 +2351,12 @@ static void tao_yy_load_buffer_state (void) static void tao_yy_init_buffer (TAO_YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; + int oerrno = errno; - tao_yy_flush_buffer(b ); + tao_yy_flush_buffer(b ); - b->tao_yy_input_file = file; - b->tao_yy_fill_buffer = 1; + b->tao_yy_input_file = file; + b->tao_yy_fill_buffer = 1; /* If b is the current buffer, then tao_yy_init_buffer was _probably_ * called from tao_yyrestart() or through tao_yy_get_next_buffer. @@ -2369,7 +2369,7 @@ static void tao_yy_load_buffer_state (void) b->tao_yy_is_interactive = 0; - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, TAO_YY_INPUT will be called. @@ -2378,25 +2378,25 @@ static void tao_yy_load_buffer_state (void) */ void tao_yy_flush_buffer (TAO_YY_BUFFER_STATE b ) { - if ( ! b ) - return; + if ( ! b ) + return; - b->tao_yy_n_chars = 0; + b->tao_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->tao_yy_ch_buf[0] = TAO_YY_END_OF_BUFFER_CHAR; - b->tao_yy_ch_buf[1] = TAO_YY_END_OF_BUFFER_CHAR; + /* 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->tao_yy_ch_buf[0] = TAO_YY_END_OF_BUFFER_CHAR; + b->tao_yy_ch_buf[1] = TAO_YY_END_OF_BUFFER_CHAR; - b->tao_yy_buf_pos = &b->tao_yy_ch_buf[0]; + b->tao_yy_buf_pos = &b->tao_yy_ch_buf[0]; - b->tao_yy_at_bol = 1; - b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW; + b->tao_yy_at_bol = 1; + b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW; - if ( b == TAO_YY_CURRENT_BUFFER ) - tao_yy_load_buffer_state( ); + if ( b == TAO_YY_CURRENT_BUFFER ) + tao_yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -2407,28 +2407,28 @@ static void tao_yy_load_buffer_state (void) */ void tao_yypush_buffer_state (TAO_YY_BUFFER_STATE new_buffer ) { - if (new_buffer == 0) - return; + if (new_buffer == 0) + return; - tao_yyensure_buffer_stack(); + tao_yyensure_buffer_stack(); - /* This block is copied from tao_yy_switch_to_buffer. */ - if ( TAO_YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(tao_yy_c_buf_p) = (tao_yy_hold_char); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos = (tao_yy_c_buf_p); - TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); - } + /* This block is copied from tao_yy_switch_to_buffer. */ + if ( TAO_YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(tao_yy_c_buf_p) = (tao_yy_hold_char); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_buf_pos = (tao_yy_c_buf_p); + TAO_YY_CURRENT_BUFFER_LVALUE->tao_yy_n_chars = (tao_yy_n_chars); + } - /* Only push if top exists. Otherwise, replace top. */ - if (TAO_YY_CURRENT_BUFFER) - (tao_yy_buffer_stack_top)++; - TAO_YY_CURRENT_BUFFER_LVALUE = new_buffer; + /* Only push if top exists. Otherwise, replace top. */ + if (TAO_YY_CURRENT_BUFFER) + (tao_yy_buffer_stack_top)++; + TAO_YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from tao_yy_switch_to_buffer. */ - tao_yy_load_buffer_state( ); - (tao_yy_did_buffer_switch_on_eof) = 1; + /* copied from tao_yy_switch_to_buffer. */ + tao_yy_load_buffer_state( ); + (tao_yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. @@ -2437,18 +2437,18 @@ void tao_yypush_buffer_state (TAO_YY_BUFFER_STATE new_buffer ) */ void tao_yypop_buffer_state (void) { - if (!TAO_YY_CURRENT_BUFFER) - return; + if (!TAO_YY_CURRENT_BUFFER) + return; - tao_yy_delete_buffer(TAO_YY_CURRENT_BUFFER ); - TAO_YY_CURRENT_BUFFER_LVALUE = 0; - if ((tao_yy_buffer_stack_top) > 0) - --(tao_yy_buffer_stack_top); + tao_yy_delete_buffer(TAO_YY_CURRENT_BUFFER ); + TAO_YY_CURRENT_BUFFER_LVALUE = 0; + if ((tao_yy_buffer_stack_top) > 0) + --(tao_yy_buffer_stack_top); - if (TAO_YY_CURRENT_BUFFER) { - tao_yy_load_buffer_state( ); - (tao_yy_did_buffer_switch_on_eof) = 1; - } + if (TAO_YY_CURRENT_BUFFER) { + tao_yy_load_buffer_state( ); + (tao_yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. @@ -2456,41 +2456,41 @@ void tao_yypop_buffer_state (void) */ static void tao_yyensure_buffer_stack (void) { - int num_to_alloc; + int num_to_alloc; - if (!(tao_yy_buffer_stack)) { + if (!(tao_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. + /* 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; - (tao_yy_buffer_stack) = (struct tao_yy_buffer_state**)tao_yyalloc - (num_to_alloc * sizeof(struct tao_yy_buffer_state*) - ); - - memset((tao_yy_buffer_stack), 0, num_to_alloc * sizeof(struct tao_yy_buffer_state*)); - - (tao_yy_buffer_stack_max) = num_to_alloc; - (tao_yy_buffer_stack_top) = 0; - return; - } - - if ((tao_yy_buffer_stack_top) >= ((tao_yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (tao_yy_buffer_stack_max) + grow_size; - (tao_yy_buffer_stack) = (struct tao_yy_buffer_state**)tao_yyrealloc - ((tao_yy_buffer_stack), - num_to_alloc * sizeof(struct tao_yy_buffer_state*) - ); - - /* zero only the new slots.*/ - memset((tao_yy_buffer_stack) + (tao_yy_buffer_stack_max), 0, grow_size * sizeof(struct tao_yy_buffer_state*)); - (tao_yy_buffer_stack_max) = num_to_alloc; - } + num_to_alloc = 1; + (tao_yy_buffer_stack) = (struct tao_yy_buffer_state**)tao_yyalloc + (num_to_alloc * sizeof(struct tao_yy_buffer_state*) + ); + + memset((tao_yy_buffer_stack), 0, num_to_alloc * sizeof(struct tao_yy_buffer_state*)); + + (tao_yy_buffer_stack_max) = num_to_alloc; + (tao_yy_buffer_stack_top) = 0; + return; + } + + if ((tao_yy_buffer_stack_top) >= ((tao_yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (tao_yy_buffer_stack_max) + grow_size; + (tao_yy_buffer_stack) = (struct tao_yy_buffer_state**)tao_yyrealloc + ((tao_yy_buffer_stack), + num_to_alloc * sizeof(struct tao_yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((tao_yy_buffer_stack) + (tao_yy_buffer_stack_max), 0, grow_size * sizeof(struct tao_yy_buffer_state*)); + (tao_yy_buffer_stack_max) = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2501,31 +2501,31 @@ static void tao_yyensure_buffer_stack (void) */ TAO_YY_BUFFER_STATE tao_yy_scan_buffer (char * base, tao_yy_size_t size ) { - TAO_YY_BUFFER_STATE b; + TAO_YY_BUFFER_STATE b; - if ( size < 2 || - base[size-2] != TAO_YY_END_OF_BUFFER_CHAR || - base[size-1] != TAO_YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; + if ( size < 2 || + base[size-2] != TAO_YY_END_OF_BUFFER_CHAR || + base[size-1] != TAO_YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; - b = (TAO_YY_BUFFER_STATE) tao_yyalloc(sizeof( struct tao_yy_buffer_state ) ); - if ( ! b ) - TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_buffer()" ); + b = (TAO_YY_BUFFER_STATE) tao_yyalloc(sizeof( struct tao_yy_buffer_state ) ); + if ( ! b ) + TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_buffer()" ); - b->tao_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->tao_yy_buf_pos = b->tao_yy_ch_buf = base; - b->tao_yy_is_our_buffer = 0; - b->tao_yy_input_file = 0; - b->tao_yy_n_chars = b->tao_yy_buf_size; - b->tao_yy_is_interactive = 0; - b->tao_yy_at_bol = 1; - b->tao_yy_fill_buffer = 0; - b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW; + b->tao_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->tao_yy_buf_pos = b->tao_yy_ch_buf = base; + b->tao_yy_is_our_buffer = 0; + b->tao_yy_input_file = 0; + b->tao_yy_n_chars = b->tao_yy_buf_size; + b->tao_yy_is_interactive = 0; + b->tao_yy_at_bol = 1; + b->tao_yy_fill_buffer = 0; + b->tao_yy_buffer_status = TAO_YY_BUFFER_NEW; - tao_yy_switch_to_buffer(b ); + tao_yy_switch_to_buffer(b ); - return b; + return b; } /** Setup the input buffer state to scan a string. The next call to tao_yylex() will @@ -2539,7 +2539,7 @@ TAO_YY_BUFFER_STATE tao_yy_scan_buffer (char * base, tao_yy_size_t size ) TAO_YY_BUFFER_STATE tao_yy_scan_string (tao_yyconst char * tao_yystr ) { - return tao_yy_scan_bytes(tao_yystr,strlen(tao_yystr) ); + return tao_yy_scan_bytes(tao_yystr,strlen(tao_yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to tao_yylex() will @@ -2551,32 +2551,32 @@ TAO_YY_BUFFER_STATE tao_yy_scan_string (tao_yyconst char * tao_yystr ) */ TAO_YY_BUFFER_STATE tao_yy_scan_bytes (tao_yyconst char * tao_yybytes, int _tao_yybytes_len ) { - TAO_YY_BUFFER_STATE b; - char *buf; - tao_yy_size_t n; - int i; + TAO_YY_BUFFER_STATE b; + char *buf; + tao_yy_size_t n; + int i; - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _tao_yybytes_len + 2; - buf = (char *) tao_yyalloc(n ); - if ( ! buf ) - TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_bytes()" ); + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _tao_yybytes_len + 2; + buf = (char *) tao_yyalloc(n ); + if ( ! buf ) + TAO_YY_FATAL_ERROR( "out of dynamic memory in tao_yy_scan_bytes()" ); - for ( i = 0; i < _tao_yybytes_len; ++i ) - buf[i] = tao_yybytes[i]; + for ( i = 0; i < _tao_yybytes_len; ++i ) + buf[i] = tao_yybytes[i]; - buf[_tao_yybytes_len] = buf[_tao_yybytes_len+1] = TAO_YY_END_OF_BUFFER_CHAR; + buf[_tao_yybytes_len] = buf[_tao_yybytes_len+1] = TAO_YY_END_OF_BUFFER_CHAR; - b = tao_yy_scan_buffer(buf,n ); - if ( ! b ) - TAO_YY_FATAL_ERROR( "bad buffer in tao_yy_scan_bytes()" ); + b = tao_yy_scan_buffer(buf,n ); + if ( ! b ) + TAO_YY_FATAL_ERROR( "bad buffer in tao_yy_scan_bytes()" ); - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->tao_yy_is_our_buffer = 1; + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->tao_yy_is_our_buffer = 1; - return b; + return b; } #ifndef TAO_YY_EXIT_FAILURE @@ -2585,26 +2585,26 @@ TAO_YY_BUFFER_STATE tao_yy_scan_bytes (tao_yyconst char * tao_yybytes, int _ta static void tao_yy_fatal_error (tao_yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); - exit( TAO_YY_EXIT_FAILURE ); + (void) fprintf( stderr, "%s\n", msg ); + exit( TAO_YY_EXIT_FAILURE ); } /* Redefine tao_yyless() so it works in section 3 code. */ #undef tao_yyless #define tao_yyless(n) \ - do \ - { \ - /* Undo effects of setting up tao_yytext. */ \ + do \ + { \ + /* Undo effects of setting up tao_yytext. */ \ int tao_yyless_macro_arg = (n); \ TAO_YY_LESS_LINENO(tao_yyless_macro_arg);\ - tao_yytext[tao_yyleng] = (tao_yy_hold_char); \ - (tao_yy_c_buf_p) = tao_yytext + tao_yyless_macro_arg; \ - (tao_yy_hold_char) = *(tao_yy_c_buf_p); \ - *(tao_yy_c_buf_p) = '\0'; \ - tao_yyleng = tao_yyless_macro_arg; \ - } \ - while ( 0 ) + tao_yytext[tao_yyleng] = (tao_yy_hold_char); \ + (tao_yy_c_buf_p) = tao_yytext + tao_yyless_macro_arg; \ + (tao_yy_hold_char) = *(tao_yy_c_buf_p); \ + *(tao_yy_c_buf_p) = '\0'; \ + tao_yyleng = tao_yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ @@ -2719,15 +2719,15 @@ int tao_yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ - while(TAO_YY_CURRENT_BUFFER){ - tao_yy_delete_buffer(TAO_YY_CURRENT_BUFFER ); - TAO_YY_CURRENT_BUFFER_LVALUE = 0; - tao_yypop_buffer_state(); - } + while(TAO_YY_CURRENT_BUFFER){ + tao_yy_delete_buffer(TAO_YY_CURRENT_BUFFER ); + TAO_YY_CURRENT_BUFFER_LVALUE = 0; + tao_yypop_buffer_state(); + } - /* Destroy the stack itself. */ - tao_yyfree((tao_yy_buffer_stack) ); - (tao_yy_buffer_stack) = 0; + /* Destroy the stack itself. */ + tao_yyfree((tao_yy_buffer_stack) ); + (tao_yy_buffer_stack) = 0; /* Reset the globals. This is important in a non-reentrant scanner so the next time * tao_yylex() is called, initialization will occur. */ @@ -2743,43 +2743,43 @@ int tao_yylex_destroy (void) #ifndef tao_yytext_ptr static void tao_yy_flex_strncpy (char* s1, tao_yyconst char * s2, int n ) { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; } #endif #ifdef TAO_YY_NEED_STRLEN static int tao_yy_flex_strlen (tao_yyconst char * s ) { - register int n; - for ( n = 0; s[n]; ++n ) - ; + register int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif void *tao_yyalloc (tao_yy_size_t size ) { - return (void *) malloc( size ); + return (void *) malloc( size ); } void *tao_yyrealloc (void * ptr, tao_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 ); + /* 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 tao_yyfree (void * ptr ) { - free( (char *) ptr ); /* see tao_yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see tao_yyrealloc() for (char *) cast */ } #define TAO_YYTABLES_NAME "tao_yytables" |