Re: [sqlite] Lemon behavior
On Tue, Dec 07, 2010 at 08:09:53PM +0100, Begelman, Jamie wrote: > I'm using Lemon for a non-sqlite related project and it is exiting with an > assertion failure that I would like to understand. I have extracted the > following small set of productions from a larger grammar. The "list" > production happens to be the start symbol in the larger grammar. > > list::= list DELIMITER command. > list::= command. > command ::= TERMINAL1. > command ::= TERMINAL2. > > When I place these in a .y file by themselves and build the file, Lemon fails > with: > > Assertion failed: apx->type==SH_RESOLVED || apx->type==RD_RESOLVED || > apx->type==SSCONFLICT || apx->type==SRCONFLICT || apx->type==RRCONFLICT || > apy->type==SH_RESOLVED || apy->type==RD_RESOLVED || apy->type==SSCONFLICT || > apy->type==SRCONFLICT || apy->type==RRCONFLICT, file lemon.c, line 1065 > > The odd thing is I use this pattern to parse lists of things elsewhere in the > grammar without issue. Any insight appreciated. > I observed that adding a single rule to the beginning of the grammar: main::= list. Fixed things for me. Try that. I've no idea why it makes a difference, mind. This was tried with lemon in SQLite 3.5.9, from Debian lenny. Christian ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Lemon behavior
I'm using Lemon for a non-sqlite related project and it is exiting with an assertion failure that I would like to understand. I have extracted the following small set of productions from a larger grammar. The "list" production happens to be the start symbol in the larger grammar. list::= list DELIMITER command. list::= command. command ::= TERMINAL1. command ::= TERMINAL2. When I place these in a .y file by themselves and build the file, Lemon fails with: Assertion failed: apx->type==SH_RESOLVED || apx->type==RD_RESOLVED || apx->type==SSCONFLICT || apx->type==SRCONFLICT || apx->type==RRCONFLICT || apy->type==SH_RESOLVED || apy->type==RD_RESOLVED || apy->type==SSCONFLICT || apy->type==SRCONFLICT || apy->type==RRCONFLICT, file lemon.c, line 1065 The odd thing is I use this pattern to parse lists of things elsewhere in the grammar without issue. Any insight appreciated. TIA, Jamie The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users