Fwd: Q: processing multiple mixed data streams using bison

2005-05-29 Thread Mohit Jaggi
Hi All,
I am trying to process multiple interleaved streams of data in a
single process/thread using yacc/bison. Let us say I am running a
server and have thousands of clients sending me requests at the same
time.

It seems the parser code uses global variables to keep its state while
parsing. I guess that one can introduce code to save all the variables
and restore them...has anyone tried this before?

Mohit.


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


Re: Fwd: Q: processing multiple mixed data streams using bison

2005-05-29 Thread Hans Aberg

At 23:53 -0700 2005/05/28, Mohit Jaggi wrote:

Hi All,
I am trying to process multiple interleaved streams of data in a
single process/thread using yacc/bison. Let us say I am running a
server and have thousands of clients sending me requests at the same
time.

It seems the parser code uses global variables to keep its state while
parsing. I guess that one can introduce code to save all the variables
and restore them...has anyone tried this before?


You do not say what Bison version you are using. I think that the 
C-parser, by now, is fully pure. There has recently been released a 
new version Bison 2005/05/23, see

  List-Archive: 

Question about making Flex generating a pure lexer should be directed to:
  List-Post: 
--
  Hans Aberg


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


Re: Fwd: Q: processing multiple mixed data streams using bison

2005-05-29 Thread Hans Aberg
Otherwise, I wouldn't said it right? If you pick it down, check the 
parser code. I use a C++ parser, and it is not currently pure.


At 11:37 -0700 2005/05/29, Mohit Jaggi wrote:

Hans,
Thanks for the reply...I havn't tried any version yet. Do you think
that the latest version will support this and I won't have to
introduce custom code to save/restore its context?

Mohit.
On 5/29/05, Hans Aberg <[EMAIL PROTECTED]> wrote:

 At 23:53 -0700 2005/05/28, Mohit Jaggi wrote:
 >Hi All,
 >I am trying to process multiple interleaved streams of data in a
 >single process/thread using yacc/bison. Let us say I am running a
 >server and have thousands of clients sending me requests at the same
 >time.
 >
 >It seems the parser code uses global variables to keep its state while
 >parsing. I guess that one can introduce code to save all the variables
 >and restore them...has anyone tried this before?

 You do not say what Bison version you are using. I think that the
 C-parser, by now, is fully pure. There has recently been released a
 new version Bison 2005/05/23, see
List-Archive: 

 Question about making Flex generating a pure lexer should be directed to:
List-Post: 
 --
Hans Aberg




--
  Hans Aberg


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


Re: Fwd: Q: processing multiple mixed data streams using bison

2005-05-29 Thread Mohit Jaggi
Hans,
Thanks for the reply...I havn't tried any version yet. Do you think
that the latest version will support this and I won't have to
introduce custom code to save/restore its context?

Mohit.
On 5/29/05, Hans Aberg <[EMAIL PROTECTED]> wrote:
> At 23:53 -0700 2005/05/28, Mohit Jaggi wrote:
> >Hi All,
> >I am trying to process multiple interleaved streams of data in a
> >single process/thread using yacc/bison. Let us say I am running a
> >server and have thousands of clients sending me requests at the same
> >time.
> >
> >It seems the parser code uses global variables to keep its state while
> >parsing. I guess that one can introduce code to save all the variables
> >and restore them...has anyone tried this before?
> 
> You do not say what Bison version you are using. I think that the
> C-parser, by now, is fully pure. There has recently been released a
> new version Bison 2005/05/23, see
>List-Archive: 
> 
> Question about making Flex generating a pure lexer should be directed to:
>List-Post: 
> --
>Hans Aberg
>


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