help-bison
[Top][All Lists]
Advanced

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

Can one prune the parse stack?


From: Christoph Lechner
Subject: Can one prune the parse stack?
Date: Thu, 26 Aug 2010 21:54:56 +0200
User-agent: Thunderbird 1.5.0.9 (X11/20061206)

Hi all,

at the moment I'm just building a flex+bison based front end for a
simple network application. I'm parsing many packets with contents like
<id=123; v=(1.002 -1.1 2); err=0>

The parser is working fine, however I'm hitting the YYMAXDEPTH
restriction after sending a few thousand of such commands to my app.
Increasing YYMAXDEPTH is no solution, because the application has to
process millions of these commands.

As each of these commands does not depend on the previously received
commands, my question is if it is possible to 'prune' the internal
structures of the parse tree/stack.

Therefore one would avoid the YYMAXDEPTH limit.

When one of the commands has been successfully parsed, a specific rule
action is executed, sending the data to the internal workings of the
program. When the data is sent, I don't need it anymore. So it would be
fine if there would be a way to say in that rule action 'discard the
stuff in that subtree' or so.


TIA
- Christoph



reply via email to

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