6 #include "parse-skel.h"
16 "%%{line}" { return LINE; }
17 "%%{skeleton-line}" { return SLINE; }
19 "%%{yacc}" { return YACC; }
20 "%%{section}" { return SECTION; }
22 "%%{guards}" { return GUARDS; }
23 "%%{actions}" { return ACTIONS; }
24 "%%{tokendef}" { return TOKENS; }
26 "%%{"[a-zA-Z][0-9a-zA-Z_-]+"}" { /* Muscle. */
27 size_t len = strlen (yytext);
28 yylval.string = (char*) malloc (len - 3);
29 strncpy (yylval.string, yytext + 3, len - 4);
30 yylval.string[len - 4] = 0;
34 "%%\"".*"\"" { /* String. */
35 size_t len = strlen (yytext);
36 yylval.string = (char*) malloc (len - 3);
37 strncpy (yylval.string, yytext + 3, len - 4);
38 yylval.string[len - 4] = 0;
42 <<EOF>> { /* End of file. */
46 "\n" { /* End of line. */
51 yylval.character = *yytext;