xref: /titanic_50/usr/src/lib/libshell/common/data/keywords.c (revision df14233e629298598736976c5bfcf4a31873745f)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *           Copyright (c) 1982-2007 AT&T Knowledge Ventures            *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                      by AT&T Knowledge Ventures                      *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                  David Korn <dgk@research.att.com>                   *
18 *                                                                      *
19 ***********************************************************************/
20 #pragma prototyped
21 #include	"shtable.h"
22 #include	<shell.h>
23 #include	"shlex.h"
24 #include	"FEATURE/options"
25 
26 /*
27  * table of reserved words in shell language
28  * This list must be in in ascii sorted order
29  */
30 
31 const Shtable_t shtab_reserved[] =
32 {
33 		"!",		NOTSYM,
34 		"[[",		BTESTSYM,
35 		"case",		CASESYM,
36 		"do",		DOSYM,
37 		"done",		DONESYM,
38 		"elif",		ELIFSYM,
39 		"else",		ELSESYM,
40 		"esac",		ESACSYM,
41 		"fi",		FISYM,
42 		"for",		FORSYM,
43 		"function",	FUNCTSYM,
44 		"if",		IFSYM,
45 		"in",		INSYM,
46 #if SHOPT_NAMESPACE
47 		"namespace",	NSPACESYM,
48 #endif /* SHOPT_NAMESPACE */
49 		"select",	SELECTSYM,
50 		"then",		THENSYM,
51 		"time",		TIMESYM,
52 		"until",	UNTILSYM,
53 		"while",	WHILESYM,
54 		"{",		LBRACE,
55 		"}",		RBRACE,
56 		"",		0,
57 };
58 
59 const char	e_unexpected[]	= "unexpected";
60 const char	e_unmatched[]	= "unmatched";
61 const char	e_endoffile[]	= "end of file";
62 const char	e_newline[]	= "newline";
63 
64