Can one prune the parse stack?

2010-08-26 Thread Christoph Lechner
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 The parser is working fine, however I'm hitting the YYMAXDEPTH restriction after sending a few thousand of such commands to my app. Increasing YYMAXD

Re: Can one prune the parse stack?

2010-08-26 Thread Mike Aubury
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 wrote: > Hi all, >

Re: Can one prune the parse stack?

2010-08-26 Thread Christoph Lechner
Mike Aubury wrote: > 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 ? @Mike: Sorry for sending my first rep

Re: Can one prune the parse stack?

2010-08-26 Thread Mike Aubury
Ok - theres the problem.. Firstly - the parser probably wont see blank lines - they'll have been taken out by your tokeniser (lex/flex - whatever).. So - the 'stream' should probably be written something like : stream : stmt | stream stmt ; and similarly for the assignments : assignment

Re: Can one prune the parse stack?

2010-08-26 Thread Hans Aberg
On 26 Aug 2010, at 23:08, Christoph Lechner wrote: Mike Aubury wrote: 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 lo

Re: Can one prune the parse stack?

2010-08-26 Thread Christoph Lechner
Mike Aubury wrote: > Ok - theres the problem.. > Firstly - the parser probably wont see blank lines - they'll have been > taken out by your tokeniser (lex/flex - whatever).. > So - the 'stream' should probably be written something like : Hi Mike, your suggestion fixed the problem. The process has