bison-patches
[Top][All Lists]
Advanced

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

Re: push parser implemenation


From: Bob Rossi
Subject: Re: push parser implemenation
Date: Wed, 5 Apr 2006 10:01:41 -0400
User-agent: Mutt/1.5.9i

> > If so, do you call your main loop function from within 
> > the bison grammar file? If not, do you block while parsing?
> 
> I currently block, and haven't spent any effort at doing it properly(and will 
> probably continue to post pone it until the push-parser stuff has been 
> released). An input buffer is built asynchronously, and once it's complete, I 
> let the bison/tokenizer loose. That helps at least a bit; during the time the 
> parser executes it doesn't block because of waiting on IO, it is only the 
> computation time.
> 
> Thanks for the clarifications.

OK, that makes a lot of sense. In my case, a single MI output command,
which is what the bison grammar file implements can be arbitrary in
size. For instance, ever hit 'bt' in GDB when the program being debugged
crash via an infinite recursion bug? GDB usually spews out
  frame 1 ..
  frame 2 ..
  frame 10000 ..
for a really long time. This would make my program hang while parsing
the data. The push parser was really the only alternative to me.

Well, if anyone does look at the patch, it was really mechanical to
make. It should be fairly obvious what is going on. To be honest, I
don't even know how the original parser works. It doesn't matter though,
simply because the changes are completely mechanical.

Bob Rossi




reply via email to

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