remove stuff rerated to parser_control from scan.l
This commit is contained in:
parent
94e1e245ea
commit
a19c59ba87
|
@ -195,7 +195,7 @@ yyerror(struct parser_control *p, const char *msg)
|
||||||
int
|
int
|
||||||
yylex(YYSTYPE *yylvalp, struct parser_control *p)
|
yylex(YYSTYPE *yylvalp, struct parser_control *p)
|
||||||
{
|
{
|
||||||
return yylex_(yylvalp, p->yyscanner, p);
|
return yylex_(yylvalp, p->yyscanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
13
src/scan.l
13
src/scan.l
|
@ -5,17 +5,7 @@
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
#include "y.tab.h"
|
#include "y.tab.h"
|
||||||
|
|
||||||
struct parser_control {
|
#define YY_DECL int yylex_(YYSTYPE *yylvalp, yyscan_t yyscanner)
|
||||||
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)
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%option reentrant
|
%option reentrant
|
||||||
|
@ -79,7 +69,6 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0"
|
||||||
"\"" BEGIN(STRING);
|
"\"" BEGIN(STRING);
|
||||||
<STRING>{
|
<STRING>{
|
||||||
[^\\"]* yymore();
|
[^\\"]* yymore();
|
||||||
<<EOF>> { yyerror(p, "eof in string"); BEGIN(INITIAL); }
|
|
||||||
"\"" {
|
"\"" {
|
||||||
yytext[yyleng-1] = '\0';
|
yytext[yyleng-1] = '\0';
|
||||||
yylvalp->cstr = strdup(yytext);
|
yylvalp->cstr = strdup(yytext);
|
||||||
|
|
Loading…
Reference in New Issue