From 873ac263c87739dd2afadf9679900df3d471582d Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Sat, 26 Sep 2009 14:49:20 -0400 Subject: [PATCH] tests: check that parse-gram.y's IELR and LALR are identical. * tests/atlocal.in (abs_top_srcdir): New shell variable. * tests/regression.at (parse-gram.y: LALR = IELR): New test group. (cherry picked from commit 43aabb70a95ecbd20c76797c53554641c3576db4) --- ChangeLog | 7 +++++++ tests/atlocal.in | 2 ++ tests/regression.at | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/ChangeLog b/ChangeLog index d52c41c9..add4c238 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-09-26 Joel E. Denny + + tests: check that parse-gram.y's IELR and LALR are identical. + * tests/atlocal.in (abs_top_srcdir): New shell variable. + * tests/regression.at (parse-gram.y: LALR = IELR): New test + group. + 2009-09-16 Akim Demaille doc: comment changes. diff --git a/tests/atlocal.in b/tests/atlocal.in index 91ba6742..2e463290 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -42,3 +42,5 @@ CONF_JAVA='@CONF_JAVA@' # We need egrep. : ${EGREP='@EGREP@'} + +abs_top_srcdir='@abs_top_srcdir@' diff --git a/tests/regression.at b/tests/regression.at index cb9cd9a4..b2fa98b7 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -1246,3 +1246,23 @@ AT_COMPILE([[input]]) AT_PARSER_CHECK([[./input]]) AT_CLEANUP + + + +## --------------------------- ## +## parse-gram.y: LALR = IELR. ## +## --------------------------- ## + +# If parse-gram.y's LALR and IELR parser tables ever begin to differ, we +# need to fix parse-gram.y or start using IELR. + +AT_SETUP([[parse-gram.y: LALR = IELR]]) + +# Avoid differences in synclines by telling bison that the output files +# have the same name. +cp $abs_top_srcdir/src/parse-gram.y input.y +AT_BISON_CHECK([[-o input.c -Dlr.type=lalr input.y && mv input.c lalr.c]]) +AT_BISON_CHECK([[-o input.c -Dlr.type=ielr input.y && mv input.c ielr.c]]) +AT_CHECK([[diff -u lalr.c ielr.c]]) + +AT_CLEANUP -- 2.45.2