| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This is used for reporting the current match location in debug traces.
* match.c (mf_all): Takes new argument curfiles
and initializes the match_files_ctx member of the same name.
(do_match_line, mf_from_ml, match_filter, match_fun, extract):
Pass curfile to ml_all.
|
|
|
|
|
|
| |
* added, and also add the missing rep to these.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
propagate bindings. The culprit? The bindings_coll variable in the
v_collect function being indeterminate by the well-documented and
understood action of setjmp. Marking the bindings_coll variable
volatile instantly fixed it. I reviewed this code to find any other
instance of this oversight.
* match.c (v_skip, v_collect): Mark some local variable volatile:
precisely those which are used after possibly returning via an
unwind, and which might have been modified since setting up
the unwind block.
|
|
|
|
|
|
| |
and also ones with underscores.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
| |
(conftest.clean): New target.
* configure: Use "make conftest.clean" to clean up conftest stuff. Note
that there was a bug here: brace expansion was used, but the shell is
/bin/sh, so conftest.err wasn't being removed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
syntax appears in an op form, crashing the expander with infinite
recursion at program load time, before the code is run.
* eval.c (transform_op): The fi == var check to handle a
trailing op variable in the dot position of a form
needs to ensure that it really is @<num> type var, and
not the @<sym> type for instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the 022 release.
Efficient string literal objects (tag bits 11) were introduced on that
day.
The null_string object was changed to a literal, and that object is
efficiently returned by some string manipulation functions in cases
when it is obvious that the result is an empty string.
However, the LIT type code was not added to a switch statement in
the variable matching code, which continued to recognize only the
type STR as a string, to this day.
A test case for this is
echo ":x" | ./txr -c "@x:@x" -
which results in an "unsupported object in spec" error.
* match.c (h_var): Use stringp to test for string rather than
type(..) == STR. Add LIT and LSTR to the switch statement
so that literals an lazy strings are handled if they occur.
(do_output_line): Add LIT and LSTR to switch.
|
| |
|
|
|
|
|
|
| |
sources because actions aren't registered for them.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deviations from C90, like mixed declations and
statements. GCC doesn't diagnose these without the
--pedantic flag.
* configure: GCC's --ansi flag should be spelled -ansi.
* lib.c (split_str, obj_print): Reorder declaration before statements.
(make_sym): Fix similar problem by eliminating a statement.
(funcall1, funcall2, funcall3, funcall4): Use assignment to initialize
local array with non-constant elements. This is actually good for
performance because we only initialize those parts of the array that
we use.
* lib.h (struct func): Change functype member to unsigned,
since enum-typed bitfields are a GCC extension.
* match.c (ml_all, mf_all): Use assignments to initialize local
struct with non-constants.
(do_txeval, v_collect): Slightly revise unwinding macrology with help
of new macros to avoid mixing declarations and statements.
(spec_bind): Removed spurious semicolon from macro expansion.
(v_gather): Reorder two lines to avoid mixed decls and
statements.
(match_filter): Move declaration of ret a few lines up, ahead of
statements.
* unwind.c (uw_pop_until): New function.
* unwind.h (uw_pop_until): Declared.
(uw_mark_frame, uw_fast_return): New macros.
|
|
|
|
| |
* txr.vim: Updated.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
arguments is a right-associative reduction, not left.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output blocks across the same stream.
* match.c (close_s, named_k, continue_k, finish_k): New symbol
variables.
(v_output): Implement :named, :finish and :continue.
(v_close): New static function.
(syms_init): New symbols interned.
(dir_tables_init): New entry associating v_close
function with symbol stored in close_s.
* match.h (close_s): Declared.
* txr.1: New features documented.
|
|
|
|
| |
* and time-string-utc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly specifying @rest using (op ... . @rest)
did not work at all.
The then-func agument of iff and iffi may now be nil.
* eval.c (format_op_arg): New static function.
(transform_op): Handle dotted lists ending in @rest
or @<num>.
(supplement_op_syms): New static function.
(expand_op): Add missing numeric arguments,
so that all 1 through n are in the list.
Trailing rest is now added under different
conditions.
* lib.c (do_iff): Give thenfun the same
behavior on nil that elsefun enjoys.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
block, for specifying variables to include in iteration whose
presence repeat is not able to deduce.
* match.c (extract_bindings): New argument, vars, specifies
additional variables to consider.
(do_output_line, do_output): Process :vars argument of repeat
and rep directive.
* txr.1: Updated.
|
|
|
|
| |
used 4 space tabs and utf8.c used 8 space tabs, inconsistently.
|
| |
|
|
|
|
|
|
|
| |
txr.1: Documented line continuation for string literals,
supported since Version 38 but not clarified properly.
RELNOTES: Updated.
|
|
|
|
|
|
| |
literals and quasiliterals and after @\.
Support "\ " (backslash space) escape in string literals
and quasiliterals.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version, set date and documented string-cmp.
* configure (txr_ver): Bumped.
* eval.c (eval_init): Forgotten string-cmp registered as intrinsic.
* txr.vim: Highlighting for string-cmp.
* RELNOTES: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(v_require): New static function.
(syms_init): Initialize require_s.
(dir_tables_init): Add new entries into v_directive_table
and h_directive_table for new require directive.
* match.h (require_s): Declared.
* txr.1: Added do and require directives to the directive summary
section. Documented new require directive.
Fixed int-str documentation to clarify that the radix is
optional.
|
|
|
|
|
|
|
|
| |
* lib.c (tok_str): New parameter, keep_sep.
* lib.h (tok_str): Declaration updated.
* txr.1: Documentation for tok-str updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added lazy-stringp. Changing names of length-str-{gt,ge,lt,le}
to be consistent with the >, >=, < and <= functions.
* lib.c (lazy_stream_func): Greatly simplified implementation.
The lazy list now continues by means of recursing via
an optimized version of lazy_stream_cons called lazy_stream_cont.
The environment structure is simplified to just hold the next item,
rather than a pointless list. The pointless setting of lcons->lc.func
to nil is also removed; this is always done by the caller.
(lazy_stream_cont): New static function, similar to lazy_stream_cons,
but optimized by not consing up a new function and new environment
cell.
(lazy_stream_cons): The environment for the update function
is simplified to just a single cons.
* txr.1: Documented lazy string functions and lazy-stream-cons.
|
|
|
|
|
| |
orer to the top, and remove references to changes that
disappeared in the rebase.
|
|
|
|
|
|
|
| |
* lib.c (string_cmp): New function.
* lib.h (TYPE_SHIFT, TYPE_PAIR): New macros.
(string_cmp): Declared.
|
|
|
|
|
|
|
|
| |
* lib.c (tok_str): New function.
* lib.h (tok_str): Declared.
* txr.1: Documented.
|
|
|
|
| |
for split-str-set.
|
|
|
|
|
| |
takes a regex, not just a fixed string separator. Clarified
the corner case behaviors too.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
time-string-utc.
* lib.c (string_time): New static function.
(time_string_local, time_string_utc): New functions.
* lib.h (time_string_local, time_string_utc): Declared.
* txr.1: Documented.
* RELNOTES: Updated.
|
|
|
|
|
|
|
| |
prior to the call. The first data line number is 1, not zero,
if there is data.
* txr.1: Added usage example for match-fun.
|
|
|
|
| |
and *self-path*.
|
| |
|
|
|
|
|
|
| |
optional.
* txr.1: Documented random functions as well as range and range*
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Expose delete-package, rehome-sym
and packagep.
* lib.c (make_package, intern): use ~s formatting for package name in
error message.
(packagep, delete_package, rehome_sym): New functions.
* lib.h (packagep, delete_package, rehome_sym): Declared.
* txr.1: Documented process functions and packages.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (iff): Reversed argument names corrected. No functional
change.
(iffi): New function.
* lib.h (iffi): Declared.
* txr.1: Documented iffi.
|
|
|
|
|
| |
(debug): Fix conflicting command assignment.
Show form is now 'o'.
|
|
|
|
|
| |
which could have been caught by running the regression test suite.
The revised function was returning small integers as bignums.
|
|\
| |
| |
| |
| | |
Conflicts:
ChangeLog
|