From a19c59ba87f3095be83359ada63290edf20aeff5 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 28 Oct 2013 22:55:15 +0900 Subject: [PATCH] remove stuff rerated to parser_control from scan.l --- src/parse.y | 2 +- src/scan.l | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/parse.y b/src/parse.y index 1837fee3..83cc9bd0 100644 --- a/src/parse.y +++ b/src/parse.y @@ -195,7 +195,7 @@ yyerror(struct parser_control *p, const char *msg) int yylex(YYSTYPE *yylvalp, struct parser_control *p) { - return yylex_(yylvalp, p->yyscanner, p); + return yylex_(yylvalp, p->yyscanner); } bool diff --git a/src/scan.l b/src/scan.l index c312aeff..6fbb0395 100644 --- a/src/scan.l +++ b/src/scan.l @@ -5,17 +5,7 @@ #include "picrin.h" #include "y.tab.h" -struct parser_control { - pic_state *pic; - void *yyscanner; - pic_value value; - bool incomp; - int yynerrs; -}; - -void yyerror(struct parser_control *p, const char *msg); - -#define YY_DECL int yylex_ (YYSTYPE *yylvalp, yyscan_t yyscanner, struct parser_control *p) +#define YY_DECL int yylex_(YYSTYPE *yylvalp, yyscan_t yyscanner) %} %option reentrant @@ -79,7 +69,6 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0" "\"" BEGIN(STRING); { [^\\"]* yymore(); - <> { yyerror(p, "eof in string"); BEGIN(INITIAL); } "\"" { yytext[yyleng-1] = '\0'; yylvalp->cstr = strdup(yytext);