| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a regression due to a March 2016 commit which
introduced the ability for :vars in an output-side @(repeat)
block to have initial values.
The bug has the effect that all arguments in @(repeat)
which are conses/lists get duplicated, which messes up
the property list structure.
* parser.y (expand_repeat_rep_args): Do not unconditionally
add reg to the output at the bottom of the loop. A few
cases above in the consp(arg) case handle that themselves, and
do not continue the loop, so control ends up at the bottom,
adding a spurious item. By removing this list_collect,
we have to introduce it to just one case which relies on it.
* tests/008/repeat.txr,
* tests/008/repeat.expected: New files.
* y.tab.c.shipped: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.y (elem): When the elem is a list, if it starts with mdo, then
we evaluate it immediately and substitute (do) as the semantic
value. We no longer not allow mdo to precipitate into
match_expand_elem, where expand_meta will be unleashed on it.
Doing so causes the bug that expessions like @1, denoting
the form (sys:var 1), are rewritten to (sys:expr 1), which op
syntax. So two bugs are fixed: the incorrect treatment of
meta-syntax, and the neglect to perform mdo in nested
contexts.
(check_parse_time_action): We need not handle mdo here any
more; it will never make it into this function.
Only actions done in the main clause list belong here,
not parse time actions done at any nesting level.
* tests/008/mdo.txr: New file.
* y.tab.c.shipped: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makefile (%.expected): New implicit rule. Whenever a test requires a
.expected file, if it is missing, we create an empty one.
This file will be treated as an intermediate by GNU Make, which means
that it will be deleted when make terminates.
* tests/012/compile.tl: Some of the .tl files no longer have
an .expected file, so we have to test for that in the
catenating logic.
* tests/008/call-2.expected,
* tests/008/no-stdin-hang.expected,
* tests/011/macros-3.expected,
* tests/011/patmatch.expected,
* tests/012/aseq.expected,
* tests/012/ashwin.expected,
* tests/012/compile.tl,
* tests/012/cont.expected,
* tests/012/defset.expected,
* tests/012/ifa.expected,
* tests/012/oop-seq.expected,
* tests/012/parse.expected,
* tests/012/quasi.expected,
* tests/012/quine.expected,
* tests/012/seq.expected,
* tests/012/struct.expected,
* tests/012/stslot.expected,
* tests/014/dgram-stream.expected,
* tests/014/in6addr-str.expected,
* tests/014/inaddr-str.expected,
* tests/014/socket-basic.expected,
* tests/015/awk-fconv.expected,
* tests/015/split.expected,
* tests/015/trim.expected,
* tests/016/arith.expected,
* tests/016/ud-arith.expected,
* tests/017/ffi-misc.expected,
* tests/018/chmod.expected: Empty file deleted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The @(call) directive is buggy in the following ways, which
cause an indirect call to behave differently from a direct call.
It creates a new context, and so if the opening of a data
source is deferred into the indirectly called function, that
data source is lost when the indirect call terminates.
Furthermore, if a data source is already established, there
is no progress through the data: two consecutive @(call ...)
directives operate on the same data.
It also fails to implement vertical to horizontal fallback; if
a function is not vertically defined, the directive fails.
* match.c (v_call): Rewrite the core logic in the following
way: we rewrite the indirect @(call) syntax into direct call
syntax, substitute that into c->spec, and then just
call v_fun.
* tests/008/call-2.expected: New file.
* tests/008/call-2.txr: New file. Test fails before this commit
because both calls are matching against the same "A" element
of the list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch causes TXR to treat calls to verticatl functions,
as well as the @(call) directive to be considered non-matching
directives, so that opening the data source is deferred.
This allows included .txr files to call the funtions that they
define, without the side effect of standard input being read.
* match.c (open_data_source): Function refactored to reduce
duplication. c->data is checked first, and if it is not t,
nothing is done, making the function cheaper in the frequent
case. The non_matching_dir condition changes. We now check
that the first element of the first spec is a non-nil symbol.
If it has a function binding as a vertical function, then
that is considered non_matching.
(dir_tables_init): Treat @(call) as a non-matching directive.
* Makefile (tst/tests/008/no-stdin-hang.ok): Add -n argument
for non-interactive, which will cause stdin to be read in
that test case if there is a regression in this change. If
make tests is run in a terminal, this will hang make tests.
* tests/no-stdin-hang.txr: New file.
* tests/no-stdin-hang.expected: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (v_call): This function must propagate the
next_spec_k return value, rather than return a
short-circuiting match object, which causes the parent
to immediately succeed.
* tests/008/call.txr: New test case, from Frank Schwidom.
* tests/008/call.expected: Likewise.
|
|
|
|
|
|
|
|
|
| |
* tests/008/filtenv.txr (f): Don't just copy the input
to the output but transform it by upcase-str. Otherwise
the test will pass even if the :filter syntax is not
processed at all!
* tests/08/filtenv.expected: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
represent empty optional output clauses, distinguishing them from
missing clauses. This creates an ambiguity, so that an @(output)
block which puts out a single empty line is treated as empty.
Present but empty clauses are now represented by t.
* match.c (do_output_line): Check for t and bail.
(do_output): Check for t instead of (nil) and bail.
* parser.y (o_elems_opt2): Nonterminal deleted.
(out_clauses_opt): Empty case generates nil.
(req_parts_opt): o_elems_opt2 replaced by o_elems_opt.
(repeat_rep_helper): Function now keeps track of which
clauses were specified. For those that were specified, but
empty, it substitutes t.
* tests/008/empty-clauses.expected: New file.
* tests/008/empty-clauses.txr: New file.
|
|
|
|
| |
* tests/008/filtenv.txr: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.h (getplist_f): Declared.
* match.c (v_collect, h_coll): Use getplist_f to distinguish
the case that :vars is explicitly specified as (). In this
case, no bindings escape from the collect.
* tests/008/soundex.txr: This test case broke due to using
:vars () and yet counting on the variable to exist.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
| |
(TXR_ARGS): Specified for new test case.
* tests/008/soundex.expected: New file.
* tests/008/soundex.txr: New file.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Makefile: Defined TXR_ARGS for new test case.
* tests/008/students.expected: New file.
* tests/008/students.txr: New file.
* tests/008/students.xml: New file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile: Made previous TXR_ARGS for 008 specific
to tokenizing test case, and introduced separate TXR_ARGS
for this test case.
* tests/008/configfile: New file.
* tests/008/configfile.expected: New file.
* tests/008/configfile.txr: New file.
|
|
and horizontal @(choose :shortest ...).
* Makefile: Defined TXR_ARGS for tests/008 directory.
* tests/008/data: New file.
* tests/008/tokenize.expected: New file.
* tests/008/tokenize.txr: New file.
|