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: 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 want to validate this type of sequence (a "prefix" of terminal-symbol sequence...In others words is a "part" of a valid sequence...). Obviously it work if I change my grammar: S1: token1 S2 S2: token2 | token2 S3 | token3 S2 ...but the only way is rewrite the grammar or exist others solutions in Bison? Many Thanks. Bye _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison