struct cdecl *decl;
int rc;
- rc = yylex_init(&scanner);
+ rc = cdecl__yylex_init(&scanner);
if (rc != 0)
return NULL;
- state = yy_scan_string(declstr, scanner);
- rc = yyparse(scanner, &decl);
- yy_delete_buffer(state, scanner);
- yylex_destroy(scanner);
+ state = cdecl__yy_scan_string(declstr, scanner);
+ rc = cdecl__yyparse(scanner, &decl);
+ cdecl__yy_delete_buffer(state, scanner);
+ cdecl__yylex_destroy(scanner);
if (rc != 0)
return NULL;
struct cdecl *decl;
int rc;
- rc = yylex_init_extra(true, &scanner);
+ rc = cdecl__yylex_init_extra(true, &scanner);
if (rc != 0)
return NULL;
- state = yy_scan_string(english, scanner);
- rc = yyparse(scanner, &decl);
- yy_delete_buffer(state, scanner);
- yylex_destroy(scanner);
+ state = cdecl__yy_scan_string(english, scanner);
+ rc = cdecl__yyparse(scanner, &decl);
+ cdecl__yy_delete_buffer(state, scanner);
+ cdecl__yylex_destroy(scanner);
if (rc != 0)
return NULL;
*/
}
+%name-prefix "cdecl__yy"
%parse-param {yyscan_t scanner}
%parse-param {struct cdecl **out}
%lex-param {yyscan_t scanner}
}
%code provides {
-void yyerror(YYLTYPE *, void *, struct cdecl **, const char *);
-int yyparse(void *scanner, struct cdecl **out);
+void cdecl__yyerror(YYLTYPE *, void *, struct cdecl **, const char *);
+int cdecl__yyparse(void *scanner, struct cdecl **out);
}
%union {
%option noyywrap bison-locations reentrant
%option extra-type="_Bool"
+%option prefix="cdecl__yy"
%{
#define lex_error(msg) do { \
- yyerror(yylloc, NULL, NULL, (msg)); \
+ cdecl__yyerror(yylloc, NULL, NULL, (msg)); \
return T_LEX_ERROR; \
} while(0)