help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restart/Continue parser (maybe also lexer) at the previous state


From: Hans Aberg
Subject: Re: Restart/Continue parser (maybe also lexer) at the previous state
Date: Tue, 10 Jan 2006 08:06:49 +0100

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,
  address@hidden
  http://lists.gnu.org/mailman/listinfo/help-flex
or perhaps the Usenet newsgroup comp.compilers.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]