5 void yyerror(char *msg, ...);
9 GList *config; /* this is what we parse into */
21 %token <string> TOK_ID TOK_STRING
31 %expect 2 /* for now */
44 { $$ = g_list_append(NULL, $1); }
46 { $$ = g_list_append($1, $2); }
51 CLNode *s = g_new(CLNode,1);
60 CLNode *s = g_new(CLNode,1);
61 s->type = CL_LISTBLOCK;
69 CLNode *s = g_new(CLNode,1);
80 $$ = g_list_append(NULL, $1);
84 $$ = g_list_append($1, $3);
96 CLNode *node = g_new(CLNode,1);
103 CLNode *node = g_new(CLNode,1);
110 CLNode *node = g_new(CLNode,1);
124 /* void yyerror(const char *err) */
126 /* fprintf(stderr, "Parse error on line %d, near '%s': %s\n", */
127 /* yylineno, yytext, err); */
130 void yyerror(char *msg, ...)
135 fprintf(stderr, "Error on line %d, near '%s': ", yylineno, yytext);
136 vfprintf(stderr, msg, args);
137 fprintf(stderr,"\n");
142 GList *cl_parse_fh(FILE *fh)