diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1988-04-10 20:50:42 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1988-04-10 20:50:42 +0000 |
commit | 6ea7a979e1f07da057b4d104730ef91b38727829 (patch) | |
tree | 2d073bbd81e769b461207cd30f3bba43c9eddb87 /parse.y | |
parent | 282bcb1a3e4ea4c03d19e56a49068b5ae0b73fbc (diff) |
changed name from flexparse.y -> parse.y
added start condition "INITIAL"
made a{3} have "variable length"
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 ) { |