diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1990-03-14 13:39:21 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1990-03-14 13:39:21 +0000 |
commit | f248f2d111793b35a158d9c52e5c9b892ce5a5bc (patch) | |
tree | 529b82614072eecf7da6dcc4d189dff637362cb1 /parse.y | |
parent | 7768de78e642b90c06fbe5be6809663829169dd8 (diff) |
Tweaks for NUL chars.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 ); |