summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 199b0a07..1490a3de 100644
--- a/parser.c
+++ b/parser.c
@@ -90,6 +90,7 @@ static struct cobj_ops parser_ops = {
void parser_common_init(parser_t *p)
{
int i;
+ yyscan_t yyscan;
p->parser = nil;
p->lineno = 1;
@@ -98,8 +99,8 @@ void parser_common_init(parser_t *p)
p->name = nil;
p->prepared_msg = nil;
p->syntax_tree = nil;
- yylex_init(&p->yyscan);
- p->scanner = convert(scanner_t *, p->yyscan);
+ yylex_init(&yyscan);
+ p->scanner = convert(scanner_t *, yyscan);
yyset_extra(p, p->scanner);
p->recent_tok.yy_char = 0;
p->recent_tok.yy_lval.val = 0;