| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* eval.c (eval_init): Register the same function under
length and len.
* txr.1: Documented.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register spl and tok intrinsics.
* lib.c (spl, tok): New functions.
* txr.1: Documented.
|
|
|
|
| |
* eval.c (eval_init): Fix incorrect registration of tok-str.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are allowing calls like (* "a") and (+ "a")
without diagnosing that the argument isn't of a valid
type. Note that (max "a") is fine beacause min and
max use the less function; they are not strictly numeric.
* lib.c (nary_op): Beef up function with additional argument
for type checking the unary case.
(unary_num, unary_arith, unary_int): New static functions.
(plusv, mulv, logandv, logiorv): Use new nary_op interface.
(gtv, ltv, gev, lev, numeqv, numneq): Check the
first number.
* lib.c (nary_op): Declaration updated.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): prod and sum intrinsics registered.
* lib.c (sum, prod): New functions.
* lib.h (sum, prod): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (digcommon): New static function.
(digpow, digits): New functions.
(arith_init): New digpow and digits intrinsic functions
registered.
* arith.h (digpow, digits): Declared.
* txr.1: New functions documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.y (expand_meta): Fix incorrect conversion
of (sys:var x) when x is a non-bindable term
to (sys:expr . x). Should be (sys:expr x). This doesn't have
that much of an impact, I don't think. It prevent certain
degenerate forms from working like @(bind x @"str"). The bad
thing is that this particular one has a silent problem: @"str"
wrongly evaluates to #\s. Neverheless, this doesn't seem worth
the addition of a compat flag test; the odds of someone
depending on @"str" producing #\s in some pattern language
code see vanishingly low.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is an inconsistency in @(bind) in that
given @(bind x y) where x is a variable, both
directions are tried for a string tree match.
x could be tree of strings and y a string atom,
or vice versa. But if x is just an atom, or
a Lisp evaluation, then only one direction is
tried. @(bind @(list "a" "b") "a") succeeds,
but @(bind "a" @(list "a" "b")) fails.
* match.c (dest_bind): Test both directions
in the scalar and Lisp evaluated cases of the
left hand side. Subject to compatibility,
just in case.
* txr.1: Compat note added.
|
|
|
|
|
| |
* txr.1: Fix description of aret, which wrongly refers
to the ret macro.
|
|
|
|
|
| |
* txr.1: Under the qref and uref operators, mention what
these stand for and how the terminology is derived.
|
|
|
|
|
| |
* txr.1: Adding note that a symbol cannot be a global
symbol macro and global variable at the same time.
|
|
|
|
|
| |
* txr.1: equivalence between .(qref ...) and (uref ...) now
typeset properly in monospaced font.
|
|
|
|
|
|
| |
* txr.1: Remove clumsy "firstly, secondly, thirdly" because
we need a "fourthly" which is too much. Intro now mentions
that Lisp evaluation is also possible via the listener.
|
|
|
|
|
| |
* txr.1: Note under #b binary number syntax that #b is also
used for buffer literals, and vice versa.
|
|
|
|
|
|
| |
* eval.c (pad): Incoming sequence must be nullified, otherwise
empty vectors and strings produce a spurious nil.
This affects the weave function, which uses pad.
|
|
|
|
|
| |
* genvim.txr (iskeyword): add ^ character.
Now r^ and others are colorized properly.
|
|
|
|
|
|
|
|
|
|
| |
This eliminates one incompatibility between doloop
and ANSI CL do.
* share/txr/stdlib/doloop.tl (sys:expand-doloop): Wrap body in
tagbody form.
* txr.1: Documentation updated.
|
|
|
|
|
| |
* txr.1: Note added that a tagbody label may be any
symbol whatsoever.
|
|
|
|
|
|
|
| |
* share/txr/stdlib/tagbody.tl (tagbody): Reduce unnecessary
use of DWIM brackets to parentheses in calculation of bblocks.
Remove entry-lbl local variable, propagating its initform
to its one and only use site.
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/tagbody.tl (tagbody): Use progn for the
trivial case, and in the ordinary case, the sys:for-op
special form directly rather than the for loop maro.
sys:for-op doesn't introduce a block; the for macro is
doing that.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/tagbody.tl (tagbody): If the body contains
no labels, then emit a simple block. Note that we should just
be emitting a progn here; however, there is a bug in tagbody
in that there is an anonymous block. This is not documented,
and a consequence of the looping construct used. So for now we
preserve that behavior in the reduced case.
|
|
|
|
|
| |
* parser.c (is_balanced_line): Handle #b'...' syntax with some
new states and transitions.
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (doloop_set_entries, doloop_instantiate): New
functions.
(lisplib_init): Register autoload for doloop macros.
* share/txr/stdlib/doloop.tl: New file.
* txr.1: Documented.
|
|
|
|
| |
* txr.1: Superfluous article a deleted, and sentence reworded.
|
|
|
|
|
|
|
|
|
|
|
| |
* genvim.txr (txr_pnum): New match; matches a superset of
the #x, #o and #b literals with the inclusion of trailing
alphanumeric junk. Highlighted as Error.
(txr_xnum, txr_onum, txr_bnum): New match categories, formed
by renaming the previous #x, #o and #b matches. These are
contained in txr_pnum, highlighted as Number.
(txr_bracevar, txr_directive, txr_list, txr_bracket,
txr_mlist, txr_mbracket): Include txr_pnum.
|
|
|
|
| |
* txr.1: Fix incorrect #H prefix which should of course be #S.
|
|
|
|
| |
* txr.1: anything code -> any code.
|
|
|
|
|
|
|
| |
* genvim.txr (txr_error): New match in this category for #
followed by something other than H, S or R. Some characters
other than these are valid after #, but are covered by
explicit matches that occur later.
|
|
|
|
|
|
|
| |
* genvim.txr (tl_ident): Fix the incorrect match which allows
things beginning with # to be categorized as identifier
tokens. The new match reflects the true original intent: the
match must not begin with #, but may contain #.
|
|
|
|
|
|
|
| |
* genvim.txr (txr_buf_error, txr_buf_interior): New matches.
(txr_list, txr_bracket, txr_mlist, txr_mbracket): Now also
contain txr_buf.
(txr_buf): New region, in the new txr_string matchgroup.
|
|
|
|
|
|
|
| |
* genvim.txr (txr_num): Move the syn match definitions for
hex, octal and binary integer tokens after tl_ident, which is
a more general match that matches them also, and causes them
to be colorized as symbols rather than numbers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register set-diff under two
names: set-diff and diff. Register new isec and uni
intrinsics.
* lib.c (isec, uni): New functions.
* lib.h (isec, uni): Declared.
* txr.1: Documented new uni and isec functions, new diff
function name, and the deprecation of set-diff and its order
guarantee w.r.t the left sequence.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
| |
* txr.1: We are missing an "and" in the heading for the
section about the *args-full* and related variables.
This was caught due to the fix in checkman.txr to
handle Special variables sections.
|
|
|
|
|
|
| |
* checkman.txr (check-var): This pattern function must
handle "Special variable{s,}" sections not only
"Variable{s,}".
|
|
|
|
|
| |
* txr.1: the syslog-related constants are global lexical
variables and so must not be documented as special variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* filter.c (filters): Global variable removed.
(filter_s): New symbol variable.
(filter_init): Remove gc-protection from removed variable.
Intern the *filters* symbol. Use local variable for filters
hash, create the *filters* special variable and store the hash
into that.
* filter.h (filters): Variable declaraton removed.
(filters): New macro: expands to an expression designating
the current value of *filters* in the dynamic environment.
* txr.1: Documented *filters*, adding a forward reference to
it from the description of filtering.
|
|
|
|
|
|
|
| |
* gc.c (make_obj): remove assertion that the object
pulled from the free list is marked FREE. This hasn't proved
to be valuable and adds a nonzero cost to a frequently
executed path.
|
|
|
|
|
|
| |
* txr.1: Under "Parentheses Matching" correct the introductory
sentence which misleadingly claims that parenthesis matching
jumps only backwards.
|
|
|
|
|
| |
* txr.1: Under "Making a Selection", remove an unclear
sentence which contributes nothing.
|
|
|
|
|
|
| |
* txr.1: of course, the out operation of a type recursively
invokes the out operation on embedded pointers, not the in
operation.
|
|
|
|
|
| |
* txr.1: Special varaible *trace-output* not typeset in
typewriter font in heading.
|
|
|
|
|
| |
* txr.1: Under description of length function, reference to
nonexistent lambda-ref should be lambda-set.
|
|
|
|
|
| |
* txr.1: In description of buffer literal syntax, reference to
make-buffer should be make-buf.
|
|
|
|
|
| |
* txr.1: Under description of bool, fix references to
nonexistent (bits n type).
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (find, pos): Provide specialized behavior based
on type and test and key functions. Lists and list-like
objects are treated by marching down with cdr. Vectors are
traversed with numeric index, as are vector-like objects which
exhibit a length function. A special optimization is put in
for non-lazy strings which use identity as their key function,
and one of the built-in equality operators for the test
function: wcschr is used on the underlying C string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just the ANSI CL nth for lists.
* eval.c (eval_init): Register nth intrinsic.
* lib.c (nth): New function.
* lib.h (nth): Declared.
* share/txr/stdlib/place.tl (nth): New place macro,
trivially takes care of making nth an accessor.
Place macros are terrific!
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* stream.c (path_cat): New function.
(stream_init): Registered path_cat.
* stream.h (path_cat): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (remove_path): The second argument now defaults to
false rather than true, and controls only whether an exception
is thrown in the non-existence case. Thus, the function throws
errors by default, as before, but doesn't throw by default if
the failure reason is that the path doesn't exist. Previously
it threw by default in all situations, and the flag turned all
errors into a nil return.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register new intrinsic relate.
* lib.c (do_relate, do_relate_dfl): New static functions.
(relate): New function.
* lib.h (relate): Declared.
* txr.1: Documented.
|