| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LICENSE: Reverted to Two-Clause BSD license. The
copyright of the Linenoise library are included, because
it uses exactly the same license. A note is added
about MPI being in the public domain.
* LICENSE-CYG: Revised text to clarify the situation that
Cygnal is only bundled with a particular Windows build of TXR.
* METALICENSE: Revised text. All references to modifications
to the BSD license are removed. Gives pointers to the MPI and linenoise
license files. Notes that linenoise is under the Two-Clause BSD also.
Makes a note about Cygnal and points to LICENSE-CYG.
* inst.nsi: Remove the text which tells the user that
use of the program requires agreement with the license;
refer only to redistribution. The "Agree" buttons are renamed
"Acknowledge".
* mpi/make-logtab, mpi/mpi.c, mpi/mpi.h, mpi/mplogic.c,
mpi/mplogic.h: Remove copyright notices and "all rights
reserved", since the author had placed this into the public
domain, as made explicit in the README file.
|
|
|
|
|
| |
* txr.1: search-regst added to heading of section which
describes it.
|
|
|
|
|
|
|
|
| |
* lib.c (generic_funcall): Add case for regexes.
Handle arguments in such a way that the string is always
rightmost, with a view to convenient partial application.
* txr.1: Documented in multiple places.
|
|
|
|
|
|
|
|
|
| |
* regex.c (regsub): Allow the second argument to be
a function, which is called with str as an argument,
and returns a range which indicates what part of
the string is to be replaced, or else nil.
* txr.1: Documented functional argument of regsub.
|
|
|
|
|
|
|
|
|
| |
* regex.c (match_regex, match_regex_right): Detect
a negative start or end position, respectively,
and add the string length to it. If it is still
negative, bail with nil.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Remove all regex-related function
registrations from here.
* regex.c (regex_init): Move regex-related function
registrations here.
|
|
|
|
|
|
| |
* share/txr/stdlib/place.tl (pset, push, pushnew): Use rlet
for binding the assigned or pushed value to a temporary,
so the temporary can disappear if the value is a constant.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is used in the awk macro. Breaking test case is
an update modification of f, like (push 3 f);
a broken call to sys:rslotset is generated with a
too few arguments.
* share/txr/stdlib/struct.tl (defplace sys:rslot): Fix name
clash between gensym and parameter. Add the meth-slot-sym
parameter into the sys:rslotset call where it is missing
as a required parameter.
|
|
|
|
|
| |
* txr.1: Adding remark that assignment to nonexistent
fields isn't permitted, unlike in Awk.
|
|
|
|
|
|
|
|
| |
* txr.1: fs and ft are described in one simplified
section. The default behavior when they are both nil
is described simply as token extraction, which is how
it is now implemented. Some verbiage is reduced
in the krs description.
|
|
|
|
|
|
|
|
|
| |
* share/txr/awk.tl (sys:awk-state rec-to-f): Check for empty
record only in the fs case; it's not necessary when tokenizing
with ft. Check (not self.kfs) first, since it's the common
case. Handle default case (no fs or ft) using tok-str
using the regex #/[^ \t\n]+/, which requires no trim-str
and no empty record check.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (build_set_entries, build_instantiate): New static
functions.
(dlt_register): Register dynamic loading of build.tl via
the two new functions.
* share/txr/stdlib/build.tl: New file.
* txr.1: Documented everything.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-let): Add new symbol
macro, fconv.
* share/txr/stdlib/conv.tl: New file.
* txr.1: Documented fconv.
|
|
|
|
| |
* txr.1: "require user id" -> "required user id".
|
|
|
|
|
|
|
| |
* txr.1: Document that on Windows, the home directory is
determined from USERPROFILE for finding the ~/.txr_history
file as well placing the temporary file for the
edit-in-editor interactive feature.
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (get_home): New static
function.
(edit_in_editor): Call get_home instead of
getenv("HOME").
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state): New slot, krs.
(sys:awk-state loop): Use record-adapter if krs is true,
even if the default fs is in effect. Pass value of krs to
record-adapter function.
(sys:awk-let): Provide krs "awk variable" symbol macro.
* txr.1: Documented krs. Clarified semantics of rs being
those of both separation and termination.
|
|
|
|
| |
* tests/015/split.tl: New cases added.
|
|
|
|
|
|
|
|
| |
* Makefile (TXR_DBG_OPTS): Disable for tst/tests/015.
* tests/common.tl (mtest): New macro.
* tests/015/split.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (tok_str): Only continue the loop if
the new position isn't past the end of the string.
This fixes the problem of recognizing an empty
token past the last character in the string.
Also, advance new_pos by one if there is a zero
length match. Then don't advance pos by one later
in that case. This fixes the bug that we collect
empty separator pieces *and* empty tokens,
and also prevents empty matches before the first
character of the string. Logic in tok_str is now very similar
to that in split_str_keep.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state): New slots, ft and
kfs.
(sys:awk-state rec-to-f): Implement ft and kfs semantics.
(sys:awk-let): Provide ft and kfs as "awk variable" via
symbol macros.
* txr.1: Documented ft and kfs.
|
|
|
|
|
| |
* txr.1: Improve some wording in the description
of the awk fs variable.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (split_str_keep): In the regex case, changing
to an infinite loop. The do/while is no longer needed because
the if statement includes a test of the position having
reached the end of the string. This is done before it is
incremented by len, so we avoid wrongly keeping a separator.
* txr.1: Clarified that an empty regex match
behaves like an sep which is an empty string,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register split-str to split_str_keep,
with optional argument.
* lib.c (split_str_keep): New function, formed from
split_str, with third argument.
(split_str): Reduced to wrapper around split_str_keep.
Thus we don't have to update umpteen existing calls
with an extra nil parameter.
* lib.h (split_str_keep): Declared.
* txr.1: Documented new optional argument of split-str.
|
|
|
|
| |
* regex.c (reg_optimize): Implement ~~R -> R reduction.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_while, me_until, me_while_star, me_until_star):
Functions removed.
(me_while_until, me_while_until_star): New functions.
Here we just check the form symbol and add the negation
to the test. Also: use of (zap flag) in the while* and until*
expansion has been replaced with (set flag nil), because
zap wastefully arranges to yield the prior value, which
is not used at all.
|
|
|
|
|
| |
eval.c (me_while_star, me_until_star): for loop test must be a
sequence of forms, not a single form.
|
|
|
|
|
|
|
|
| |
* regex.c (reg_optimize): Based on the reasoning in the
previous commit, we can also statically optimize a
complement whose argument is the t regex: match nothing.
We convert that to match everything: the .* regex.
Now (regex-compile "~[]") -> #/.*/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The form (match-regex "xy" #/~ab/) should return 2 (full
match) because "xy" is in the complement of the set { "ab" }.
It wrongly returns 1.
* regex.c (reg_derivative): Handle the case when
the derivative of the complement's constituent expression
yields nil. This means that the complemented regex matches
the input. In this case, the complement must lapse to the .+
regex: match one or more characters. That is to say, if the
input has at least one more character, there is a match, which
covers all such characters. Otherwise there is no match: the
input matches the complemented regex. In the t case, the
return value is also wrong. If the complemented regex hits
a brick wall (matches nothing, not even the empty string),
the correct complement is "match everything": the .* regex.
Not the match empty string regex!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (weave_while): Pass third arg to remq as nil.
(eval_init): Update registrations of remq, remql and
remqual.
* lib.c (remq, remql, remqual): Implement key function
argument.
* lib.h (remq, remql, remqual): Declarations updated.
* sysif.c (at_exit_call): Pass third arg to remq as nil.
* debug.c (debug): Pass third argument to remqual as nil.
* txr.1: Documentation updated.
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register keepq, keepql and keepqual
intrinsic functions.
* lib.c (keepq, keepql, keepqual): New functions.
* lib.h (keepq, keepql, keepqual): Declared.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (awk): Bind *stdout* only if
awc.output is not nil; i.e. :output has been specified
(with a non-nil argument).
* txr.1: Revised :output documentation.
|
|
|
|
|
|
|
|
| |
* lisplib.c (place_set_entries): Add upd to the auto-load
list for place.tl.
* share/txr/stdlib/place.tl (upd): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* txr.1: Add missing lset to summary of place-mutating
macros. lset actually needs a sequence, not specifically
a list: (lset a b c "123") works, and assigns characters.
It is now documented accordingly.
|
|
|
|
|
|
|
|
| |
* lib.c (remq, remql, remqual, remove_if, keep_if): Bug:
functions don't work correctly for strings. Anyway,
the ldiff-based algorithm is ugly on vectors and strings.
Patching things upp by converting input to list with
tolist.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-expander): Check
that :name designates a symbol, and that it isn't nil.
(awk): Move the implicit block to the outermost scope
so it encloses all of the clauses. Default to the
name awk for the block, rather than nil.
* txr.1: Document that the implicit awk block is
called awk by default, and that nil is not allowed
as a block name.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state prn):
Use loop instead of simple interpolation, so that
we we can individually interpolate each arg into a
quasistring. This way if an arg is nil, it turns
into nothing rather than the word "nil".
* txr.1: Documented this behavior of prn.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state loop): Do not
bind *stdout* around the call to the main record-processing
function.
(awk): Re-bind *stdout* around all of the user code,
just after the run-time awk state object is constructed.
* txr.1: Correct the lies written about :output.
|
|
|
|
|
| |
* txr.1: Replace a few occurrences of short-hand
with shorthand.
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-let): New
local macros.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* checkman.txr (check-code): Move match for space after
code/meta after the assert, so it is an error if that
is missing.
* txr.1: Numerous inappropriate or misformatted
instances of .code and .meta replaced, removed
or adjusted.
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state f-to-rec):
Use quasiliteral to combine fields to reconstitute
rec; cat-str works only with characters and strings.
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-state): Initialize
fs to nil rather than the default regex.
(sys:awk-state rec-to-f): If fs is nil then operate
on a version of rec that is filtered through trim-str.
Thus fs being nil is like the Awk special case when
fs is a space.
* txr.1: Description of fs updated.
|
|
|
|
|
|
|
|
|
| |
* lib.c (trim_str): Trim only newlines and blanks,
not carriage returns, vertical tabs and form feeds.
This is subject to the compatibility option
* txr.1: Doc updated and compatibility note
added.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1 (meta, metn, gets): In nroff mode, don't just
add angle brackets around meta symbols, but also typeset
them in italic using \fI...\fP. This is useful because
the output of man can be colorized when viewed using the
less pager. If these symbols are italicized, then they
get colored differently from surrounding text.
We keep the angle brackets because it helps these words
stand out as "meta" in the absence of color.
|
|
|
|
| |
* txr.1: Remove extra blank line above Macro flip section.
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/place.tl (nthcdr): Fix a potentially
wrong order of evaluation by using a temporary symbol for the
list and using alet. If the list form could potentially
modify the index, then we now avoid a bug here.
(vecref, chr-str, ref, gethash, slot): Optimise
the expansion of these two-expression places using alet.
If both expressions are symbols, which is often the case,
temporaries are avoided.
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (place_set_entries): Add alet symbol to autoload
list for place.tl.
* share/txr/stdlib/place.tl (alet): New macro.
* txr.1: Documented alet.
|