Hi List, I have trace an error down to this part of yylex, that is called before the reading starts.
if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } The yyensure_buffer_stack(yyscanner) completes OK, The yy_create_buffer( ... ) completes OK. But the assignment to YY_CURRENT_BUFFER_LVALUE fails . I can send the whole lex input and the generated output. Anything else I can do to trace this ? I have converted the scanner and parser into a reentrant model. My bison parser gets started like this: int pl1_parser(struct Pl1ParserParms *ppp) { #include "PL1Parser.h" int rc; if(ppp==NULL) printf("Parameter structure is not allocated"); /* set debug flags as needed */ /* initialize the reentrant scanner */ yyscan_t scanner; rc=yylex_init( &scanner ); printf("yylex_init returned %i\n",rc); yyset_in(ppp->inputFile,scanner); yyset_debug(ppp->debugScanner,scanner); yyset_extra((void *)ppp, scanner); yydebug=ppp->debugParser; //pl1pp_yydebug=ppp->debugScannerPreprocessor; printf("pl11.c: starting parse. yydebug:%i, yy_flex_debug: %i\n",yydebug,yyget_debug(scanner)); int option_debug_level=0; /* do the parse */ rc=yyparse (scanner); yylex_destroy( scanner ); return rc; } anything else I need to setup before calling yyparse ? Thanks for your help Henrik _______________________________________________ help-flex mailing list help-flex@gnu.org http://lists.gnu.org/mailman/listinfo/help-flex