diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 21:04:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 21:04:53 +0000 |
commit | b228348292c4361c750ae05a5597a15e71c5c5da (patch) | |
tree | e7527881cd44cefdbbcd11ec8332b581e2e4f8ec /bin/ksh/syn.c | |
parent | 55e483bc0655baec919e26c2dfcdda314a467a32 (diff) |
Get rid of #ifdef KSH since we don't care about building a V7 style sh and
the #ifdef KSH code is required to make a POSIX sh. From Matthias Kilian
Diffstat (limited to 'bin/ksh/syn.c')
-rw-r--r-- | bin/ksh/syn.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/bin/ksh/syn.c b/bin/ksh/syn.c index 607484ecdff..1896d5611dd 100644 --- a/bin/ksh/syn.c +++ b/bin/ksh/syn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syn.c,v 1.15 2004/12/18 20:55:52 millert Exp $ */ +/* $OpenBSD: syn.c,v 1.16 2004/12/18 21:04:52 millert Exp $ */ /* * shell parser (C version) @@ -36,13 +36,11 @@ static void nesting_push(struct nesting_state *save, int tok); static void nesting_pop(struct nesting_state *saved); static int assign_command(char *s); static int inalias(struct source *s); -#ifdef KSH static int dbtestp_isa(Test_env *te, Test_meta meta); static const char *dbtestp_getopnd(Test_env *te, Test_op op, int do_eval); static int dbtestp_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2, int do_eval); static void dbtestp_error(Test_env *te, int offset, const char *msg); -#endif /* KSH */ static struct op *outtree; /* yyparse output */ @@ -288,7 +286,6 @@ get_command(cf) t = nested(TBRACE, '{', '}'); break; -#ifdef KSH case MDPAREN: { static const char let_cmd[] = { CHAR, 'l', CHAR, 'e', @@ -302,9 +299,7 @@ get_command(cf) XPput(args, yylval.cp); break; } -#endif /* KSH */ -#ifdef KSH case DBRACKET: /* [[ .. ]] */ /* Leave KEYWORD in syniocf (allow if [[ -n 1 ]] then ...) */ t = newtp(TDBRACKET); @@ -322,7 +317,6 @@ get_command(cf) test_parse(&te); } break; -#endif /* KSH */ case FOR: case SELECT: @@ -649,9 +643,7 @@ const struct tokeninfo { { "case", CASE, TRUE }, { "esac", ESAC, TRUE }, { "for", FOR, TRUE }, -#ifdef KSH { "select", SELECT, TRUE }, -#endif /* KSH */ { "while", WHILE, TRUE }, { "until", UNTIL, TRUE }, { "do", DO, TRUE }, @@ -662,17 +654,13 @@ const struct tokeninfo { { "{", '{', TRUE }, { "}", '}', TRUE }, { "!", BANG, TRUE }, -#ifdef KSH { "[[", DBRACKET, TRUE }, -#endif /* KSH */ /* Lexical tokens (0[EOF], LWORD and REDIR handled specially) */ { "&&", LOGAND, FALSE }, { "||", LOGOR, FALSE }, { ";;", BREAK, FALSE }, -#ifdef KSH { "((", MDPAREN, FALSE }, { "|&", COPROC, FALSE }, -#endif /* KSH */ /* and some special cases... */ { "newline", '\n', FALSE }, { 0 } @@ -829,7 +817,6 @@ inalias(s) } -#ifdef KSH /* Order important - indexed by Test_meta values * Note that ||, &&, ( and ) can't appear in as unquoted strings * in normal shell input, so these can be interpreted unambiguously @@ -943,4 +930,3 @@ dbtestp_error(te, offset, msg) } syntaxerr(msg); } -#endif /* KSH */ |