case clitlit:
error_if_patt_wanted(wanted, "``literal-literal'' in pattern");
+ break;
default: /* the others only occur in pragmas */
hsperror("not a valid literal pattern or expression");
case llist:
case tuple:
case negate:
+ case record:
expORpat(LEGIT_PATT, e);
return TRUE;
case ap:
{
tree f = function(e);
- tree a = garg(e); /* do not "unparen", otherwise the error
- fromInteger ((x,y) {-no comma-} z)
- will be missed.
- */
- /* definitions must have pattern arguments */
+/* These lines appear to duplicate what's in function(e).
+ Nuked SLPJ May 97
+
+ tree a = garg(e); -- do not "unparen", otherwise the error
+ -- fromInteger ((x,y) {-no comma-} z)
+ -- will be missed.
+
+ -- definitions must have pattern arguments
expORpat(LEGIT_PATT, a);
+*/
if(ttree(f) == ident)
return(isconstr(qid_to_string(gident(f))));
return(lhs_is_patt(f));
else
- hsperror("Not a legal pattern binding in LHS");
+ hsperror("Syntax error: not a legal pattern binding in LHS");
}
case infixap:
/* Anything else must be an illegal LHS */
default:
- hsperror("Not a valid LHS");
+ hsperror("Syntax error: not a valid LHS");
}
abort(); /* should never get here */
/*
- Return the function at the root of a series of applications.
+ Return the function at the root of a series of applications,
+ checking on the way that the arguments are patterns.
*/
tree