remove stuff rerated to parser_control from scan.l

This commit is contained in:
Yuichi Nishiwaki 2013-10-28 22:55:15 +09:00
parent 94e1e245ea
commit a19c59ba87
2 changed files with 2 additions and 13 deletions

View File

@ -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

View File

@ -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);
<STRING>{
[^\\"]* yymore();
<<EOF>> { yyerror(p, "eof in string"); BEGIN(INITIAL); }
"\"" {
yytext[yyleng-1] = '\0';
yylvalp->cstr = strdup(yytext);