X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/70b7c357476ed3525ddb5d2739e70690cfebb207..ab96bb245789d1c24a68d637d48ffab889be3152:/tests/named-refs.at diff --git a/tests/named-refs.at b/tests/named-refs.at index ec44e049..20578009 100644 --- a/tests/named-refs.at +++ b/tests/named-refs.at @@ -1,6 +1,6 @@ # Named references test. -*- Autotest -*- -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -188,7 +188,9 @@ AT_CLEANUP -####################################################################### +## ------------------------------------ ## +## Undefined and ambiguous references. ## +## ------------------------------------ ## AT_SETUP([Undefined and ambiguous references]) @@ -250,44 +252,47 @@ exp: ]]) AT_BISON_CHECK([-fcaret -o test.c test.y], 1, [], -[[test.y:50.51-60: error: invalid reference: '$lo9' +[[test.y:52.51-60: error: invalid reference: '$lo9' | exp[x] '+' { $$ = $x; } [l] exp[r] { $$ = $lo9 + $r; } ^^^^^^^^^^ -test.y:50.3-68: symbol not found in production: lo9 +test.y:52.3-68: symbol not found in production: lo9 | exp[x] '+' { $$ = $x; } [l] exp[r] { $$ = $lo9 + $r; } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -test.y:51.51-60: warning: misleading reference: '$exp' [-Wother] +test.y:53.51-60: warning: misleading reference: '$exp' [-Wother] | exp[x] '-' { $$ = $x; } [l] exp[r] { $$ = $exp - $r; } ^^^^^^^^^^ -test.y:42.1-3: refers to: $exp at $$ +test.y:44.1-3: refers to: $exp at $$ exp: ^^^ -test.y:51.7: possibly meant: $x, hiding $exp at $1 +test.y:53.7: possibly meant: $x, hiding $exp at $1 | exp[x] '-' { $$ = $x; } [l] exp[r] { $$ = $exp - $r; } ^ -test.y:51.41: possibly meant: $r, hiding $exp at $4 +test.y:53.41: possibly meant: $r, hiding $exp at $4 | exp[x] '-' { $$ = $x; } [l] exp[r] { $$ = $exp - $r; } ^ -test.y:52.51-52: error: $l of 'exp' has no declared type +test.y:54.51-52: error: $l of 'exp' has no declared type | exp[x] '*' { $$ = $x; } [l] exp[r] { $$ = $l * $r; } ^^ -test.y:55.40-43: error: invalid reference: '$r12' +test.y:57.40-43: error: invalid reference: '$r12' | exp[l] '^' exp[r] { $$ = power ($l, $r12); } ^^^^ -test.y:55.3-47: symbol not found in production: r12 +test.y:57.3-47: symbol not found in production: r12 | exp[l] '^' exp[r] { $$ = power ($l, $r12); } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -test.y:56.29-33: error: invalid reference: '$expo' +test.y:58.29-33: error: invalid reference: '$expo' | '(' exp ')' { $$ = $expo; } ^^^^^ -test.y:56.3-46: symbol not found in production: expo +test.y:58.3-46: symbol not found in production: expo | '(' exp ')' { $$ = $expo; } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ]]) AT_BISON_OPTION_POPDEFS AT_CLEANUP -####################################################################### + +## ----------------------- ## +## Misleading references. ## +## ----------------------- ## AT_SETUP([Misleading references]) AT_DATA_GRAMMAR([test.y],