Please "cc" any replies to the help-bison list.
> The problem is that I must call the parser in another program. My program
> read some strings and I would like pass these strings to bison. So, I have
> a
> grammar like this:
>
> S1 = lemon S2 | apricot S2
> S2 = kiwi orange | S3
> S3 = banana S3
> S1: token1 S2
> S2: token2 S3 | token3 S2
> S3: token4
>
> Now, If I call bison and I try to validate "token1 token2" sequence, the
> parser fails because token2 must be followed by S3, but in my situation
> lex
> have no others tokens for bison at a certain moment...
I don't understand. D
HI
I would like to recognize a "prefix of a grammar" from an input sequence.
You can assume that lex reads a string to be recognized from a file. In
"interactive mode" the "prefix" is not a problem because a valid sequence is
recognized "step by step" when we insert an Input.
for example I have: