* *
**********************************************************************/
-BOOLEAN expect_ccurly = FALSE; /* Used to signal that a CCURLY could be inserted here */
+static BOOLEAN expect_ccurly = FALSE; /* Used to signal that a CCURLY could be inserted here */
extern BOOLEAN nonstandardFlag;
extern BOOLEAN etags;
* *
**********************************************************************/
-list fixlist;
+/* OLD 95/08: list fixlist; */
static int Fixity = 0, Precedence = 0;
struct infix;
interface:
INTERFACE modid
- { fixlist = Lnil;
+ { /* OLD 95/08: fixlist = Lnil; */
strcpy(iface_name, id_to_string($2));
}
WHERE ibody
/* SCC Expression */
| SCC STRING exp
- { extern BOOLEAN ignoreSCC;
- extern BOOLEAN warnSCC;
-
- if (ignoreSCC) {
+ { if (ignoreSCC) {
if (warnSCC)
fprintf(stderr,
"\"%s\", line %d: _scc_ (`set [profiling] cost centre') ignored\n",
the starting line for definitions.
*/
-/*TESTTEST
-bind : opatk
- | vark lampats
- { $$ = mkap($1,$2); }
- | opatk varop opat %prec PLUS
- {
- $$ = mkinfixop($2,$1,$3);
- }
- ;
-
-opatk : dpatk
- | opatk conop opat %prec PLUS
- {
- $$ = mkinfixop($2,$1,$3);
- precparse($$);
- }
- ;
-
-*/
-
opatk : dpatk
| opatk op opat %prec PLUS
{
;
-/*
- The mkpars are so that infix parsing doesn't get confused.
-
- KH.
-*/
-
tuple : OPAREN exp COMMA texps CPAREN
{ if (ttree($4) == tuple)
$$ = mktuple(mklcons($2, gtuplelist((struct Stuple *) $4)));
{ $$ = mktuple(Lnil); }
;
+/*
+ The mkpar is so that infix parsing doesn't get confused.
+
+ KH.
+*/
texps : exp { $$ = mkpar($1); }
| exp COMMA texps
{ if (ttree($3) == tuple)
;
qual : { inpat = TRUE; } exp { inpat = FALSE; } qualrest
- { if ($4 == NULL)
+ { if ($4 == NULL) {
+ patternOrExpr(/*wanted:*/ LEGIT_EXPR,$2);
$$ = mkguard($2);
- else
- {
- checkpatt($2);
+ } else {
+ patternOrExpr(/*wanted:*/ LEGIT_PATT,$2);
+ $$ = mkqual($2,$4);
+/* OLD: WDP 95/08
if(ttree($4)==def)
{
tree prevpatt_save = PREVPATT;
PREVPATT = prevpatt_save;
}
else
- $$ = mkqual($2,$4);
- }
+*/
+ }
}
;
yyerror(s);
}
+extern char *yytext;
+extern int yyleng;
+
void
yyerror(s)
char *s;
{
- extern char *yytext;
- extern int yyleng;
-
/* We want to be able to distinguish 'error'-raised yyerrors
from yyerrors explicitly coded by the parser hacker.
*/