summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parser.c2
-rw-r--r--parser.h4
-rw-r--r--parser.y26
3 files changed, 16 insertions, 16 deletions
diff --git a/parser.c b/parser.c
index 59ec46c7..2510dbfe 100644
--- a/parser.c
+++ b/parser.c
@@ -424,7 +424,7 @@ val parser_circ_ref(parser_t *p, val num)
if (!obj)
yyerrorf(p->scanner, lit("dangling #~s# ref"), num, nao);
- if (obj == unique_s && !p->circ_suppress) {
+ if (obj == unique_s && !p->ignore) {
p->circ_count++;
return cons(circref_s, cons(num, nil));
}
diff --git a/parser.h b/parser.h
index ff2738f3..94c432db 100644
--- a/parser.h
+++ b/parser.h
@@ -50,7 +50,8 @@ struct parser {
val parser;
cnum lineno;
int errors;
- int eof;
+ unsigned char eof;
+ unsigned char ignore;
val stream;
val name;
val prepared_msg;
@@ -58,7 +59,6 @@ struct parser {
int quasi_level;
val circ_ref_hash;
cnum circ_count;
- int circ_suppress;
scanner_t *scanner;
struct yy_token recent_tok;
struct yy_token tok_pushback[4];
diff --git a/parser.y b/parser.y
index 78cdf9a0..1cf2d30a 100644
--- a/parser.y
+++ b/parser.y
@@ -198,21 +198,21 @@ spec : clauses_opt { parser->syntax_tree = $1; }
;
-hash_semi_or_n_expr : HASH_SEMI { parser->circ_suppress = 1; }
- n_expr { parser->circ_suppress = 0;
+hash_semi_or_n_expr : HASH_SEMI { parser->ignore = 1; }
+ n_expr { parser->ignore = 0;
$$ = nao; }
- | HASH_SEMI '.' { parser->circ_suppress = 1; }
- n_expr { parser->circ_suppress = 0;
+ | HASH_SEMI '.' { parser->ignore = 1; }
+ n_expr { parser->ignore = 0;
$$ = nao; }
| n_expr { $$ = $1; }
| '.' n_expr { $$ = uref_helper(parser, $2); }
;
-hash_semi_or_i_expr : HASH_SEMI { parser->circ_suppress = 1; }
- i_expr { parser->circ_suppress = 0;
+hash_semi_or_i_expr : HASH_SEMI { parser->ignore = 1; }
+ i_expr { parser->ignore = 0;
$$ = nao; }
- | HASH_SEMI '.' { parser->circ_suppress = 1; }
- i_expr { parser->circ_suppress = 0;
+ | HASH_SEMI '.' { parser->ignore = 1; }
+ i_expr { parser->ignore = 0;
$$ = nao; }
| i_expr { $$ = $1; }
| '.' i_expr { $$ = uref_helper(parser, $2); }
@@ -910,11 +910,11 @@ n_exprs : r_exprs { val term_atom = pop(&$1);
r_exprs : n_expr { val exprs = cons($1, nil);
rlc(exprs, $1);
$$ = rlc(cons(unique_s, exprs), exprs); }
- | HASH_SEMI { parser->circ_suppress = 1; }
- n_expr { parser->circ_suppress = 0;
+ | HASH_SEMI { parser->ignore = 1; }
+ n_expr { parser->ignore = 0;
$$ = cons(unique_s, nil); }
- | r_exprs HASH_SEMI { parser->circ_suppress = 1; }
- n_expr { parser->circ_suppress = 0;
+ | r_exprs HASH_SEMI { parser->ignore = 1; }
+ n_expr { parser->ignore = 0;
$$ = $1; }
| r_exprs n_expr { uses_or2;
val term_atom_cons = $1;
@@ -1882,10 +1882,10 @@ int parse(parser_t *parser, val name, enum prime_parser prim)
parser->errors = 0;
parser->eof = 0;
+ parser->ignore = 0;
parser->prepared_msg = nil;
parser->circ_ref_hash = nil;
parser->circ_count = 0;
- parser->circ_suppress = 0;
parser->syntax_tree = nil;
parser->quasi_level = 0;