#include <sys/cdefs.h>
#include <limits.h>
#define CWORD 0
#define CNL 1
#define CQNL 2
#define CBACK 3
#define CSBACK 4
#define CSQUOTE 5
#define CDQUOTE 6
#define CENDQUOTE 7
#define CBQUOTE 8
#define CVAR 9
#define CENDVAR 10
#define CLP 11
#define CRP 12
#define CEOF 13
#define CCTL 14
#define CSPCL 15
#define CIGN 16
#define ISDIGIT 01
#define ISUPPER 02
#define ISLOWER 04
#define ISUNDER 010
#define ISSPECL 020
#define SYNBASE (1 - CHAR_MIN)
#define PEOF -SYNBASE
#define BASESYNTAX (basesyntax + SYNBASE)
#define DQSYNTAX (dqsyntax + SYNBASE)
#define SQSYNTAX (sqsyntax + SYNBASE)
#define ARISYNTAX (arisyntax + SYNBASE)
#define is_digit(c) ((unsigned int)((c) - '0') <= 9)
#define is_eof(c) ((c) == PEOF)
#define is_alpha(c) ((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))
#define is_name(c) ((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))
#define is_in_name(c) ((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))
#define is_special(c) ((is_type+SYNBASE)[(int)c] & (ISSPECL|ISDIGIT))
#define digit_val(c) ((c) - '0')
extern const char basesyntax[];
extern const char dqsyntax[];
extern const char sqsyntax[];
extern const char arisyntax[];
extern const char is_type[];