| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
| |
* txr.1: Describe *place-expander* variable.
|
|
|
|
|
| |
* txr.1: Document *place-update-expander*,
*place-clobber-expander* and *place-delete-expander*.
|
|
|
|
|
| |
* txr.1: with-gensyms moves from User-Defined Places
to macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* unwind.c (uw_find_frames_impl): New static function, made
from uw_find_frame.
(uw_find_frame): Reduced to wrapper around
uw_find_frames_impl.
(uw_find_frames): New function.
(uw_late_init): Register find-frames intrinsic.
* unwind.h (uw_find_frames): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-mac-let): Local macro
sys:rng generalized to support code generation for ranges that
exclude either endpoint. Local rng macro adjusted to target
this new form. Local macros rng-, -rng, and -rng- added.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (tagbody_set_entries): Add prog and prog* to
autoload list.
* share/txr/stdlib/tagbody.tl (prog, prog*): New macros.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register mismatch intrinsic.
* lib.c (mismatch): New function.
* lib.c (mismatch): Declared.
* txr.1: Documented mismatch.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This improves compatibility with other Lisp dialects
in a small way.
* eval.c (eval_init): Register endp intrinsic.
* lib.c (endp): New function.
* lib.h (endp): Declared.
* txr.1: Documented endp.
|
|
|
|
| |
* txr.1: adding a few pointless weasel words.
|
|
|
|
|
|
|
| |
* eval.c (me_equot): New static function.
(eval_init): Register equot intrinsic macro.
* txr.1: Documented equot.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* txr.1: Document that unquoting and splicing forms
may appear outside of unquote syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are lacking read/print consistency in the handling of
unquotes applied to symbols whose names begin with a star.
* lib.c (unquote_star_check): New static function.
(obj_print_impl): Use unquote_star check when printing
an unquote to determine whether a space is needed so
that the result doesn't read back as a ,* splice.
* txr.1: Change "should" to "must": the whitespace is
absolutely required in , *x*. Adding more discussion
as a dialect note.
|
|
|
|
|
|
|
|
| |
* regex.c (regex_range_full_fun, regex_range_left_fun,
regex_range_right_fun, regex_range_search_fun): New functions.
(regex_init): Register fr^$, fr^, fr$ and frr intrinsics.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-let): Renamed to
sys:awk-mac-let. Macrolet prn removed from here.
(sys:awk-fun-let): New macro, provides awk functions.
The prn function removed from sys:awk-mac-let is generated
here.
(sys:awk-fun-shadowing-env): New function.
(awk): Follow rename of sys:awk-let. When expanding p-action
forms, use only sys:awk-mac-let; do not include the awk
functions, which do not "vaporize" unlike local macros. To
compensate for not including the functions, extend the macro
environment with one that shadows the functions, so that
during this expansion, any global macros of the same name as
awk local functions are properlly hidden. In the final
expansion, include the awk functions.
* txr.1: Updated documentation to consistently call
prn an awk function everywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This problem happens when awk is issued from the command line
followed by one or more arguments as exemplified by the usage
txr -e '(awk ...) arg ... . In this case, after awk processes
the args as input sources and completes, TXR resumes
processing the command line arguments and wants to open arg
as a script file! To address this problem, when awk defaults
on using *args* as input sources, it consumes *args* by
clearing the variable to nil. TXR's command line processing
already reacts to changes in *args* by evaluated forms.
Code that wants *args* to be left alone by awk can explicitly
pass them in using (awk (:inputs *args*) ...).
* share/txr/stdlib/awk.tl (sys:awk-state): Move
default initialization of inputs into :postinit.
If there are no inputs by :postinit time, then
take *args* or *stdin*. If *args* is used in this
default manner, then consume *args*.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contrary to the documentation, handle doesn't in fact have the
same syntax as catch. It passes the exception symbol to
clauses as the leftmost argument, followed by the exception
arguments, whereas catch passes only the exception arguments.
* share/txr/stdlib/except.tl (handle): Do not pass the
exception sybmol as the leftmost argument, unless operating
in TXR 161 or earlier compatibility.
* tests/012/except.tl: drop exception symbol argument from
handle clause.
* txr.1: Compatibility note added.
|
|
|
|
| |
* txr.1: slotset returns the stored value.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* txr.1: The example illustrating a module with
private and public symbols is altered to show a
superior practice: use a no-fallback package for
the public symbols, and be in the private package
when defining the module.
|
|
|
|
|
| |
* txr.1: Document that circular notation works with
eql-based hash tables, but not equal-based.
|
|
|
|
|
| |
* txr.1: eliminate 'large enough to "covers"' with
rewording.
|
|
|
|
|
| |
* txr.1: References to EXCEPTIONS corrected to the
correct Exceptions section title.
|
|
|
|
|
|
|
|
|
|
| |
* uwind.c (exception_subtype_map): New static function.
(uw_late_init): Register exception-subtype-map intrinsic
function.
* txr.1: Exception types are described in more detail.
A complete diagram of the existing hierarchyis given,
and the exception-subtype-map funtion is documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_exception): New static function.
(eval_error): Reduced to wrapper around eval_exception.
(eval_warn): New function.
(me_op): Bind the rest symbol in a shadowing env to suppress
watnings about unbound rest.
(do_expand): Throw a warning when a bindable symbol is
traversed that has no binding.
(expand): Don't install atoms as last_form_expanded.
* lib.c (warning_s, restart_s, continue_s): New symbol
variables.
(obj_init): Initialize new symbol variables.
* lib.h (warning_s, restart_s, continue_s): Declared.
* lisplib.c (except_set_entries): New entries for
ignwarn and macro-time-ignwarn.
* parser.c (repl_warning): New static function.
(repl): Use repl_warning function as a handler for
warning exceptions: to print their message and then
continue by throwing a continue exception.
* parser.y (warning_continue): New static function.
(parse_once): Use warning_continue to ignore warnings.
In other words, we suppress warnings from Lisp that is
mixed into TXR pattern language code, because this
produces too many false positives.
* share/txr/stdlib/except.tl (ignwarn, macro-time-ignwarn):
New macros.
* share/txr/stdlib/place.tl (call-update-expander,
call-clobber-expander, call-delete-expander): Ignore warnings
around calls to sys:expand, because of some gensym-related
false positives (we expand code into which we inserted some
gensyms, without having inserted the constructs which
bind them.
* tests/011/macros-2.txr: Suppress unbound variable
warnings from a test case.
* tests/012/ifa.tl: Bind unbound x y variables in one
test case.
* tests/012/struct.tl: Suppress unbound variable
warnings in some test cases.
* uwind.c (uw_throw): If a warning is unhandled, then
print its message with a "warning" prefix and then
throw a continue exception.
(uw_register_subtype): Eliminate the check for sub
already being a subtype of sup. This allows us to
officially register new types against t.
(uw_late_init): Register continue exception type as a
subtype of the restart type.
Formally register warning type.
* txr.1: Documented ignwarn.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (do_expand): When expanding the macro-time
form, do not macro-expand it entirely and then evaluate.
Rather, expand each argument form and evaluate.
This way earlier forms can make global definitions
which are used while macro-expanding later definitions.
* txr.1: Behavior documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed for an upcoming bugfix, so why not expose it as
an intrinsic.
* hash.c (clearhash): New function.
(hash_init): clearhash intrinsic registered.
* hash.h (clearhash): Declared.
* txr.1: Documented clearhash.
|
|
|
|
| |
* txr.1: Mention support for OOP.
|
|
|
|
|
|
| |
* txr.1: Fix text saying that symbol-function retrieves
only functions; that is true for symbols, not for the
compound syntax.
|
|
|
|
|
|
| |
* txr.1: Grammar: to occurs -> to occur. Also any subforms
of a tagbody form may be go, not just one one form as the text
seems to be saying.
|
|
|
|
| |
* txr.1: Fix bad inline expression splitting.
|
|
|
|
|
| |
* txr.1: Fix two instances of clause parameter being
typeset as .code rather than .meta.
|
|
|
|
| |
* txr.1: Missing article: *the* sys:capture-cont function.
|
|
|
|
|
| |
* txr.1: Fix .code *package* embedded in paragraph. Remove
stray words in code comment in package example.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* txr.c (txr_main): Implement -b option that takes an
argument. Ensure that -b produces an error if clumped with
other options.
* txr.1: Documented -b var=val.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/trace.tl (sys:trace): If symbol-function
returns nil, throw exception.
* txr.1: Document the behavior, along with return values
of trace and untrace, and the tolerance of untrace to
bad arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch we allow (symbol-function '(macro sym)),
(defun (macro sym) (form env) ...), and
(trace (macro sym)).
* eval.c (macro_s): New symbol variable.
(lookup_fun, func_get_name, op_defun): Support (macro sym)
syntax.
(builtin_reject_test): Pass through (macro sym) syntax.
(eval_init); Initialize macro_s.
* share/txr/stdlib/place.tl (sys:get-fun-getter-setter):
Support macro place.
* txr.1: Documented verything.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All macros are function bindings now.
* eval.c (me_interp_macro): New function. Body is
a copy of block from expand_macro.
(op_defmacro): Hoist the me_interp_macro function into
the object domain, installing the macro material as the
environment. This function is the expander.
(expand_macro): Assume that the binding is a function
and call it. The cons case is gone.
(expand_macrolet): Similar change to the one in
op_defmacro: a macrolet is also a function.
* txr.1: Documentation under symbol-macro updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a "disciplined goto" feature of Common Lisp.
This uses a new sys:switch operator, which could
also be used for optimizing case and cond forms.
* eval.c (switch_s): New symbol variable.
(op_switch, expand_list_of_form_lists, expand_switch):
New static functions.
(do_expand): Hook in the expansion of the sys:switch
operator.
(eval_init): Initialize switch_s special variable to
sys:switch symbol. Register sys:switch special op.
* lisplib.c (tagbody_set_entries, tagbody_instantiate): New
static functions.
(lisplib_init): Register autoloading of tagbody module
via new functions.
* share/txr/stdlib/tagbody.tl: New file.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (find_symbol): New function.
(symbol_present): Search the fallback list also to
determine whether the symbol is visible.
* lib.h (find_symbol): Declared.
* parser.y (sym_helper): Implement a new behavior for
qualified symbols. Interning new symbols is only allowed
for packages that have an empty fallback list.
* parser.c (get_visible_syms): New static function.
(find_matching_syms): Use get_visible_syms to get
the list of eligible symbols. This way the fallback list
of the package is included if it is the current package.
* share/txr/stdlib/package.tl (defpackage): Do not insert
a default (:use usr) if there is no :usr clause. Since
defpackage is very new, no need for backward compatibility;
the amount of code depending on this is likely zero.
* txr.1: Documented fallback list feature.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
| |
* txr.1: clarification; article-noun plurality agreement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* struct.c (struct struct_inst): New bitfield member, dirty.
(struct_init): Register test-dirty, test-clear-dirty and
clear-dirty intrinsics.
(make_struct): Initialize dirty flag to 1.
(slotset): If the object is clean, then determine whether
the slot being set is an instance slot. If so, then
set the dirty flag.
(test_dirty, test_clear_dirty, clear_dirty): New functions.
* struct.h (test_dirty, test_clear_dirty, clear_dirty):
Declared.
* txr.1: Documented dirty flags concept and new functions.
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (package_set_entries): Add in-package
symbol name to autload list.
* share/txr/stdlib/package.tl (in-package): New macro.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (getput_set_entries, getput_instantiate):
New static functions.
(dlt_register): Register auto-loading for getput module
via new functions.
* share/txr/stdlib/getput.tl: New file.
* txr.1: Documented new functions file-get, file-put,
file-append, file-get-string, file-put-string,
file-append-string, file-get-lines, file-put-lines,
file-append-lines, command-get, command-put,
command-get-string, command-put-string, command-get-lines,
and command-put-lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (caseq_star_s, caseql_star_s, casequal_star_s):
New symbol variables.
(me_case): Implement new macro semantics.
(eval_init): Initialize new symbol variables, and
register the symbols to the me_case macro expander.
* tests/sock-common.tl (local-addr): This function
depends on the old broken caseql semantics which
evaluate keys. Using caseql* makes it work again.
* txr.1: Document case{q,ql,qual}* macros.
|