yacc-a-dy YACC yacc, Help me HACK!

Ronald Pikkert ronald at atcmp.nl
Thu Oct 4 19:08:50 AEST 1990


>From article <289 at cti1.UUCP>, by mpledger at cti1.UUCP (Mark Pledger):
<> 
<>      Could somebody please give me a hand with a lex & yacc problem.  I am 
<> trying to build a small subset of the SQL language.  For purposes of this 
<> question my yacc grammer is defined below. 
<> 
<> %% /* RULES */
<> {quotes}             { 
<>                      yylval.string = yytext;
                        yylval.string = strdup(yytext);
                                        ^^^^^^
<>                      return(QUOTES);         
<>                      }
<> 

Always use dynamically allocated memory to hold matched patterns in the
input.


-
Ronald Pikkert                 E-mail: ronald at atcmp.nl
@ AT Computing b.v.            Tel:    080 - 566880
Toernooiveld
6525 ED  Nijmegen



More information about the Comp.lang.c mailing list