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. --- parser.y | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'parser.y') diff --git a/parser.y b/parser.y index 846763d0..e546b086 100644 --- a/parser.y +++ b/parser.y @@ -90,10 +90,11 @@ static val parsed_spec; %type '(' %nonassoc LOW /* used for precedence assertion */ -%nonassoc ALL SOME NONE MAYBE CASES CHOOSE AND OR END COLLECT UNTIL COLL -%nonassoc OUTPUT REPEAT REP FIRST LAST EMPTY DEFINE -%nonassoc '[' ']' -%right IDENT SPACE TEXT NUMBER '{' '}' '(' ')' +%right IDENT +%right ALL SOME NONE MAYBE CASES CHOOSE AND OR END COLLECT UNTIL COLL +%right OUTPUT REPEAT REP FIRST LAST EMPTY DEFINE +%right SPACE TEXT NUMBER +%nonassoc '[' ']' '{' '}' '(' ')' %left '-' %left '|' '/' %left '&' -- cgit v1.2.3