Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #470 > unrolled thread

restart bison parser

Started byJens Kallup <jkallup@web.de>
First post2012-03-02 21:17 +0100
Last post2012-03-02 21:17 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  restart bison parser Jens Kallup <jkallup@web.de> - 2012-03-02 21:17 +0100

#470 — restart bison parser

FromJens Kallup <jkallup@web.de>
Date2012-03-02 21:17 +0100
Subjectrestart bison parser
Message-ID<12-03-003@comp.compilers>
Hello,

I have develop a small software program, that use a bison/yacc/flex
grammar to do some task's.
When I start the program from the console, and no error's are available
in the script, the execution is fine.

But when the parser finds an error, the program stops (gui) and returns
to the next point of program (e.g. display a message).
Then, if the parser is restart (in the running gui), I get error's that
can't be recover.

I search google, but found not realy helpfull information's.
So, I try some woodoo coding in the flex .l file.
Each rule becomes a '"token" {BEGIN(INITIAL); return _TOKEN_;}'
It seems not working fine.

Thats the problem:
"How to scan a script in a gui program more than one times?".
"So, the scanner/parser is part of the one program."

I'm happy For any help.
Thank's

Jens
[The usual problem is that there is still buffered text in the scanner.
A call to yyrestart(), perhaps with a subsequent call to point the input
where you want it, and BEGIN INITIAL usually do the trick. -John]

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web