summaryrefslogtreecommitdiffstats
path: root/tests/001/query-2.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-13 08:41:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-10-13 08:41:56 -0700
commit35eb4dbc80f857007f99278c48e22f8557e13b68 (patch)
tree615cedd436b39374d7160433734f91f53f735aa6 /tests/001/query-2.txr
parent6e23d00099312495addb7639d7062aab71a9cbfe (diff)
downloadtxr-35eb4dbc80f857007f99278c48e22f8557e13b68.tar.gz
txr-35eb4dbc80f857007f99278c48e22f8557e13b68.tar.bz2
txr-35eb4dbc80f857007f99278c48e22f8557e13b68.zip
* 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.
Diffstat (limited to 'tests/001/query-2.txr')
-rw-r--r--tests/001/query-2.txr2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/001/query-2.txr b/tests/001/query-2.txr
index c040ca9f..3682284d 100644
--- a/tests/001/query-2.txr
+++ b/tests/001/query-2.txr
@@ -3,5 +3,5 @@
@# It was authored by Kaz Kylheku <kkylheku@gmail.com> in 2009
@#
@(collect)
-@{UID 8} @{PID 5} @{PPID 5} @{C 1} @{STIME 5} @{TTY 8} @{TIME 8} @CMD
+@{UID 8}@\ @{PID 5}@\ @{PPID 5}@\ @\ @{C 1}@\ @{STIME 5}@\ @{TTY 8}@\ @{TIME 8}@\ @CMD
@(end)