summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-08-28 19:24:35 +0000
committerjoerg <joerg@FreeBSD.org>1995-08-28 19:24:35 +0000
commit4ff02b02ed01fbee755ad017d9734cf8d2aa8682 (patch)
tree7b189b422ceca7e7c28ee8de381ab304ba124698 /bin/sh/parser.c
parent059d76f5fe8434a52567b960d631d3e6759e7665 (diff)
downloadFreeBSD-src-4ff02b02ed01fbee755ad017d9734cf8d2aa8682.zip
FreeBSD-src-4ff02b02ed01fbee755ad017d9734cf8d2aa8682.tar.gz
Sigh. This will become a never ending story. :-(
When comparing my recent parser change against the ash in 1.1.5.1, i found that a couple of other problems in the same area has been fixed there, but not in 2.2. Semicolons and EOF do also delimit words...
Diffstat (limited to 'bin/sh/parser.c')
-rw-r--r--bin/sh/parser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index 83830ec..067faa7 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: parser.c,v 1.7 1995/08/11 08:18:39 joerg Exp $
+ * $Id: parser.c,v 1.8 1995/08/27 20:26:42 joerg Exp $
*/
#ifndef lint
@@ -445,6 +445,9 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
case TAND:
case TOR:
case TNL:
+ case TSEMI:
+ /* Handle EOF as an empty command, too */
+ case TEOF:
case TWORD:
tokpushback++;
return simplecmd(rpp, redir);
OpenPOWER on IntegriCloud