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);
59 CLNode *s = g_new(CLNode,1);
60 s->type = CL_LISTBLOCK;
68 CLNode *s = g_new(CLNode,1);
78 $$ = g_list_append(NULL, $1);
82 $$ = g_list_append($1, $3);
94 CLNode *node = g_new(CLNode,1);
101 CLNode *node = g_new(CLNode,1);
108 CLNode *node = g_new(CLNode,1);
122 /* void yyerror(const char *err) */
124 /* fprintf(stderr, "Parse error on line %d, near '%s': %s\n", */
125 /* yylineno, yytext, err); */
128 void yyerror(char *msg, ...)
133 fprintf(stderr, "Error on line %d, near '%s': ", yylineno, yytext);
134 vfprintf(stderr, msg, args);
135 fprintf(stderr,"\n");
140 GList *cl_parse_fh(FILE *fh)