help-bison
[Top][All Lists]
Advanced

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

Re: Question on parsing streaming input in Bison/Bison++


From: Hans Aberg
Subject: Re: Question on parsing streaming input in Bison/Bison++
Date: Thu, 30 Nov 2000 10:47:52 +0100

At 17:08 -0800 0-11-29, Sriram Sankar wrote:
>    I have a question on parsing streaming input (asynchronous socket).
>I am using Flex (C++ option) and Bison. Now I'll be moving over to
>Bison++.
>    I'll be getting the data stream through an asynchronous socket.
>The current implementation gets all the data and then lex/parse it.
>For performance improvement, I'm thinking of parsing blocks of data as
>they come in.

My guess is that you have the situation where the input to be parsed comes
in blocks block_1, block_2, ..., and further, it may happen that the they
arrive in in a different order from their logical order: So even though,
for i < j, block_i logically comes before block_j, block_j may arrive
before block_i. You then want to parse the blocks as they arrive, and then
somehow pick together their semantics. Right?

I do not know much about this type of programming, but could you not first
identify each block, and then parse each block in a separate thread
Flex/Bison combination (which must be pure or "re-entrant" without global
data). Then you need to write something that picks together the semantic
value produced by each thread.

  Hans Aberg





reply via email to

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