summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1990-03-14 13:39:21 +0000
committerVern Paxson <vern@ee.lbl.gov>1990-03-14 13:39:21 +0000
commitf248f2d111793b35a158d9c52e5c9b892ce5a5bc (patch)
tree529b82614072eecf7da6dcc4d189dff637362cb1 /parse.y
parent7768de78e642b90c06fbe5be6809663829169dd8 (diff)
Tweaks for NUL chars.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y11
1 files changed, 10 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 07ce77f..12479a8 100644
--- a/parse.y
+++ b/parse.y
@@ -503,7 +503,7 @@ singleton : singleton '*'
++rulelen;
if ( $1 == '\0' )
- synerr( "null in rule" );
+ uses_NUL = true;
if ( caseins && $1 >= 'A' && $1 <= 'Z' )
$1 = clower( $1 );
@@ -531,6 +531,9 @@ fullccl : '[' ccl ']'
ccl : ccl CHAR '-' CHAR
{
+ if ( $2 == '\0' || $4 == '\0' )
+ uses_NUL = true;
+
if ( $2 > $4 )
synerr( "negative range in character class" );
@@ -559,6 +562,9 @@ ccl : ccl CHAR '-' CHAR
| ccl CHAR
{
+ if ( $2 == '\0' )
+ uses_NUL = true;
+
if ( caseins )
if ( $2 >= 'A' && $2 <= 'Z' )
$2 = clower( $2 );
@@ -579,6 +585,9 @@ ccl : ccl CHAR '-' CHAR
string : string CHAR
{
+ if ( $2 == '\0' )
+ uses_NUL = true;
+
if ( caseins )
if ( $2 >= 'A' && $2 <= 'Z' )
$2 = clower( $2 );