From: Eric S. Raymond Date: Tue, 30 Jul 2002 19:35:57 +0000 (+0000) Subject: Grammar corrections. X-Git-Tag: 1-4~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=c383b0148559f55369819ab7789e7003342ebbcb;p=cupl.git Grammar corrections. --- diff --git a/cupl.y b/cupl.y index 9c81c2c..4b999ee 100644 --- a/cupl.y +++ b/cupl.y @@ -93,6 +93,7 @@ int yydebug; /* a program description consists of a sequence of statements */ program : prog {interpret($1);} + ; prog : command prog { @@ -161,6 +162,7 @@ iter : TO expr BY expr {$$ = cons(TO, $2, $4);} triple : '(' expr ',' expr ',' expr ')' {$$ = cons(TRIPLE, $2, cons(ITERATE, $4, $6));} + ; expl : expr ',' expl {$$ = cons(FORLIST, $1, $3);} | triple ',' expl {$$ = cons(FORLIST, $1, $3);}