root/bin/sh/pregenerated/syntax.h
/*
 * This file was generated by the mksyntax program.
 */

#include <sys/cdefs.h>
#include <limits.h>

/* Syntax classes */
#define CWORD 0                 /* character is nothing special */
#define CNL 1                   /* newline character */
#define CQNL 2                  /* newline character in quotes */
#define CBACK 3                 /* a backslash character */
#define CSBACK 4                /* a backslash character in single quotes */
#define CSQUOTE 5               /* single quote */
#define CDQUOTE 6               /* double quote */
#define CENDQUOTE 7             /* a terminating quote */
#define CBQUOTE 8               /* backwards single quote */
#define CVAR 9                  /* a dollar sign */
#define CENDVAR 10              /* a '}' character */
#define CLP 11                  /* a left paren in arithmetic */
#define CRP 12                  /* a right paren in arithmetic */
#define CEOF 13                 /* end of file */
#define CCTL 14                 /* like CWORD, except it must be escaped */
#define CSPCL 15                /* these terminate a word */
#define CIGN 16                 /* character should be ignored */

/* Syntax classes for is_ functions */
#define ISDIGIT 01              /* a digit */
#define ISUPPER 02              /* an upper case letter */
#define ISLOWER 04              /* a lower case letter */
#define ISUNDER 010             /* an underscore */
#define ISSPECL 020             /* the name of a special parameter */

#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[];