X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d46c3fc6945b2a4f2df28a7535c79acd88850eb5..85ac3861e7c7de8877562ac0dbb1233d91c705c2:/tests/input.at diff --git a/tests/input.at b/tests/input.at index 20459d2f..dada81af 100644 --- a/tests/input.at +++ b/tests/input.at @@ -13,8 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. AT_BANNER([[Input Processing.]]) @@ -132,7 +132,7 @@ AT_SETUP([Torturing the Scanner]) AT_DATA([input.y], []) AT_CHECK([bison input.y], [1], [], -[[input.y:1.1: syntax error, unexpected "end of file" +[[input.y:1.1: syntax error, unexpected end of file ]]) @@ -272,3 +272,28 @@ AT_PARSER_CHECK([./input], 0, ]]) AT_CLEANUP + + +## ---------------------- ## +## Typed symbol aliases. ## +## ---------------------- ## + +AT_SETUP([Typed symbol aliases]) + +# Bison 2.0 broke typed symbol aliases - ensure they work. + +AT_DATA_GRAMMAR([input.y], +[[%union +{ + int val; +}; +%token MY_TOKEN "MY TOKEN" +%type exp +%% +exp: "MY TOKEN"; +%% +]]) + +AT_CHECK([bison -o input.c input.y]) + +AT_CLEANUP