Magic constant removal (id.h now has #defines for the `special-syntax'
identifiers.)
;
itycon : tycon { $$ = mknoqual($1); }
;
itycon : tycon { $$ = mknoqual($1); }
- | OBRACK CBRACK { $$ = creategid(-1); }
- | OPAREN CPAREN { $$ = creategid(0); }
+ | OBRACK CBRACK { $$ = creategid(NILGID); }
+ | OPAREN CPAREN { $$ = creategid(UNITGID); }
| OPAREN commas CPAREN { $$ = creategid($2); }
;
| OPAREN commas CPAREN { $$ = creategid($2); }
;
- | OPAREN RARROW CPAREN { $$ = creategid(-2); }
- | OBRACK CBRACK { $$ = creategid(-1); }
- | OPAREN CPAREN { $$ = creategid(0); }
+ | OPAREN RARROW CPAREN { $$ = creategid(ARROWGID); }
+ | OBRACK CBRACK { $$ = creategid(NILGID); }
+ | OPAREN CPAREN { $$ = creategid(UNITGID); }
| OPAREN commas CPAREN { $$ = creategid($2); }
;
| OPAREN commas CPAREN { $$ = creategid($2); }
;
- | OBRACK CBRACK { $$ = creategid(-1); }
- | OPAREN CPAREN { $$ = creategid(0); }
+ | OBRACK CBRACK { $$ = creategid(NILGID); }
+ | OPAREN CPAREN { $$ = creategid(UNITGID); }
| OPAREN commas CPAREN { $$ = creategid($2); }
;
gconk : qconk
| OPAREN commas CPAREN { $$ = creategid($2); }
;
gconk : qconk
- | obrackkey CBRACK { $$ = creategid(-1); }
- | oparenkey CPAREN { $$ = creategid(0); }
+ | obrackkey CBRACK { $$ = creategid(NILGID); }
+ | oparenkey CPAREN { $$ = creategid(UNITGID); }
| oparenkey commas CPAREN { $$ = creategid($2); }
;
| oparenkey commas CPAREN { $$ = creategid($2); }
;
look at qid.ugn) with a key (number) and a string. Here's the
deal
look at qid.ugn) with a key (number) and a string. Here's the
deal
- key
- -2 function arrow ->
- -1 list type constructor [], or the empty list []
- 0 unit type constructor (), or the unity value ()
- n n-tuple type constructor (,,,)
+ key
+
+ ARROWCON function arrow ->
+ LISTCON list type constructor [], or the empty list []
+ UNITCON unit type constructor (), or the unity value ()
+ n n-tuple type constructor (,,,)
return(mkgid(i,install_literal("->")));
return(mkgid(i,install_literal("->")));
return(mkgid(i,install_literal("[]")));
return(mkgid(i,install_literal("[]")));
return(mkgid(i,install_literal("()")));
default:
{
return(mkgid(i,install_literal("()")));
default:
{
long get_hstring_len PROTO((hstring));
char *get_hstring_bytes PROTO((hstring));
long get_hstring_len PROTO((hstring));
char *get_hstring_bytes PROTO((hstring));
+id installid PROTO((char *)); /* Create a new identifier */
+hstring installHstring PROTO((int, char *)); /* Create a new literal string */
+
+/* defines for special-syntax ids, see comment next
+ to creategid()
+*/
+#define ARROWGID (-2)
+#define NILGID (-1)
+#define UNITGID (0)
+
+