From 35eb4dbc80f857007f99278c48e22f8557e13b68 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 13 Oct 2011 08:41:56 -0700 Subject: * Makefile (%.ok: %.txr): Use unified diff for showing differences between expected and actual test output. * parser.l (yybadtoken): Handle new terminal symbol, SPACE. New rule for producing SPACE token out of an extent of tabs and spaces. * parser.y (SPACE): New terminal symbol. (o_var): New nonterminal. I noticed that the var rule was being used for output elements, and the var rule refers to elem rather than o_elem. A new o_var rule is a simplified duplicate of var. (elem): Handle SPACE token. Transform to regex if it is a single space, otherwise to literal text. (o_elem): Handle SPACE token in output. * tests/001/query-2.txr: This query depends on matching single spaces and so needs to use escapes. * tests/001/query-4.txr, test/001/query-4.expected: New test case, based on query-2.txr. It produces the same output, but is simpler thanks to the new semantics of space. * txr.1: Documented. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c18fc9ec..fa62e9fb 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ tests/002/%: TXR_SCRIPT_ON_CMDLINE := y $(PROG) $(TXR_DBG_OPTS) $(TXR_OPTS) -c "$$(cat $^)" \ $(TXR_ARGS) > $(@:.ok=.out),\ $(PROG) $(TXR_DBG_OPTS) $(TXR_OPTS) $^ $(TXR_ARGS) > $(@:.ok=.out)) - diff $(^:.txr=.expected) $(@:.ok=.out) + diff -u $(^:.txr=.expected) $(@:.ok=.out) %.expected: %.txr $(PROG) $(TXR_OPTS) $^ $(TXR_ARGS) > $@ -- cgit v1.2.3