diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2000-10-26 23:10:21 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2000-10-26 23:10:21 +0000 |
| commit | fb2525abf5ff0effea48c354486342164139efb9 (patch) | |
| tree | 8d781cb650ec733c1a775ad9a6b1706bd785dbee /bin/expr/expr.y | |
| parent | 1ee75cc4e0e10824628a7543f87f4d3c832a5792 (diff) | |
fix operator precedence - | or & have lower priority than
arithmetic operations, compare, or :
This should fix bin/11318 by Love <lha@stacken.kth.se>
Diffstat (limited to 'bin/expr/expr.y')
| -rw-r--r-- | bin/expr/expr.y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/expr/expr.y b/bin/expr/expr.y index cb45429e72b..e160b8d6817 100644 --- a/bin/expr/expr.y +++ b/bin/expr/expr.y @@ -1,4 +1,4 @@ -/* $NetBSD: expr.y,v 1.19 2000/09/29 17:49:21 jdolecek Exp $ */ +/* $NetBSD: expr.y,v 1.20 2000/10/26 23:10:21 jdolecek Exp $ */ /*_ * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ %{ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: expr.y,v 1.19 2000/09/29 17:49:21 jdolecek Exp $"); +__RCSID("$NetBSD: expr.y,v 1.20 2000/10/26 23:10:21 jdolecek Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -63,7 +63,9 @@ static int yyparse(void); #define YYSTYPE const char * %} -%left COMPARE ARITH_OPERATOR STRING SPEC_OR SPEC_AND SPEC_REG +%token STRING +%left SPEC_OR SPEC_AND +%left COMPARE ARITH_OPERATOR SPEC_REG %left LEFT_PARENT RIGHT_PARENT %% |
