]> granicus.if.org Git - flex/commitdiff
changed to not use '|' and trailing context combo
authorVern Paxson <vern@ee.lbl.gov>
Tue, 20 Jun 1989 17:24:13 +0000 (17:24 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Tue, 20 Jun 1989 17:24:13 +0000 (17:24 +0000)
so users can test using -F ...

scan.l

diff --git a/scan.l b/scan.l
index 092c02821bd1be72804b2c1e77acf7a163466b48..8c4017413edc7373d8904b71cece67cf60f95aa5 100644 (file)
--- a/scan.l
+++ b/scan.l
@@ -231,7 +231,17 @@ ESCSEQ             \\([^\n]|[0-9]{1,3})
 
 <SECT2>^{OPTWS}"/*"    ACTION_ECHO; BEGIN(C_COMMENT_2);
 
-<SECT2>{WS}            |
+<SECT2>{WS}            {
+                       /* this rule is separate from the one below because
+                        * otherwise we get variable trailing context, so
+                        * we can't build the scanner using -{f,F}
+                        */
+                       bracelevel = 0;
+                       continued_action = false;
+                       BEGIN(ACTION);
+                       return ( '\n' );
+                       }
+
 <SECT2>{OPTWS}/\n      {
                        bracelevel = 0;
                        continued_action = false;