diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-19 07:48:33 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-19 07:48:33 -0700 |
commit | 1cf78b42b2ebbb16b33e16f0bb3c1f1dc2b3b26f (patch) | |
tree | 8239cebd4be8014d3f36f3abb3726782853a6a93 /parser.c | |
parent | 055ea6cbe74203568d6e038298725fb0f97bfbfe (diff) | |
download | txr-1cf78b42b2ebbb16b33e16f0bb3c1f1dc2b3b26f.tar.gz txr-1cf78b42b2ebbb16b33e16f0bb3c1f1dc2b3b26f.tar.bz2 txr-1cf78b42b2ebbb16b33e16f0bb3c1f1dc2b3b26f.zip |
Remove useless member from parser structure.
* parser.c (parser_common_init): Use local variable to capture
output of yylex_init, rather than yyscan structure member.
* parser.h (struct parser): Member yyscan removed.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |