Anonymous | Login | 2022-05-25 09:12 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000712 | OMNeT++ | simulation kernel | public | 2014-01-29 10:49 | 2014-01-29 13:48 | ||||
Reporter | andras | ||||||||
Assigned To | rhornig | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | resolved | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | 4.4 | ||||||||
Target Version | Fixed in Version | 4.4 | |||||||
Summary | 0000712: nedtool linker error: undefined reference to `ned1yylex_destroy()' | ||||||||
Description | From Daniel Pfefferkorn [[email protected]], 1/23/2014: I have compiled the version 4.4 on a i686 machine without problems. On our x86_64 machine however I do get the following error message: Creating executable: /opt/omnetpp/omnetpp-4.4/x86_64/out/gcc-release/src/nedxml/nedtool /opt/omnetpp/omnetpp-4.4/x86_64/lib/gcc/liboppnedxml.so: undefined reference to `ned1yylex_destroy()' /opt/omnetpp/omnetpp-4.4/x86_64/lib/gcc/liboppnedxml.so: undefined reference to `msg2yylex_destroy()' /opt/omnetpp/omnetpp-4.4/x86_64/lib/gcc/liboppnedxml.so: undefined reference to `ned2yylex_destroy()' Neither configure or make display a related warning/error. I have checked lex.ned1yy.cc but the method really does not exist. So I checked the flex versions: i686 (working): lex 2.5.35 x86_64 (!working): lex 2.5.4 Please find attached diffs for verbose output of flex itself (flex -v) and the generated files lex.ned1yy.cc Additional system information: uname -r: 2.6.32-5-686-bigmem vs. 2.6.32-5-amd64 gcc -v : gcc version 4.4.5 (Debian 4.4.5-8) Can you confirm the problem? Thank you guys! --Daniel | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() 1,2c1,2 < flex version 2.5.35 usage statistics: < scanner options: -vB8 -Cem -olex.ned1yy.cc -Pned1yy --- > flex version 2.5.4 usage statistics: > scanner options: -vI8 -Cem -olex.ned1yy.cc -Pned1yy 9c9 < 23/100 character classes needed 227/500 words of storage, 0 reused --- > 12/100 character classes needed 104/500 words of storage, 10 reused ![]() 1,8d0 < #line 2 "lex.ned1yy.cc" < < #line 4 "lex.ned1yy.cc" < < #define YY_INT_ALIGNED short int < < /* A lexical scanner generated by flex */ < 10a3,5 > #define yy_scan_buffer ned1yy_scan_buffer > #define yy_scan_string ned1yy_scan_string > #define yy_scan_bytes ned1yy_scan_bytes 19d13 < #define yylineno ned1yylineno 24,26c18,24 < #define yyalloc ned1yyalloc < #define yyrealloc ned1yyrealloc < #define yyfree ned1yyfree --- > > #line 20 "lex.ned1yy.cc" > /* A lexical scanner generated by flex */ > > /* Scanner skeleton version: > * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ > */ 31,34d28 < #define YY_FLEX_SUBMINOR_VERSION 35 < #if YY_FLEX_SUBMINOR_VERSION > 0 < #define FLEX_BETA < #endif 36,38d29 < /* First, we deal with platform-specific or compiler-specific issues. */ < < /* begin standard C headers. */ 40d30 < #include <string.h> 42d31 < #include <stdlib.h> 44,88c33,36 < /* end standard C headers. */ < < /* flex integer type definitions */ < < #ifndef FLEXINT_H < #define FLEXINT_H < < /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ < < #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L < < /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, < * if you want the limit (max/min) macros for int types. < */ < #ifndef __STDC_LIMIT_MACROS < #define __STDC_LIMIT_MACROS 1 < #endif < < #include <inttypes.h> < typedef int8_t flex_int8_t; < typedef uint8_t flex_uint8_t; < typedef int16_t flex_int16_t; < typedef uint16_t flex_uint16_t; < typedef int32_t flex_int32_t; < typedef uint32_t flex_uint32_t; < #else < typedef signed char flex_int8_t; < typedef short int flex_int16_t; < typedef int flex_int32_t; < typedef unsigned char flex_uint8_t; < typedef unsigned short int flex_uint16_t; < typedef unsigned int flex_uint32_t; < < /* Limits of integral types. */ < #ifndef INT8_MIN < #define INT8_MIN (-128) < #endif < #ifndef INT16_MIN < #define INT16_MIN (-32767-1) < #endif < #ifndef INT32_MIN < #define INT32_MIN (-2147483647-1) < #endif < #ifndef INT8_MAX < #define INT8_MAX (127) --- > /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ > #ifdef c_plusplus > #ifndef __cplusplus > #define __cplusplus 90,103d37 < #ifndef INT16_MAX < #define INT16_MAX (32767) < #endif < #ifndef INT32_MAX < #define INT32_MAX (2147483647) < #endif < #ifndef UINT8_MAX < #define UINT8_MAX (255U) < #endif < #ifndef UINT16_MAX < #define UINT16_MAX (65535U) < #endif < #ifndef UINT32_MAX < #define UINT32_MAX (4294967295U) 106,108d39 < #endif /* ! C99 */ < < #endif /* ! FLEXINT_H */ 111a43,50 > #include <stdlib.h> > #ifndef _WIN32 > #include <unistd.h> > #endif > > /* Use prototypes in function declarations. */ > #define YY_USE_PROTOS > 117,118c56 < /* C99 requires __STDC__ to be defined as 1. */ < #if defined (__STDC__) --- > #if __STDC__ 119a58 > #define YY_USE_PROTOS 122c61 < #endif /* defined (__STDC__) */ --- > #endif /* __STDC__ */ 124a64,72 > #ifdef __TURBOC__ > #pragma warn -rch > #pragma warn -use > #include <io.h> > #include <stdlib.h> > #define YY_USE_CONST > #define YY_USE_PROTOS > #endif > 130a79,86 > > #ifdef YY_USE_PROTOS > #define YY_PROTO(proto) proto > #else > #define YY_PROTO(proto) () > #endif > > 145c101 < #define BEGIN (yy_start) = 1 + 2 * --- > #define BEGIN yy_start = 1 + 2 * 151c107 < #define YY_START (((yy_start) - 1) / 2) --- > #define YY_START ((yy_start - 1) / 2) 158c114 < #define YY_NEW_FILE ned1yyrestart(ned1yyin ) --- > #define YY_NEW_FILE yyrestart( yyin ) 163,170d118 < #ifndef YY_BUF_SIZE < #ifdef __ia64__ < /* On IA-64, the buffer size is 16k, not 8k. < * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. < * Ditto for the __ia64__ case accordingly. < */ < #define YY_BUF_SIZE 32768 < #else 172,177d119 < #endif /* __ia64__ */ < #endif < < /* The state buf must be large enough to hold one state per character in the main buffer. < */ < #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 179,180d120 < #ifndef YY_TYPEDEF_YY_BUFFER_STATE < #define YY_TYPEDEF_YY_BUFFER_STATE 182,184d121 < #endif < < extern int ned1yyleng; 186c123,124 < extern FILE *ned1yyin, *ned1yyout; --- > extern int yyleng; > extern FILE *yyin, *yyout; 192,194c130,145 < #define YY_LESS_LINENO(n) < < /* Return all but the first "n" matched characters back to the input stream. */ --- > /* The funky do-while in the following #define is used to turn the definition > * int a single C statement (which needs a semi-colon terminator). This > * avoids problems with code like: > * > * if ( condition_holds ) > * yyless( 5 ); > * else > * do_something_else(); > * > * Prior to using the do-while the compiler would get upset at the > * "else" because it interpreted the "if" statement as being all > * done when it reached the ';' after the yyless() call. > */ > > /* Return all but the first 'n' matched characters back to the input stream. */ > 198,201c149,150 < /* Undo effects of setting up ned1yytext. */ \ < int yyless_macro_arg = (n); \ < YY_LESS_LINENO(yyless_macro_arg);\ < *yy_cp = (yy_hold_char); \ --- > /* Undo effects of setting up yytext. */ \ > *yy_cp = yy_hold_char; \ 203,204c152,153 < (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ < YY_DO_BEFORE_ACTION; /* set up ned1yytext again */ \ --- > yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ > YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 208c157,163 < #define unput(c) yyunput( c, (yytext_ptr) ) --- > #define unput(c) yyunput( c, yytext_ptr ) > > /* The following is because we cannot portably get our hands on size_t > * (without autoconf's help, which isn't available because we want > * flex-generated scanners to compile on their own). > */ > typedef unsigned int yy_size_t; 210,213d164 < #ifndef YY_TYPEDEF_YY_SIZE_T < #define YY_TYPEDEF_YY_SIZE_T < typedef size_t yy_size_t; < #endif 215,216d165 < #ifndef YY_STRUCT_YY_BUFFER_STATE < #define YY_STRUCT_YY_BUFFER_STATE 253,255d201 < int yy_bs_lineno; /**< The line count. */ < int yy_bs_column; /**< The column count. */ < 262d207 < 272,273c217,218 < * (via ned1yyrestart()), so that the user can continue scanning by < * just pointing ned1yyin at a new input file. --- > * (via yyrestart()), so that the user can continue scanning by > * just pointing yyin at a new input file. 276d220 < 278d221 < #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 280,283c223 < /* 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. */ --- > static YY_BUFFER_STATE yy_current_buffer = 0; 288,289d227 < * < * Returns the top of the stack, or NULL. 291,293c229 < #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ < ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ < : NULL) --- > #define YY_CURRENT_BUFFER yy_current_buffer 295,298d230 < /* Same as previous macro, but useful when we know that the buffer stack is not < * NULL or when we need an lvalue. For internal use only. < */ < #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 300c232 < /* yy_hold_char holds the character lost when ned1yytext is formed. */ --- > /* yy_hold_char holds the character lost when yytext is formed. */ 301a234 > 303c236,238 < int ned1yyleng; --- > > > int yyleng; 307c242 < static int yy_init = 0; /* whether we need to initialize */ --- > static int yy_init = 1; /* whether we need to initialize */ 310,311c245,246 < /* Flag which is used to allow ned1yywrap()'s to do buffer switches < * instead of setting up a fresh ned1yyin. A bit of a hack ... --- > /* Flag which is used to allow yywrap()'s to do buffer switches > * instead of setting up a fresh yyin. A bit of a hack ... 315,335c250 < void ned1yyrestart (FILE *input_file ); < void ned1yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); < YY_BUFFER_STATE ned1yy_create_buffer (FILE *file,int size ); < void ned1yy_delete_buffer (YY_BUFFER_STATE b ); < void ned1yy_flush_buffer (YY_BUFFER_STATE b ); < void ned1yypush_buffer_state (YY_BUFFER_STATE new_buffer ); < void ned1yypop_buffer_state (void ); < < static void ned1yyensure_buffer_stack (void ); < static void ned1yy_load_buffer_state (void ); < static void ned1yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); < < #define YY_FLUSH_BUFFER ned1yy_flush_buffer(YY_CURRENT_BUFFER ) < < YY_BUFFER_STATE ned1yy_scan_buffer (char *base,yy_size_t size ); < YY_BUFFER_STATE ned1yy_scan_string (yyconst char *yy_str ); < YY_BUFFER_STATE ned1yy_scan_bytes (yyconst char *bytes,int len ); < < void *ned1yyalloc (yy_size_t ); < void *ned1yyrealloc (void *,yy_size_t ); < void ned1yyfree (void * ); --- > void yyrestart YY_PROTO(( FILE *input_file )); 337c252,268 < #define yy_new_buffer ned1yy_create_buffer --- > void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); > void yy_load_buffer_state YY_PROTO(( void )); > YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); > void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); > void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); > void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); > #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) > > YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); > YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); > YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); > > static void *yy_flex_alloc YY_PROTO(( yy_size_t )); > static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); > static void yy_flex_free YY_PROTO(( void * )); > > #define yy_new_buffer yy_create_buffer 341,346c272,274 < if ( ! YY_CURRENT_BUFFER ){ \ < ned1yyensure_buffer_stack (); \ < YY_CURRENT_BUFFER_LVALUE = \ < ned1yy_create_buffer(ned1yyin,YY_BUF_SIZE ); \ < } \ < YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ --- > if ( ! yy_current_buffer ) \ > yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ > yy_current_buffer->yy_is_interactive = is_interactive; \ 351,356c279,281 < if ( ! YY_CURRENT_BUFFER ){\ < ned1yyensure_buffer_stack (); \ < YY_CURRENT_BUFFER_LVALUE = \ < ned1yy_create_buffer(ned1yyin,YY_BUF_SIZE ); \ < } \ < YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ --- > if ( ! yy_current_buffer ) \ > yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ > yy_current_buffer->yy_at_bol = at_bol; \ 359,361c284 < #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) < < /* Begin user sect3 */ --- > #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 364,366c287 < < FILE *ned1yyin = (FILE *) 0, *ned1yyout = (FILE *) 0; < --- > FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 367a289,290 > extern char *yytext; > #define yytext_ptr yytext 369,379c292,295 < extern int ned1yylineno; < < int ned1yylineno = 1; < < extern char *ned1yytext; < #define yytext_ptr ned1yytext < < 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[] ); --- > static yy_state_type yy_get_previous_state YY_PROTO(( void )); > static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); > static int yy_get_next_buffer YY_PROTO(( void )); > static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 382c298 < * corresponding action - sets up ned1yytext. --- > * corresponding action - sets up yytext. 385,387c301,303 < (yytext_ptr) = yy_bp; \ < ned1yyleng = (size_t) (yy_cp - yy_bp); \ < (yy_hold_char) = *yy_cp; \ --- > yytext_ptr = yy_bp; \ > yyleng = (int) (yy_cp - yy_bp); \ > yy_hold_char = *yy_cp; \ 389c305 < (yy_c_buf_p) = yy_cp; --- > yy_c_buf_p = yy_cp; 393,400c309 < /* This struct is not used in this scanner, < but its presence is necessary. */ < struct yy_trans_info < { < flex_int32_t yy_verify; < flex_int32_t yy_nxt; < }; < static yyconst flex_int16_t yy_accept[379] = --- > static yyconst short int yy_accept[379] = 445c354 < static yyconst flex_int32_t yy_ec[256] = --- > static yyconst int yy_ec[256] = 477c386 < static yyconst flex_int32_t yy_meta[65] = --- > static yyconst int yy_meta[65] = 488c397 < static yyconst flex_int16_t yy_base[386] = --- > static yyconst short int yy_base[386] = 534c443 < static yyconst flex_int16_t yy_def[386] = --- > static yyconst short int yy_def[386] = 580c489 < static yyconst flex_int16_t yy_nxt[505] = --- > static yyconst short int yy_nxt[505] = 640c549 < static yyconst flex_int16_t yy_chk[505] = --- > static yyconst short int yy_chk[505] = 703,705d611 < extern int ned1yy_flex_debug; < int ned1yy_flex_debug = 0; < 713c619 < char *ned1yytext; --- > char *yytext; 714a621 > #define INITIAL 0 728a636 > #define cplusplusbody 1 729a638 > #define stringliteral 2 731a641 > #define YY_NEVER_INTERACTIVE 1 756,803c666 < #line 757 "lex.ned1yy.cc" < < #define INITIAL 0 < #define cplusplusbody 1 < #define stringliteral 2 < < #ifndef YY_NO_UNISTD_H < /* Special case for "unistd.h", since it is non-ANSI. We include it way < * 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. < */ < #include <unistd.h> < #endif < < #ifndef YY_EXTRA_TYPE < #define YY_EXTRA_TYPE void * < #endif < < static int yy_init_globals (void ); < < /* Accessor methods to globals. < These are made visible to non-reentrant scanners for convenience. */ < < int ned1yylex_destroy (void ); < < int ned1yyget_debug (void ); < < void ned1yyset_debug (int debug_flag ); < < YY_EXTRA_TYPE ned1yyget_extra (void ); < < void ned1yyset_extra (YY_EXTRA_TYPE user_defined ); < < FILE *ned1yyget_in (void ); < < void ned1yyset_in (FILE * in_str ); < < FILE *ned1yyget_out (void ); < < void ned1yyset_out (FILE * out_str ); < < int ned1yyget_leng (void ); < < char *ned1yyget_text (void ); < < int ned1yyget_lineno (void ); < < void ned1yyset_lineno (int line_number ); --- > #line 667 "lex.ned1yy.cc" 811c674 < extern "C" int ned1yywrap (void ); --- > extern "C" int yywrap YY_PROTO(( void )); 813c676,677 < extern int ned1yywrap (void ); --- > extern int yywrap YY_PROTO(( void )); > #endif 814a679,681 > > #ifndef YY_NO_UNPUT > static void yyunput YY_PROTO(( int c, char *buf_ptr )); 817,818d683 < static void yyunput (int c,char *buf_ptr ); < 820c685 < static void yy_flex_strncpy (char *,yyconst char *,int ); --- > static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 824c689 < static int yy_flex_strlen (yyconst char * ); --- > static int yy_flex_strlen YY_PROTO(( yyconst char * )); 828d692 < 830c694 < static int yyinput (void ); --- > static int yyinput YY_PROTO(( void )); 832c696,697 < static int input (void ); --- > static int input YY_PROTO(( void )); > #endif 834a700,732 > #if YY_STACK_USED > static int yy_start_stack_ptr = 0; > static int yy_start_stack_depth = 0; > static int *yy_start_stack = 0; > #ifndef YY_NO_PUSH_STATE > static void yy_push_state YY_PROTO(( int new_state )); > #endif > #ifndef YY_NO_POP_STATE > static void yy_pop_state YY_PROTO(( void )); > #endif > #ifndef YY_NO_TOP_STATE > static int yy_top_state YY_PROTO(( void )); > #endif > > #else > #define YY_NO_PUSH_STATE 1 > #define YY_NO_POP_STATE 1 > #define YY_NO_TOP_STATE 1 > #endif > > #ifdef YY_MALLOC_DECL > YY_MALLOC_DECL > #else > #if __STDC__ > #ifndef __cplusplus > #include <stdlib.h> > #endif > #else > /* Just try to get by without declaring the routines. This will fail > * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) > * or sizeof(void*) != sizeof(int). > */ > #endif 839,842d736 < #ifdef __ia64__ < /* On IA-64, the buffer size is 16k, not 8k */ < #define YY_READ_BUF_SIZE 16384 < #else 844d737 < #endif /* __ia64__ */ 847a741 > 852c746 < #define ECHO do { if (fwrite( ned1yytext, ned1yyleng, 1, ned1yyout )) {} } while (0) --- > #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 860c754 < if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ --- > if ( yy_current_buffer->yy_is_interactive ) \ 862,863c756 < int c = '*'; \ < size_t n; \ --- > int c = '*', n; \ 865c758 < (c = getc( ned1yyin )) != EOF && c != '\n'; ++n ) \ --- > (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 869c762 < if ( c == EOF && ferror( ned1yyin ) ) \ --- > if ( c == EOF && ferror( yyin ) ) \ 876c769 < while ( (result = fread(buf, 1, max_size, ned1yyin))==0 && ferror(ned1yyin)) \ --- > while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 884c777 < clearerr(ned1yyin); \ --- > clearerr(yyin); \ 886,888c779 < }\ < \ < --- > } 909,910d799 < /* end tables serialization structures and prototypes */ < 915,920c804,805 < #define YY_DECL_IS_OURS 1 < < extern int ned1yylex (void); < < #define YY_DECL int ned1yylex (void) < #endif /* !YY_DECL */ --- > #define YY_DECL int yylex YY_PROTO(( void )) > #endif 922c807 < /* Code executed at the beginning of each rule, after ned1yytext and ned1yyleng --- > /* Code executed at the beginning of each rule, after yytext and yyleng 937,938d821 < /** The main scanner function which does all the work. < */ 940c823 < { --- > { 944c827 < --- > 947c830 < #line 948 "lex.ned1yy.cc" --- > #line 831 "lex.ned1yy.cc" 949c832 < if ( !(yy_init) ) --- > if ( yy_init ) 951c834 < (yy_init) = 1; --- > yy_init = 0; 957,958c840,841 < if ( ! (yy_start) ) < (yy_start) = 1; /* first start state */ --- > if ( ! yy_start ) > yy_start = 1; /* first start state */ 960,961c843,844 < if ( ! ned1yyin ) < ned1yyin = stdin; --- > if ( ! yyin ) > yyin = stdin; 963,964c846,847 < if ( ! ned1yyout ) < ned1yyout = stdout; --- > if ( ! yyout ) > yyout = stdout; 966,970c849,851 < if ( ! YY_CURRENT_BUFFER ) { < ned1yyensure_buffer_stack (); < YY_CURRENT_BUFFER_LVALUE = < ned1yy_create_buffer(ned1yyin,YY_BUF_SIZE ); < } --- > if ( ! yy_current_buffer ) > yy_current_buffer = > yy_create_buffer( yyin, YY_BUF_SIZE ); 972c853 < ned1yy_load_buffer_state( ); --- > yy_load_buffer_state(); 977c858 < yy_cp = (yy_c_buf_p); --- > yy_cp = yy_c_buf_p; 979,980c860,861 < /* Support of ned1yytext. */ < *yy_cp = (yy_hold_char); --- > /* Support of yytext. */ > *yy_cp = yy_hold_char; 987c868 < yy_current_state = (yy_start); --- > yy_current_state = yy_start; 994,995c875,876 < (yy_last_accepting_state) = yy_current_state; < (yy_last_accepting_cpos) = yy_cp; --- > yy_last_accepting_state = yy_current_state; > yy_last_accepting_cpos = yy_cp; 1006,1008c887 < while ( yy_current_state != 378 ); < yy_cp = (yy_last_accepting_cpos); < yy_current_state = (yy_last_accepting_state); --- > while ( yy_base[yy_current_state] != 440 ); 1011a891,896 > if ( yy_act == 0 ) > { /* have to back up */ > yy_cp = yy_last_accepting_cpos; > yy_current_state = yy_last_accepting_state; > yy_act = yy_accept[yy_current_state]; > } 1014a900 > 1016a903 > 1021,1023c908,910 < *yy_cp = (yy_hold_char); < yy_cp = (yy_last_accepting_cpos); < yy_current_state = (yy_last_accepting_state); --- > *yy_cp = yy_hold_char; > yy_cp = yy_last_accepting_cpos; > yy_current_state = yy_last_accepting_state; 1377d1263 < /* rule 71 can match eol */ 1389d1274 < /* rule 73 can match eol */ 1395d1279 < /* rule 74 can match eol */ 1432d1315 < /* rule 81 can match eol */ 1623d1505 < /* rule 119 can match eol */ 1638c1520 < #line 1639 "lex.ned1yy.cc" --- > #line 1521 "lex.ned1yy.cc" 1647c1529 < int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; --- > int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 1650c1532 < *yy_cp = (yy_hold_char); --- > *yy_cp = yy_hold_char; 1653c1535 < if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) --- > if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 1657,1659c1539,1541 < * just pointed ned1yyin at a new source and called < * ned1yylex(). If so, then we have to assure < * consistency between YY_CURRENT_BUFFER and our --- > * just pointed yyin at a new source and called > * yylex(). If so, then we have to assure > * consistency between yy_current_buffer and our 1664,1666c1546,1548 < (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; < YY_CURRENT_BUFFER_LVALUE->yy_input_file = ned1yyin; < YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; --- > yy_n_chars = yy_current_buffer->yy_n_chars; > yy_current_buffer->yy_input_file = yyin; > yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 1676c1558 < if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) --- > if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1680c1562 < (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; --- > yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1682c1564 < yy_current_state = yy_get_previous_state( ); --- > yy_current_state = yy_get_previous_state(); 1695c1577 < yy_bp = (yytext_ptr) + YY_MORE_ADJ; --- > yy_bp = yytext_ptr + YY_MORE_ADJ; 1700c1582 < yy_cp = ++(yy_c_buf_p); --- > yy_cp = ++yy_c_buf_p; 1707,1708c1589 < yy_cp = (yy_last_accepting_cpos); < yy_current_state = (yy_last_accepting_state); --- > yy_cp = yy_c_buf_p; 1713c1594 < else switch ( yy_get_next_buffer( ) ) --- > else switch ( yy_get_next_buffer() ) 1717c1598 < (yy_did_buffer_switch_on_eof) = 0; --- > yy_did_buffer_switch_on_eof = 0; 1719c1600 < if ( ned1yywrap( ) ) --- > if ( yywrap() ) 1723c1604 < * ned1yytext, we can now set up --- > * yytext, we can now set up 1730c1611 < (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; --- > yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 1738c1619 < if ( ! (yy_did_buffer_switch_on_eof) ) --- > if ( ! yy_did_buffer_switch_on_eof ) 1745,1746c1626,1627 < (yy_c_buf_p) = < (yytext_ptr) + yy_amount_of_matched_text; --- > yy_c_buf_p = > yytext_ptr + yy_amount_of_matched_text; 1748c1629 < yy_current_state = yy_get_previous_state( ); --- > yy_current_state = yy_get_previous_state(); 1750,1751c1631,1632 < yy_cp = (yy_c_buf_p); < yy_bp = (yytext_ptr) + YY_MORE_ADJ; --- > yy_cp = yy_c_buf_p; > yy_bp = yytext_ptr + YY_MORE_ADJ; 1755,1756c1636,1637 < (yy_c_buf_p) = < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; --- > yy_c_buf_p = > &yy_current_buffer->yy_ch_buf[yy_n_chars]; 1758c1639 < yy_current_state = yy_get_previous_state( ); --- > yy_current_state = yy_get_previous_state(); 1760,1761c1641,1642 < yy_cp = (yy_c_buf_p); < yy_bp = (yytext_ptr) + YY_MORE_ADJ; --- > yy_cp = yy_c_buf_p; > yy_bp = yytext_ptr + YY_MORE_ADJ; 1772c1653,1654 < } /* end of ned1yylex */ --- > } /* end of yylex */ > 1781,1784c1663,1667 < static int yy_get_next_buffer (void) < { < register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; < register char *source = (yytext_ptr); --- > > static int yy_get_next_buffer() > { > register char *dest = yy_current_buffer->yy_ch_buf; > register char *source = yytext_ptr; 1788c1671 < if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) --- > if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1792c1675 < if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) --- > if ( yy_current_buffer->yy_fill_buffer == 0 ) 1794c1677 < if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) --- > if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1814c1697 < number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; --- > number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1819c1702 < if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) --- > if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1823c1706 < YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; --- > yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1827,1828c1710,1711 < int num_to_read = < YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; --- > int num_to_read = > yy_current_buffer->yy_buf_size - number_to_move - 1; 1831a1715,1718 > #ifdef YY_USES_REJECT > YY_FATAL_ERROR( > "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); > #else 1834c1721 < YY_BUFFER_STATE b = YY_CURRENT_BUFFER; --- > YY_BUFFER_STATE b = yy_current_buffer; 1837c1724 < (int) ((yy_c_buf_p) - b->yy_ch_buf); --- > (int) (yy_c_buf_p - b->yy_ch_buf); 1850c1737,1738 < ned1yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); --- > yy_flex_realloc( (void *) b->yy_ch_buf, > b->yy_buf_size + 2 ); 1860c1748 < (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; --- > yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1862c1750 < num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - --- > num_to_read = yy_current_buffer->yy_buf_size - 1864c1752 < --- > #endif 1871,1872c1759,1760 < YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), < (yy_n_chars), (size_t) num_to_read ); --- > YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), > yy_n_chars, num_to_read ); 1874c1762 < YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); --- > yy_current_buffer->yy_n_chars = yy_n_chars; 1877c1765 < if ( (yy_n_chars) == 0 ) --- > if ( yy_n_chars == 0 ) 1882c1770 < ned1yyrestart(ned1yyin ); --- > yyrestart( yyin ); 1888c1776 < YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = --- > yy_current_buffer->yy_buffer_status = 1896,1906c1784,1786 < if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { < /* Extend the array by 50%, plus the number we really need. */ < yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ned1yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); < if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) < YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); < } < < (yy_n_chars) += number_to_move; < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; --- > yy_n_chars += number_to_move; > yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; > yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1908c1788 < (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; --- > yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1911c1791,1792 < } --- > } > 1915,1916c1796,1797 < static yy_state_type yy_get_previous_state (void) < { --- > static yy_state_type yy_get_previous_state() > { 1919,1920d1799 < < yy_current_state = (yy_start); 1922c1801,1803 < for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) --- > yy_current_state = yy_start; > > for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1927,1928c1808,1809 < (yy_last_accepting_state) = yy_current_state; < (yy_last_accepting_cpos) = yy_cp; --- > yy_last_accepting_state = yy_current_state; > yy_last_accepting_cpos = yy_cp; 1940c1821,1822 < } --- > } > 1947,1948c1829,1836 < static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) < { --- > > #ifdef YY_USE_PROTOS > static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) > #else > static yy_state_type yy_try_NUL_trans( yy_current_state ) > yy_state_type yy_current_state; > #endif > { 1950c1838 < register char *yy_cp = (yy_c_buf_p); --- > register char *yy_cp = yy_c_buf_p; 1955,1956c1843,1844 < (yy_last_accepting_state) = yy_current_state; < (yy_last_accepting_cpos) = yy_cp; --- > yy_last_accepting_state = yy_current_state; > yy_last_accepting_cpos = yy_cp; 1968c1856 < } --- > } 1970,1974d1857 < static void yyunput (int c, register char * yy_bp ) < { < register char *yy_cp; < < yy_cp = (yy_c_buf_p); 1976,1977c1859,1871 < /* undo effects of setting up ned1yytext */ < *yy_cp = (yy_hold_char); --- > #ifndef YY_NO_UNPUT > #ifdef YY_USE_PROTOS > static void yyunput( int c, register char *yy_bp ) > #else > static void yyunput( c, yy_bp ) > int c; > register char *yy_bp; > #endif > { > register char *yy_cp = yy_c_buf_p; > > /* undo effects of setting up yytext */ > *yy_cp = yy_hold_char; 1979c1873 < if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) --- > if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1982,1984c1876,1878 < register int number_to_move = (yy_n_chars) + 2; < register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ < YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; --- > register int number_to_move = yy_n_chars + 2; > register char *dest = &yy_current_buffer->yy_ch_buf[ > yy_current_buffer->yy_buf_size + 2]; 1986c1880 < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; --- > &yy_current_buffer->yy_ch_buf[number_to_move]; 1988c1882 < while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) --- > while ( source > yy_current_buffer->yy_ch_buf ) 1993,1994c1887,1888 < YY_CURRENT_BUFFER_LVALUE->yy_n_chars = < (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; --- > yy_current_buffer->yy_n_chars = > yy_n_chars = yy_current_buffer->yy_buf_size; 1996c1890 < if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) --- > if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2002,2005d1895 < (yytext_ptr) = yy_bp; < (yy_hold_char) = *yy_cp; < (yy_c_buf_p) = yy_cp; < } 2007c1897,1903 < #ifndef YY_NO_INPUT --- > yytext_ptr = yy_bp; > yy_hold_char = *yy_cp; > yy_c_buf_p = yy_cp; > } > #endif /* ifndef YY_NO_UNPUT */ > > 2009c1905 < static int yyinput (void) --- > static int yyinput() 2011c1907 < static int input (void) --- > static int input() 2013,2014c1909 < < { --- > { 2016,2017d1910 < < *(yy_c_buf_p) = (yy_hold_char); 2019c1912,1914 < if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) --- > *yy_c_buf_p = yy_hold_char; > > if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2025c1920 < if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) --- > if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2027c1922 < *(yy_c_buf_p) = '\0'; --- > *yy_c_buf_p = '\0'; 2031,2032c1926,1927 < int offset = (yy_c_buf_p) - (yytext_ptr); < ++(yy_c_buf_p); --- > int offset = yy_c_buf_p - yytext_ptr; > ++yy_c_buf_p; 2034c1929 < switch ( yy_get_next_buffer( ) ) --- > switch ( yy_get_next_buffer() ) 2048c1943 < ned1yyrestart(ned1yyin ); --- > yyrestart( yyin ); 2050c1945 < /*FALLTHROUGH*/ --- > /* fall through */ 2054c1949 < if ( ned1yywrap( ) ) --- > if ( yywrap() ) 2057c1952 < if ( ! (yy_did_buffer_switch_on_eof) ) --- > if ( ! yy_did_buffer_switch_on_eof ) 2067c1962 < (yy_c_buf_p) = (yytext_ptr) + offset; --- > yy_c_buf_p = yytext_ptr + offset; 2073,2075c1968,1971 < c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ < *(yy_c_buf_p) = '\0'; /* preserve ned1yytext */ < (yy_hold_char) = *++(yy_c_buf_p); --- > c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ > *yy_c_buf_p = '\0'; /* preserve yytext */ > yy_hold_char = *++yy_c_buf_p; > 2078,2079c1974 < } < #endif /* ifndef YY_NO_INPUT */ --- > } 2081,2092c1976,1988 < /** 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 . < */ < void ned1yyrestart (FILE * input_file ) < { < < if ( ! YY_CURRENT_BUFFER ){ < ned1yyensure_buffer_stack (); < YY_CURRENT_BUFFER_LVALUE = < ned1yy_create_buffer(ned1yyin,YY_BUF_SIZE ); --- > > #ifdef YY_USE_PROTOS > void yyrestart( FILE *input_file ) > #else > void yyrestart( input_file ) > FILE *input_file; > #endif > { > if ( ! yy_current_buffer ) > yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); > > yy_init_buffer( yy_current_buffer, input_file ); > yy_load_buffer_state(); 2095,2097d1990 < ned1yy_init_buffer(YY_CURRENT_BUFFER,input_file ); < ned1yy_load_buffer_state( ); < } 2099,2112c1992,1999 < /** Switch to a different input buffer. < * @param new_buffer The new input buffer. < * < */ < void ned1yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) < { < < /* TODO. We should be able to replace this entire function body < * with < * ned1yypop_buffer_state(); < * ned1yypush_buffer_state(new_buffer); < */ < ned1yyensure_buffer_stack (); < if ( YY_CURRENT_BUFFER == new_buffer ) --- > #ifdef YY_USE_PROTOS > void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) > #else > void yy_switch_to_buffer( new_buffer ) > YY_BUFFER_STATE new_buffer; > #endif > { > if ( yy_current_buffer == new_buffer ) 2115c2002 < if ( YY_CURRENT_BUFFER ) --- > if ( yy_current_buffer ) 2118,2120c2005,2007 < *(yy_c_buf_p) = (yy_hold_char); < YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); < YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); --- > *yy_c_buf_p = yy_hold_char; > yy_current_buffer->yy_buf_pos = yy_c_buf_p; > yy_current_buffer->yy_n_chars = yy_n_chars; 2123,2124c2010,2011 < YY_CURRENT_BUFFER_LVALUE = new_buffer; < ned1yy_load_buffer_state( ); --- > yy_current_buffer = new_buffer; > yy_load_buffer_state(); 2127,2128c2014,2015 < * EOF (ned1yywrap()) processing, but the only time this flag < * is looked at is after ned1yywrap() is called, so it's safe --- > * EOF (yywrap()) processing, but the only time this flag > * is looked at is after yywrap() is called, so it's safe 2131,2132c2018,2019 < (yy_did_buffer_switch_on_eof) = 1; < } --- > yy_did_buffer_switch_on_eof = 1; > } 2134,2140d2020 < static void ned1yy_load_buffer_state (void) < { < (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; < (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; < ned1yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; < (yy_hold_char) = *(yy_c_buf_p); < } 2142,2149c2022,2042 < /** Allocate and initialize an input buffer state. < * @param file A readable stream. < * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. < * < * @return the allocated buffer state. < */ < YY_BUFFER_STATE ned1yy_create_buffer (FILE * file, int size ) < { --- > #ifdef YY_USE_PROTOS > void yy_load_buffer_state( void ) > #else > void yy_load_buffer_state() > #endif > { > yy_n_chars = yy_current_buffer->yy_n_chars; > yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; > yyin = yy_current_buffer->yy_input_file; > yy_hold_char = *yy_c_buf_p; > } > > > #ifdef YY_USE_PROTOS > YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) > #else > YY_BUFFER_STATE yy_create_buffer( file, size ) > FILE *file; > int size; > #endif > { 2151,2152c2044,2045 < < b = (YY_BUFFER_STATE) ned1yyalloc(sizeof( struct yy_buffer_state ) ); --- > > b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 2154c2047 < YY_FATAL_ERROR( "out of dynamic memory in ned1yy_create_buffer()" ); --- > YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2161c2054 < b->yy_ch_buf = (char *) ned1yyalloc(b->yy_buf_size + 2 ); --- > b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 2163c2056 < YY_FATAL_ERROR( "out of dynamic memory in ned1yy_create_buffer()" ); --- > YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2167c2060 < ned1yy_init_buffer(b,file ); --- > yy_init_buffer( b, file ); 2170c2063 < } --- > } 2172,2178c2065,2072 < /** Destroy the buffer. < * @param b a buffer created with ned1yy_create_buffer() < * < */ < void ned1yy_delete_buffer (YY_BUFFER_STATE b ) < { < --- > > #ifdef YY_USE_PROTOS > void yy_delete_buffer( YY_BUFFER_STATE b ) > #else > void yy_delete_buffer( b ) > YY_BUFFER_STATE b; > #endif > { 2182,2183c2076,2077 < if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ < YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; --- > if ( b == yy_current_buffer ) > yy_current_buffer = (YY_BUFFER_STATE) 0; 2186c2080 < ned1yyfree((void *) b->yy_ch_buf ); --- > yy_flex_free( (void *) b->yy_ch_buf ); 2188,2189c2082,2083 < ned1yyfree((void *) b ); < } --- > yy_flex_free( (void *) b ); > } 2191,2195d2084 < /* Initializes or reinitializes a buffer. < * This function is sometimes called more than once on the same buffer, < * such as during a ned1yyrestart() or at EOF. < */ < static void ned1yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 2197,2200c2086,2106 < { < int oerrno = errno; < < ned1yy_flush_buffer(b ); --- > #ifndef _WIN32 > #include <unistd.h> > #else > #ifndef YY_ALWAYS_INTERACTIVE > #ifndef YY_NEVER_INTERACTIVE > extern int isatty YY_PROTO(( int )); > #endif > #endif > #endif > > #ifdef YY_USE_PROTOS > void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) > #else > void yy_init_buffer( b, file ) > YY_BUFFER_STATE b; > FILE *file; > #endif > > > { > yy_flush_buffer( b ); 2205,2212c2111,2120 < /* If b is the current buffer, then ned1yy_init_buffer was _probably_ < * called from ned1yyrestart() or through yy_get_next_buffer. < * In that case, we don't want to reset the lineno or column. < */ < if (b != YY_CURRENT_BUFFER){ < b->yy_bs_lineno = 1; < b->yy_bs_column = 0; < } --- > #if YY_ALWAYS_INTERACTIVE > b->yy_is_interactive = 1; > #else > #if YY_NEVER_INTERACTIVE > b->yy_is_interactive = 0; > #else > b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; > #endif > #endif > } 2214,2217d2121 < b->yy_is_interactive = 0; < < errno = oerrno; < } 2219,2225c2123,2131 < /** Discard all buffered characters. On the next scan, YY_INPUT will be called. < * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. < * < */ < void ned1yy_flush_buffer (YY_BUFFER_STATE b ) < { < if ( ! b ) --- > #ifdef YY_USE_PROTOS > void yy_flush_buffer( YY_BUFFER_STATE b ) > #else > void yy_flush_buffer( b ) > YY_BUFFER_STATE b; > #endif > > { > if ( ! b ) 2242,2294c2148,2149 < if ( b == YY_CURRENT_BUFFER ) < ned1yy_load_buffer_state( ); < } < < /** 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. < * < */ < void ned1yypush_buffer_state (YY_BUFFER_STATE new_buffer ) < { < if (new_buffer == NULL) < return; < < ned1yyensure_buffer_stack(); < < /* This block is copied from ned1yy_switch_to_buffer. */ < if ( YY_CURRENT_BUFFER ) < { < /* Flush out information for old buffer. */ < *(yy_c_buf_p) = (yy_hold_char); < YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); < YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); < } < < /* Only push if top exists. Otherwise, replace top. */ < if (YY_CURRENT_BUFFER) < (yy_buffer_stack_top)++; < YY_CURRENT_BUFFER_LVALUE = new_buffer; < < /* copied from ned1yy_switch_to_buffer. */ < ned1yy_load_buffer_state( ); < (yy_did_buffer_switch_on_eof) = 1; < } < < /** Removes and deletes the top of the stack, if present. < * The next element becomes the new top. < * < */ < void ned1yypop_buffer_state (void) < { < if (!YY_CURRENT_BUFFER) < return; < < ned1yy_delete_buffer(YY_CURRENT_BUFFER ); < YY_CURRENT_BUFFER_LVALUE = NULL; < if ((yy_buffer_stack_top) > 0) < --(yy_buffer_stack_top); < < if (YY_CURRENT_BUFFER) { < ned1yy_load_buffer_state( ); < (yy_did_buffer_switch_on_eof) = 1; --- > if ( b == yy_current_buffer ) > yy_load_buffer_state(); 2296,2328d2150 < } < < /* Allocates the stack if it does not exist. < * Guarantees space for at least one push. < */ < static void ned1yyensure_buffer_stack (void) < { < int num_to_alloc; < < if (!(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. < */ < num_to_alloc = 1; < (yy_buffer_stack) = (struct yy_buffer_state**)ned1yyalloc < (num_to_alloc * sizeof(struct yy_buffer_state*) < ); < if ( ! (yy_buffer_stack) ) < YY_FATAL_ERROR( "out of dynamic memory in ned1yyensure_buffer_stack()" ); < < memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); < < (yy_buffer_stack_max) = num_to_alloc; < (yy_buffer_stack_top) = 0; < return; < } < < if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ < < /* Increase the buffer to prepare for a possible push. */ < int grow_size = 8 /* arbitrary grow size */; 2330,2342d2151 < num_to_alloc = (yy_buffer_stack_max) + grow_size; < (yy_buffer_stack) = (struct yy_buffer_state**)ned1yyrealloc < ((yy_buffer_stack), < num_to_alloc * sizeof(struct yy_buffer_state*) < ); < if ( ! (yy_buffer_stack) ) < YY_FATAL_ERROR( "out of dynamic memory in ned1yyensure_buffer_stack()" ); < < /* zero only the new slots.*/ < memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); < (yy_buffer_stack_max) = num_to_alloc; < } < } 2344,2351c2153,2161 < /** 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 < * < * @return the newly allocated buffer state object. < */ < YY_BUFFER_STATE ned1yy_scan_buffer (char * base, yy_size_t size ) < { --- > #ifndef YY_NO_SCAN_BUFFER > #ifdef YY_USE_PROTOS > YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) > #else > YY_BUFFER_STATE yy_scan_buffer( base, size ) > char *base; > yy_size_t size; > #endif > { 2353c2163 < --- > 2360c2170 < b = (YY_BUFFER_STATE) ned1yyalloc(sizeof( struct yy_buffer_state ) ); --- > b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 2362c2172 < YY_FATAL_ERROR( "out of dynamic memory in ned1yy_scan_buffer()" ); --- > YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 2374c2184 < ned1yy_switch_to_buffer(b ); --- > yy_switch_to_buffer( b ); 2377c2187,2188 < } --- > } > #endif 2379,2391d2189 < /** Setup the input buffer state to scan a string. The next call to ned1yylex() will < * scan from a @e copy of @a str. < * @param yystr a NUL-terminated string to scan < * < * @return the newly allocated buffer state object. < * @note If you want to scan bytes that may contain NUL values, then use < * ned1yy_scan_bytes() instead. < */ < YY_BUFFER_STATE ned1yy_scan_string (yyconst char * yystr ) < { < < return ned1yy_scan_bytes(yystr,strlen(yystr) ); < } 2393,2401c2191,2216 < /** Setup the input buffer state to scan the given bytes. The next call to ned1yylex() will < * scan from a @e copy of @a bytes. < * @param yybytes the byte buffer to scan < * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. < * < * @return the newly allocated buffer state object. < */ < YY_BUFFER_STATE ned1yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) < { --- > #ifndef YY_NO_SCAN_STRING > #ifdef YY_USE_PROTOS > YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) > #else > YY_BUFFER_STATE yy_scan_string( yy_str ) > yyconst char *yy_str; > #endif > { > int len; > for ( len = 0; yy_str[len]; ++len ) > ; > > return yy_scan_bytes( yy_str, len ); > } > #endif > > > #ifndef YY_NO_SCAN_BYTES > #ifdef YY_USE_PROTOS > YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) > #else > YY_BUFFER_STATE yy_scan_bytes( bytes, len ) > yyconst char *bytes; > int len; > #endif > { 2406c2221 < --- > 2408,2409c2223,2224 < n = _yybytes_len + 2; < buf = (char *) ned1yyalloc(n ); --- > n = len + 2; > buf = (char *) yy_flex_alloc( n ); 2411c2226 < YY_FATAL_ERROR( "out of dynamic memory in ned1yy_scan_bytes()" ); --- > YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 2413,2414c2228,2229 < for ( i = 0; i < _yybytes_len; ++i ) < buf[i] = yybytes[i]; --- > for ( i = 0; i < len; ++i ) > buf[i] = bytes[i]; 2416c2231 < buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; --- > buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 2418c2233 < b = ned1yy_scan_buffer(buf,n ); --- > b = yy_scan_buffer( buf, n ); 2420c2235 < YY_FATAL_ERROR( "bad buffer in ned1yy_scan_bytes()" ); --- > YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 2428c2243,2244 < } --- > } > #endif 2430,2431c2246,2252 < #ifndef YY_EXIT_FAILURE < #define YY_EXIT_FAILURE 2 --- > > #ifndef YY_NO_PUSH_STATE > #ifdef YY_USE_PROTOS > static void yy_push_state( int new_state ) > #else > static void yy_push_state( new_state ) > int new_state; 2432a2254,2257 > { > if ( yy_start_stack_ptr >= yy_start_stack_depth ) > { > yy_size_t new_size; 2434,2438c2259,2260 < static void yy_fatal_error (yyconst char* msg ) < { < (void) fprintf( stderr, "%s\n", msg ); < exit( YY_EXIT_FAILURE ); < } --- > yy_start_stack_depth += YY_START_STACK_INCR; > new_size = yy_start_stack_depth * sizeof( int ); 2440c2262,2263 < /* Redefine yyless() so it works in section 3 code. */ --- > if ( ! yy_start_stack ) > yy_start_stack = (int *) yy_flex_alloc( new_size ); 2442,2455c2265,2267 < #undef yyless < #define yyless(n) \ < do \ < { \ < /* Undo effects of setting up ned1yytext. */ \ < int yyless_macro_arg = (n); \ < YY_LESS_LINENO(yyless_macro_arg);\ < ned1yytext[ned1yyleng] = (yy_hold_char); \ < (yy_c_buf_p) = ned1yytext + yyless_macro_arg; \ < (yy_hold_char) = *(yy_c_buf_p); \ < *(yy_c_buf_p) = '\0'; \ < ned1yyleng = yyless_macro_arg; \ < } \ < while ( 0 ) --- > else > yy_start_stack = (int *) yy_flex_realloc( > (void *) yy_start_stack, new_size ); 2457c2269,2272 < /* Accessor methods (get/set functions) to struct members. */ --- > if ( ! yy_start_stack ) > YY_FATAL_ERROR( > "out of memory expanding start-condition stack" ); > } 2459,2466c2274 < /** Get the current line number. < * < */ < int ned1yyget_lineno (void) < { < < return ned1yylineno; < } --- > yy_start_stack[yy_start_stack_ptr++] = YY_START; 2468,2474c2276,2278 < /** Get the input stream. < * < */ < FILE *ned1yyget_in (void) < { < return ned1yyin; < } --- > BEGIN(new_state); > } > #endif 2476,2482d2279 < /** Get the output stream. < * < */ < FILE *ned1yyget_out (void) < { < return ned1yyout; < } 2484,2490c2281,2285 < /** Get the length of the current token. < * < */ < int ned1yyget_leng (void) < { < return ned1yyleng; < } --- > #ifndef YY_NO_POP_STATE > static void yy_pop_state() > { > if ( --yy_start_stack_ptr < 0 ) > YY_FATAL_ERROR( "start-condition stack underflow" ); 2492,2494c2287,2289 < /** Get the current token. < * < */ --- > BEGIN(yy_start_stack[yy_start_stack_ptr]); > } > #endif 2496,2499d2290 < char *ned1yyget_text (void) < { < return ned1yytext; < } 2501,2509c2292,2297 < /** Set the current line number. < * @param line_number < * < */ < void ned1yyset_lineno (int line_number ) < { < < ned1yylineno = line_number; < } --- > #ifndef YY_NO_TOP_STATE > static int yy_top_state() > { > return yy_start_stack[yy_start_stack_ptr - 1]; > } > #endif 2511,2520c2299,2301 < /** Set the input stream. This does not discard the current < * input buffer. < * @param in_str A readable stream. < * < * @see ned1yy_switch_to_buffer < */ < void ned1yyset_in (FILE * in_str ) < { < ned1yyin = in_str ; < } --- > #ifndef YY_EXIT_FAILURE > #define YY_EXIT_FAILURE 2 > #endif 2522,2525c2303,2312 < void ned1yyset_out (FILE * out_str ) < { < ned1yyout = out_str ; < } --- > #ifdef YY_USE_PROTOS > static void yy_fatal_error( yyconst char msg[] ) > #else > static void yy_fatal_error( msg ) > char msg[]; > #endif > { > (void) fprintf( stderr, "%s\n", msg ); > exit( YY_EXIT_FAILURE ); > } 2527,2530d2313 < int ned1yyget_debug (void) < { < return ned1yy_flex_debug; < } 2532,2535d2314 < void ned1yyset_debug (int bdebug ) < { < ned1yy_flex_debug = bdebug ; < } 2537,2563c2316 < static int yy_init_globals (void) < { < /* Initialization is the same as for the non-reentrant scanner. < * This function is called from ned1yylex_destroy(), so don't allocate here. < */ < < (yy_buffer_stack) = 0; < (yy_buffer_stack_top) = 0; < (yy_buffer_stack_max) = 0; < (yy_c_buf_p) = (char *) 0; < (yy_init) = 0; < (yy_start) = 0; < < /* Defined in main.c */ < #ifdef YY_STDINIT < ned1yyin = stdin; < ned1yyout = stdout; < #else < ned1yyin = (FILE *) 0; < ned1yyout = (FILE *) 0; < #endif < < /* For future reference: Set errno on error, since we are called by < * ned1yylex_init() < */ < return 0; < } --- > /* Redefine yyless() so it works in section 3 code. */ 2565,2582c2318,2329 < /* ned1yylex_destroy is for both reentrant and non-reentrant scanners. */ < int ned1yylex_destroy (void) < { < < /* Pop the buffer stack, destroying each element. */ < while(YY_CURRENT_BUFFER){ < ned1yy_delete_buffer(YY_CURRENT_BUFFER ); < YY_CURRENT_BUFFER_LVALUE = NULL; < ned1yypop_buffer_state(); < } < < /* Destroy the stack itself. */ < ned1yyfree((yy_buffer_stack) ); < (yy_buffer_stack) = NULL; < < /* Reset the globals. This is important in a non-reentrant scanner so the next time < * ned1yylex() is called, initialization will occur. */ < yy_init_globals( ); --- > #undef yyless > #define yyless(n) \ > do \ > { \ > /* Undo effects of setting up yytext. */ \ > yytext[yyleng] = yy_hold_char; \ > yy_c_buf_p = yytext + n; \ > yy_hold_char = *yy_c_buf_p; \ > *yy_c_buf_p = '\0'; \ > yyleng = n; \ > } \ > while ( 0 ) 2584,2585d2330 < return 0; < } 2587,2589c2332 < /* < * Internal utility routines. < */ --- > /* Internal utility routines. */ 2592,2593c2335,2343 < static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) < { --- > #ifdef YY_USE_PROTOS > static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) > #else > static void yy_flex_strncpy( s1, s2, n ) > char *s1; > yyconst char *s2; > int n; > #endif > { 2597c2347 < } --- > } 2601,2602c2351,2357 < static int yy_flex_strlen (yyconst char * s ) < { --- > #ifdef YY_USE_PROTOS > static int yy_flex_strlen( yyconst char *s ) > #else > static int yy_flex_strlen( s ) > yyconst char *s; > #endif > { 2608c2363 < } --- > } 2611,2612c2366,2373 < void *ned1yyalloc (yy_size_t size ) < { --- > > #ifdef YY_USE_PROTOS > static void *yy_flex_alloc( yy_size_t size ) > #else > static void *yy_flex_alloc( size ) > yy_size_t size; > #endif > { 2614c2375 < } --- > } 2616,2617c2377,2384 < void *ned1yyrealloc (void * ptr, yy_size_t size ) < { --- > #ifdef YY_USE_PROTOS > static void *yy_flex_realloc( void *ptr, yy_size_t size ) > #else > static void *yy_flex_realloc( ptr, size ) > void *ptr; > yy_size_t size; > #endif > { 2626,2631c2393 < } < < void ned1yyfree (void * ptr ) < { < free( (char *) ptr ); /* see ned1yyrealloc() for (char *) cast */ < } --- > } 2633c2395,2403 < #define YYTABLES_NAME "yytables" --- > #ifdef YY_USE_PROTOS > static void yy_flex_free( void *ptr ) > #else > static void yy_flex_free( ptr ) > void *ptr; > #endif > { > free( ptr ); > } 2634a2405,2411 > #if YY_MAIN > int main() > { > yylex(); > return 0; > } > #endif 2638,2639c2415 < < int ned1yywrap() --- > int yywrap() 2656c2432 < #define yytext_ptr ned1yytext --- > #define yytext_ptr yytext 2668c2444 < * - ned1yytext[] is the current token passed by (f)lex --- > * - yytext[] is the current token passed by (f)lex 2675,2676c2451,2452 < /* printf("DBG: countChars(): prev=%d,%d pos=%d,%d ned1yytext=>>%s<<\n", < prevpos.li, prevpos.co, pos.li, pos.co, ned1yytext); --- > /* printf("DBG: countChars(): prev=%d,%d pos=%d,%d yytext=>>%s<<\n", > prevpos.li, prevpos.co, pos.li, pos.co, yytext); 2687,2688c2463,2464 < for (i = 0; ned1yytext[i] != '\0'; i++) { < if (ned1yytext[i] == '\n') { --- > for (i = 0; yytext[i] != '\0'; i++) { > if (yytext[i] == '\n') { 2692c2468 < } else if (ned1yytext[i] == '\t') --- > } else if (yytext[i] == '\t') 2696c2472 < if (ned1yytext[i] != '\n') { --- > if (yytext[i] != '\n') { 2698c2474 < textbuf[textbuflen++]=ned1yytext[i]; textbuf[textbuflen]='\0'; --- > textbuf[textbuflen++]=yytext[i]; textbuf[textbuflen]='\0'; 2724d2499 < | ||||||||
![]() |
|
(0000887) rhornig (administrator) 2014-01-29 13:48 |
lex 2.5.4 was released in 1997 ! You need to update the system (or flex) to be able to compile omnet. |
![]() |
|||
Date Modified | Username | Field | Change |
2014-01-29 10:49 | andras | New Issue | |
2014-01-29 10:52 | andras | File Added: diff_for_flex_verbose_output.txt | |
2014-01-29 10:52 | andras | File Added: diff_for_lexned1yycc.txt | |
2014-01-29 13:48 | rhornig | Note Added: 0000887 | |
2014-01-29 13:48 | rhornig | Status | new => resolved |
2014-01-29 13:48 | rhornig | Fixed in Version | => 4.4 |
2014-01-29 13:48 | rhornig | Resolution | open => won't fix |
2014-01-29 13:48 | rhornig | Assigned To | => rhornig |
Copyright © 2000 - 2022 MantisBT Team |