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);
61 CLNode *s = g_new(CLNode,1);
62 s->type = CL_LISTBLOCK;
71 CLNode *s = g_new(CLNode,1);
83 $$ = g_list_append(NULL, $1);
87 $$ = g_list_append($1, $3);
99 CLNode *node = g_new(CLNode,1);
102 node->lineno = yylineno;
107 CLNode *node = g_new(CLNode,1);
110 node->lineno = yylineno;
115 CLNode *node = g_new(CLNode,1);
118 node->lineno = yylineno;
130 /* void yyerror(const char *err) */
132 /* fprintf(stderr, "Parse error on line %d, near '%s': %s\n", */
133 /* yylineno, yytext, err); */
136 void yyerror(char *msg, ...)
141 fprintf(stderr, "Error on line %d, near '%s': ", yylineno, yytext);
142 vfprintf(stderr, msg, args);
143 fprintf(stderr,"\n");
148 GList *cl_parse_fh(FILE *fh)