From a075a17b531653246b9e25f76aa6efb83f4055a9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 16 Nov 2011 14:46:25 -0800 Subject: Allow directives after variable to be a kind of negative match. * match.c (search_form): bugfix: return correct match extent. * parser.y: Adjusting associativity and precedence of directives, IDENT, and grouping tokens once again. This is so that a var followed by a directive will turn into one elem, rather than the var being reduced to an elem first. * txr.1: Revised documentation to mroe clearly define the concept of a negative match, broken into subsections. Some sections belonging to syntax were moved to an appropriate location. Subsections added to description of form syntax. Explanation of directive-driven syntax. --- match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'match.c') diff --git a/match.c b/match.c index 3b501e55..3e10b9bb 100644 --- a/match.c +++ b/match.c @@ -418,7 +418,7 @@ static val search_form(match_line_ctx *c, val needle_form, val from_end) match_line(ml_specline_pos(*c, spec, pos))); if (new_pos) { c->bindings = new_bindings; - return cons(pos, new_pos); + return cons(pos, minus(new_pos, pos)); } } -- cgit v1.2.3