bison --debug --defines=$*.h --output=$*.c $^
%.c: %.l
- flex --outfile=$@ $<
+ flex --prefix=glcpp_ --outfile=$@ $<
glcpp-lex.c: glcpp-parse.h
string_list_t *
_argument_list_member_at (argument_list_t *list, int index);
+static int
+yylex (yyscan_t scanner);
+
%}
%union {
parser = xtalloc (NULL, glcpp_parser_t);
- yylex_init_extra (parser, &parser->scanner);
+ glcpp_lex_init_extra (parser, &parser->scanner);
parser->defines = hash_table_ctor (32, hash_table_string_hash,
hash_table_string_compare);
parser->expansions = NULL;
void
glcpp_parser_destroy (glcpp_parser_t *parser)
{
- yylex_destroy (parser->scanner);
+ glcpp_lex_destroy (parser->scanner);
hash_table_dtor (parser->defines);
talloc_free (parser);
}
glcpp_parser_push_expansion_macro (parser, macro, arguments);
}
+
+static int
+yylex (yyscan_t scanner)
+{
+ return glcpp_lex (scanner);
+}
/* Generated by glcpp-lex.l to glcpp-lex.c */
int
-yylex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner);
+glcpp_lex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner);
int
-yylex (yyscan_t scanner);
+glcpp_lex (yyscan_t scanner);
int
-yylex_destroy (yyscan_t scanner);
+glcpp_lex_destroy (yyscan_t scanner);
/* Generated by glcpp-parse.y to glcpp-parse.c */