| 1 | # |
| 2 | /* |
| 3 | * UNIX shell |
| 4 | */ |
| 5 | |
| 6 | |
| 7 | /* symbols for parsing */ |
| 8 | #define DOSYM 0405 |
| 9 | #define FISYM 0420 |
| 10 | #define EFSYM 0422 |
| 11 | #define ELSYM 0421 |
| 12 | #define INSYM 0412 |
| 13 | #define BRSYM 0406 |
| 14 | #define KTSYM 0450 |
| 15 | #define THSYM 0444 |
| 16 | #define ODSYM 0441 |
| 17 | #define ESSYM 0442 |
| 18 | #define IFSYM 0436 |
| 19 | #define FORSYM 0435 |
| 20 | #define WHSYM 0433 |
| 21 | #define UNSYM 0427 |
| 22 | #define CASYM 0417 |
| 23 | |
| 24 | #define SYMREP 04000 |
| 25 | #define ECSYM (SYMREP|';') |
| 26 | #define ANDFSYM (SYMREP|'&') |
| 27 | #define ORFSYM (SYMREP|'|') |
| 28 | #define APPSYM (SYMREP|'>') |
| 29 | #define DOCSYM (SYMREP|'<') |
| 30 | #define EOFSYM 02000 |
| 31 | #define SYMFLG 0400 |
| 32 | |
| 33 | /* arg to `cmd' */ |
| 34 | #define NLFLG 1 |
| 35 | #define MTFLG 2 |
| 36 | |
| 37 | /* for peekc */ |
| 38 | #define MARK 0100000 |
| 39 | |
| 40 | /* odd chars */ |
| 41 | #define DQUOTE '"' |
| 42 | #define SQUOTE '`' |
| 43 | #define LITERAL '\'' |
| 44 | #define DOLLAR '$' |
| 45 | #define ESCAPE '\\' |
| 46 | #define BRACE '{' |