summaryrefslogtreecommitdiff
path: root/tests/java.at
diff options
context:
space:
mode:
authorValentin Tolmer <nitnelave1@gmail.com>2013-01-29 16:27:04 +0100
committerAkim Demaille <akim@lrde.epita.fr>2013-01-30 10:18:39 +0100
commite8f7155d98c22579c871c293a0daa5f7752e7c2b (patch)
tree62ab3c50c996c46ee810d0739233dd5b640aceb8 /tests/java.at
parent284bc49c832ffe6280907cb6c7788fa06bc58c7c (diff)
downloadbison-e8f7155d98c22579c871c293a0daa5f7752e7c2b.tar.gz
grammar: record used associativity and print useless ones
Record which symbol associativity is used, and display useless ones. * src/symtab.h, src/symtab.c (register_assoc, print_assoc_warnings): New * src/symtab.c (init_assoc, is_assoc_used): New * src/main.c: Use print_assoc_warnings * src/conflicts.c: Use register_assoc * tests/conflicts.at (Useless associativity warning): New. Due to the new warning, many tests had to be updated. * tests/conflicts.at tests/existing.at tests/regression.at: Add the associativity warning in the expected results. * tests/java.at: Fix the java calculator's grammar to remove a useless associativity. * doc/bison.texi (mfcalc example): Fix associativity to remove warning.
Diffstat (limited to 'tests/java.at')
-rw-r--r--tests/java.at6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/java.at b/tests/java.at
index 1fff3628..c5aae2f5 100644
--- a/tests/java.at
+++ b/tests/java.at
@@ -54,11 +54,11 @@ AT_DATA([Calc.y],
%token <Integer> NUM "number"
%type <Integer> exp
-%nonassoc '=' /* comparison */
+%nonassoc '=' /* comparison */
%left '-' '+'
%left '*' '/'
-%left NEG /* negation--unary minus */
-%right '^' /* exponentiation */
+%precedence NEG /* negation--unary minus */
+%right '^' /* exponentiation */
/* Grammar follows */
%%