| kexp
;
+/*
+ We need to factor out a leading let expression so we can set
+ inpat=TRUE when parsing (non let) expressions inside stmts and quals
+*/
expLno : oexpLno DCOLON ctype { $$ = mkrestr($1,$3); }
| oexpLno
;
| alts SEMI alt { $$ = lconc($1,$3); }
;
-alt : pat { PREVPATT = $1; } altrest { $$ = lsing($3); PREVPATT = NULL; }
+alt : pat { PREVPATT = $1; } altrest { expORpat(LEGIT_PATT,$1); $$ = lsing($3); PREVPATT = NULL; }
| /* empty */ { $$ = Lnil; }
;
* *
**********************************************************************/
+
+/*
+void
+checkinpat()
+{
+ if(!inpat)
+ hsperror("pattern syntax used in expression");
+}
+*/
+
/* The parser calls "hsperror" when it sees a
`report this and die' error. It sets the stage
and calls "yyerror".