Hello,
Using flex 2.5.35 and bison 2.4.2. Setting up a yy_scan_string() like so:
yyscan_t scanner;
clilex_init(&scanner);
YY_BUFFER_STATE lex_buff = cli_scan_string(cmd, scanner);
if(cliparse(*this))
clierror(*this, cmd);
cli_delete_buffer(lex_buff, scanner);
clilex_destroy(scanner);
Prefix="cli" for both flex and bison. Get a segfault on first operation
tried. When running through gdb, the fault is hit in the flex code, but
it's probably a user issue, or less likely, a bison design issue.
cliparse() calls clilex() with what seems like its own yyscanner
variable. Looking at the call syntax, there's no place in where I tell
cliparse(), "hey, use this yyscanner when talking to clilex". It's
probably just trying to read from yyin, instead of processing my buffer.
How do I tell bison about my custom flex scanner instance?
--Bart
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison