help-bison
[Top][All Lists]
Advanced

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

Re: Can one prune the parse stack?


From: Mike Aubury
Subject: Re: Can one prune the parse stack?
Date: Thu, 26 Aug 2010 21:28:56 +0100

I'm thinking your grammar is probably wrong - there shouldn't be any
problem with having lots of packets like that - so long and they are
not very recursive (packet within packet within packet .....)
What does your grammar look like ?


On 26 August 2010 20:54, Christoph Lechner <address@hidden> wrote:
> 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
>
> _______________________________________________
> address@hidden http://lists.gnu.org/mailman/listinfo/help-bison
>



reply via email to

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