Pristine Ack-5.5
[Ack-5.5.git] / lang / m2 / comp / chk_expr.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  *
5  * Author: Ceriel J.H. Jacobs
6  */
7
8 /* E X P R E S S I O N   C H E C K I N G */
9
10 /* $Id: chk_expr.h,v 1.11 1994/06/24 12:39:56 ceriel Exp $ */
11
12 extern int      (*ExprChkTable[])();    /* table of expression checking
13                                            functions, indexed by node class
14                                         */
15 extern int      (*DesigChkTable[])();   /* table of designator checking
16                                            functions, indexed by node class
17                                         */
18
19 #define ChkExpression(expp)     ((*ExprChkTable[(*expp)->nd_class])(expp,D_USED))
20 #define ChkDesig(expp, flags)   ((*DesigChkTable[(*expp)->nd_class])(expp,flags))
21
22 /* handle reference counts for sets */
23 #define inc_refcount(s)         (*((int *)(s) - 1) += 1)
24 #define dec_refcount(s)         (*((int *)(s) - 1) -= 1)
25 #define refcount(s)             (*((int *)(s) - 1))