xref: /titanic_50/usr/src/cmd/sh/sym.h (revision 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6	*/
27 /*
28  *	UNIX shell
29  */
30 
31 
32 /* symbols for parsing */
33 #define DOSYM	0405
34 #define FISYM	0420
35 #define EFSYM	0422
36 #define ELSYM	0421
37 #define INSYM	0412
38 #define BRSYM	0406
39 #define KTSYM	0450
40 #define THSYM	0444
41 #define ODSYM	0441
42 #define ESSYM	0442
43 #define IFSYM	0436
44 #define FORSYM	0435
45 #define WHSYM	0433
46 #define UNSYM	0427
47 #define CASYM	0417
48 
49 #define SYMREP	04000
50 #define ECSYM	(SYMREP|';')
51 #define ANDFSYM	(SYMREP|'&')
52 #define ORFSYM	(SYMREP|'|')
53 #define APPSYM	(SYMREP|'>')
54 #define DOCSYM	(SYMREP|'<')
55 #define EOFSYM	02000
56 #define SYMFLG	0400
57 
58 /* arg to `cmd' */
59 #define NLFLG	1
60 #define MTFLG	2
61 
62 /* for peekc */
63 #define MARK	0x80000000
64 
65 /* odd chars */
66 #define DQUOTE	'"'
67 #define SQUOTE	'`'
68 #define LITERAL	'\''
69 #define DOLLAR	'$'
70 #define ESCAPE	'\\'
71 #define BRACE	'{'
72 #define COMCHAR '#'
73