diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-11-16 14:46:25 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-11-16 14:46:25 -0800 |
commit | a075a17b531653246b9e25f76aa6efb83f4055a9 (patch) | |
tree | 6c6be644ab9416b4d0ac248f7583b7bd429db4e3 /parser.y | |
parent | b86a599bbfcd591f64f31ddfc9ab1a659d39a7c0 (diff) | |
download | txr-a075a17b531653246b9e25f76aa6efb83f4055a9.tar.gz txr-a075a17b531653246b9e25f76aa6efb83f4055a9.tar.bz2 txr-a075a17b531653246b9e25f76aa6efb83f4055a9.zip |
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.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -90,10 +90,11 @@ static val parsed_spec; %type <lineno> '(' %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 '&' |