From a1349b59841b14b2a458b46ba36ed085becbdbd9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 1 Oct 2011 11:35:06 -0700 Subject: Regression bug fix: longest match variables broken by 2011-09-28 commit which introduced the double var match. * match.c (match_line): Handle case where modifier is t. * parser.y (var_op): Produce modifir as (t) rather than t. --- ChangeLog | 9 +++++++++ match.c | 2 +- parser.y | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cd09002..12e72593 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-10-01 Kaz Kylheku + + Regression bug fix: longest match variables broken by + 2011-09-28 commit which introduced the double var match. + + * match.c (match_line): Handle case where modifier is t. + + * parser.y (var_op): Produce modifir as (t) rather than t. + 2011-10-01 Kaz Kylheku New directive: choose. diff --git a/match.c b/match.c index f11c11dc..977f8cee 100644 --- a/match.c +++ b/match.c @@ -375,7 +375,7 @@ static val match_line(val bindings, val specline, val dataline, specline = cons(pat, rest(specline)); continue; } - } else if (modifier) { + } else if (modifier && modifier != t) { sem_error(spec_lineno, lit("invalid modifier ~s on variable ~s"), modifier, sym, nao); } else if (pat == nil) { /* no modifier, no elem -> to end of line */ diff --git a/parser.y b/parser.y index 51f45042..93a8eb4d 100644 --- a/parser.y +++ b/parser.y @@ -473,7 +473,7 @@ var : IDENT { $$ = list(var_s, intern(string_own($1), nil), yybadtoken(yychar, lit("variable spec")); } ; -var_op : '*' { $$ = t; } +var_op : '*' { $$ = list(t, nao); } ; list : '(' exprs ')' { $$ = $2; } -- cgit v1.2.3