From: Vern Paxson Date: Sun, 10 Apr 1988 20:50:42 +0000 (+0000) Subject: changed name from flexparse.y -> parse.y X-Git-Tag: flex-2-5-5b~650 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ea7a979e1f07da057b4d104730ef91b38727829;p=flex changed name from flexparse.y -> parse.y added start condition "INITIAL" made a{3} have "variable length" --- diff --git a/parse.y b/parse.y index f5094e5..e116407 100644 --- 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 ) {