summaryrefslogtreecommitdiff
path: root/scan.l
diff options
context:
space:
mode:
authorjohn43 <john43>2006-03-28 20:47:11 +0000
committerjohn43 <john43>2006-03-28 20:47:11 +0000
commit04ec779628543ba35217765915abc230a8b16dea (patch)
tree41f29f6711125efacab4fd2b7f5d26390d63de13 /scan.l
parent217afee2abde49a63e140979700dc805b4e57303 (diff)
downloadflex-04ec779628543ba35217765915abc230a8b16dea.tar.gz
Added ccl union operator.
Added test in test suite for ccl union operator. Documented ccl union operator. Removed crufty ccl cache to prevent parser problems.
Diffstat (limited to 'scan.l')
-rw-r--r--scan.l8
1 files changed, 7 insertions, 1 deletions
diff --git a/scan.l b/scan.l
index 5af40a7..e06279f 100644
--- a/scan.l
+++ b/scan.l
@@ -621,7 +621,12 @@ M4QEND "]]"
/* Check to see if we've already encountered this
* ccl.
*/
- if ( (cclval = ccllookup( (Char *) nmstr )) != 0 )
+ if (0 /* <--- This "0" effectively disables the reuse of a
+ * character class (purely based on its source text).
+ * The reason it was disabled is so yacc/bison can parse
+ * ccl operations, such as ccl difference and union.
+ */
+ && (cclval = ccllookup( (Char *) nmstr )) != 0 )
{
if ( input() != ']' )
synerr( _( "bad character class" ) );
@@ -647,6 +652,7 @@ M4QEND "]]"
}
}
"{-}" return CCL_OP_DIFF;
+ "{+}" return CCL_OP_UNION;
/* Check for :space: at the end of the rule so we don't