blob: 55d6b80cccc5ed9b60ebdb52902d00de2b6bf638 [file] [log] [blame]
/*
* This file was generated by the mksyntax program.
*/
/* Syntax classes */
#define CWORD 0 /* character is nothing special */
#define CNL 1 /* newline character */
#define CBACK 2 /* a backslash character */
#define CSQUOTE 3 /* single quote */
#define CDQUOTE 4 /* double quote */
#define CENDQUOTE 5 /* a terminating quote */
#define CBQUOTE 6 /* backwards single quote */
#define CVAR 7 /* a dollar sign */
#define CENDVAR 8 /* a '}' character */
#define CEOF 9 /* end of file */
#define CCTL 10 /* like CWORD, except it must be escaped */
#define CSPCL 11 /* these terminate a word */
/* 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 */
#ifdef __CHAR_UNSIGNED__
#define SYNBASE 1
#define PEOF -1
#else
#define SYNBASE 129
#define PEOF -129
#endif
#define BASESYNTAX (basesyntax + SYNBASE)
#define DQSYNTAX (dqsyntax + SYNBASE)
#define SQSYNTAX (sqsyntax + SYNBASE)
#define is_digit(c) ((unsigned char)((c) - '0') <= 9)
#define is_alpha(c) ((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER))
#define is_name(c) ((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER|ISUNDER))
#define is_in_name(c) ((is_type+SYNBASE)[c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))
#define is_special(c) ((is_type+SYNBASE)[c] & (ISSPECL|ISDIGIT))
#define digit_val(c) ((c) - '0')
extern const char basesyntax[];
extern const char dqsyntax[];
extern const char sqsyntax[];
extern const char is_type[];