1 /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
2 * For full copyright and restrictions on use see the file COPYING in the top
3 * level of the LLgen tree.
9 * An Extended LL(1) Parser Generator
11 * Author : Ceriel J.H. Jacobs
15 * $Id: sets.h,v 2.6 1995/07/31 09:17:07 ceriel Exp $
16 * Some macros that deal with bitsets and their size
19 # define BITS (8 * sizeof (int))
20 # define IN(a,i) ((a)[(i)/BITS] & (1<<((i) % BITS)))
21 # define NTIN(a,i) ((a)[(i)/BITS+tsetsize]&(1<<((i)%BITS)))
22 # define PUTIN(a,i) ((a)[(i)/BITS] |=(1<<((i) % BITS)))
23 # define NTPUTIN(a,i) ((a)[(i)/BITS+tsetsize]|=(1<<((i)%BITS)))
24 # define NBYTES(n) (((n) + 7) / 8)
26 * The next two macros operate on byte counts!
28 # define NINTS(n) (((n) + (int) (sizeof(int) - 1)) / (int) sizeof(int))
29 # define ALIGN(n) (NINTS(n) * (int) sizeof (int))
32 extern p_set *setptr, *maxptr;