On 10 Jan 2006, at 07:28, Roesner, Thomas wrote:

I'd like to write a parser, that can be continued with a new input, even if the previous input seemd to be EOF and the last found tokens ended in
a not finished "nonterminal"

The background:

We have a data structure with some formating information and a 80 char
textfield.
mystruct {int, int, int, char[80]}

In some cases the complete data is stored in more than one textline. I'd like to parse the first line and if the text is incomplete the next line
and so on.

In the moment I copy all possible lines of text in a char[] and start
the parser.

In all my tests the scanner (flex) and the parser seemed to be reseted
to an initial state, wichh leads to "incomplete Syntax".

Any Ideas?

[Replies, cc Help-Bison.] This is normally handled by the lexer. For more help, you might try the Flex manual,
  help-flex@gnu.org
  http://lists.gnu.org/mailman/listinfo/help-flex
or perhaps the Usenet newsgroup comp.compilers.

  Hans Aberg




_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to