]> granicus.if.org Git - flex/commitdiff
changed name from flexparse.y -> parse.y
authorVern Paxson <vern@ee.lbl.gov>
Sun, 10 Apr 1988 20:50:42 +0000 (20:50 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Sun, 10 Apr 1988 20:50:42 +0000 (20:50 +0000)
added start condition "INITIAL"
made a{3} have "variable length"

parse.y

diff --git a/parse.y b/parse.y
index f5094e556596d9a4c9cf3650c2874cd492497986..e11640733fe755423ccb51fab0b0651d9e002feb 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* flexparse.y - parser for flex input */
+/* parse.y - parser for flex input */
 
 /*
  * Copyright (c) 1987, the University of California
@@ -34,7 +34,7 @@ initlex         :
                        /* initialize for processing rules */
 
                        /* create default DFA start condition */
-                       scinstal( "0", false );
+                       scinstal( "INITIAL", false );
                        }
                ;
                        
@@ -291,7 +291,11 @@ singleton       :  singleton '*'
 
                |  singleton '{' NUMBER '}'
                        {
-                       rulelen = rulelen + $3;
+                       /* the singleton could be something like "(foo)",
+                        * in which case we have no idea what its length
+                        * is, so we punt here.
+                        */
+                       varlength = true;
 
                        if ( $3 <= 0 )
                            {