Re: pure-parser warning: ‘yylval’ is used uninitialized in this function

2008-05-10 Thread Joel E. Denny
On Thu, 8 May 2008, Kaiwang Chen wrote: > GCC with "-Os -Wall -Werror" complains in the case of pure-parser, while > without -Os it works well. Any help? Thanks in advance. > > $ bison -o parse.c parse.y > $ gcc -Os -Wall -Werror -c parse.c -o parse.o > cc1: warnings being treated as errors > pa

Re: SQL grammar

2008-05-10 Thread Hans Aberg
On 8 May 2008, at 17:49, RichardT wrote: please let me know if there is another forum where I can post my question. The Usenet newsgroup comp.compilers. I am writing a parser to parse SQL (actually T-SQL for MS Sql Server). Or netsearch for links like http://savage.net.au/SQL/ I am get

Re: Problem finding cause of memory exhausted

2008-05-10 Thread Laurence Finston
On Thu, 8 May 2008, Frans Englich wrote: > I'm running into "memory exhausted" and from reading section 2.3 this is > apparently caused by doing right recursion instead of left recursion. My > grammar is fairly large(grammar file is 3400 lines) and I simply have trouble > finding where I do rig

Re: SQL grammar

2008-05-10 Thread RichardT
Hi. Also, here is a simplified version of my bison file. You can just copy and paste it in a file and compile it with: bison -y -v -d file_name.y %token NOT IN UNION ICONST SELECT FROM SCONST %left UNION %left '+' '-' %left '*' '/' %% search_cond:NOT IN '(' exp_list ')'

pure-parser warning: ‘yylval’ is used uninitialized in this function

2008-05-10 Thread Kaiwang Chen
Hello, GCC with "-Os -Wall -Werror" complains in the case of pure-parser, while without -Os it works well. Any help? Thanks in advance. $ bison -o parse.c parse.y $ gcc -Os -Wall -Werror -c parse.c -o parse.o cc1: warnings being treated as errors parse.c: In function ‘yyparse’: parse.c:1247: war

SQL grammar

2008-05-10 Thread RichardT
Hello All: First off, I would like to apologize in case this post does not belong to this forum. If that is the case, please let me know if there is another forum where I can post my question. I am writing a parser to parse SQL (actually T-SQL for MS Sql Server). I am getting a shift/reduce con