summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1988-04-10 20:50:42 +0000
committerVern Paxson <vern@ee.lbl.gov>1988-04-10 20:50:42 +0000
commit6ea7a979e1f07da057b4d104730ef91b38727829 (patch)
tree2d073bbd81e769b461207cd30f3bba43c9eddb87 /parse.y
parent282bcb1a3e4ea4c03d19e56a49068b5ae0b73fbc (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.y10
1 files changed, 7 insertions, 3 deletions
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 )
{