| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* txr.1: Note that TXR Lisp has global lexicals, and that some
library variables are examples of such, and that defparm
is defparameter in CL.
|
|
|
|
|
| |
* txr.1: An unquote's evaluation should be contrasted with the
quasiquote's suppression of it, not with the quote.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
| |
Reported by Dave Love.
* txr.1 (cod1, cod2, meti, TP*): When inserting material at
the start of a line, add the \& zero width character, so
the line isn't interpreted as a control sequence.
|
|
|
|
|
| |
* txr.1: Numerous misspellings of macro names
are repaired.
|
|
|
|
|
| |
* txr.1: In the stdlib variable description, rewrote the text
describing the macro-time autoloading scenario.
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.l (SREGEX): New start state, for stand-alone regex parsing.
(grammar): All REGEX state rules are active in the SREGEX state also.
The rule for the / character returns a REGCHAR if in the SREGEX
state, so it is treated as an ordinary character.
* txr.1: Updated regex-parse documentation about the treatment of
the slash. Also added notes about double escaping when a string literal
is passed to regex-parse.
|
|
|
|
| |
* txr.1: .meta -> .metn
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* tl.vim, txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register clamp as intrinsic function.
* lib.c (clamp): New function.
* lib.h (clamp): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take into account string display width in field trimming and padding
calculations, including situations where only half a character fits.
* stream.c (calc_fitlen): New function.
(vformat_str): Revised to use calc_fitlen. If calc_fitlen indicates
that there is no trimming or padding, then use put_string rather than
put_char.
* txr.1: Update description of format with regard to use of
dispaly width in field calculations.
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register display-width intrinsic.
* lib.c (display_width): New function.
* lib.h (display_width): Declared.
* txr.1: Documented display-width.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.l (grammar): Change order of rule which recognizes FLODOT with
a one-character trailing context other than a dot, and the rule which
diagnoses trailing junk. The issue is that this order gives the wrong
interpretation to 123.E, treating it as 123. followed by E rather than
trailing junk, like in the case of 123.0E or 123.B.
* txr.1: Adding the valid example 1.E5. Removing references to dot as
consing dot. Fixed documentation which says that 1.E is 1 followed by
a consing dot and E. The wrong behavior in fact produced 1.0 followed
by E. No consing dot semantics.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.y (r_exprs, n_expr): Move the DOTDOT syntactic sugar rule from
r_exprs to n_expr, where it is much simpler. This also means that the
a..b syntax is now an expression by itself; it need not be enclosed in
a list. The DOTDOT operator is made right associative; or rather
its existing %right declaration is now activated.
* txr.1: Remove documentation stating that the .. notation must
be used in a list, and not in the dotted position of an improper
list. Document the behavior in the dotted position, and document
right associativity.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a.b.(expr ...).c -> (qref a b (expr ...) c)
Consing dot requires whitespace.
* eval.c (qref_s): New symbol global variable.
(eval_init): Initialize qref_s.
* eval.h (qref_s): Declared.
* parser.l (REQWS): New pattern definition, required whitespace.
(grammar): New rules to scan CONSDOT (space required on both
sides) and LAMBDOT (space required after).
* parser.y (CONSDOT, LAMBDOT): New token types.
(list): (. n_expr) rule replaced with LAMBDOT and CONSDOT.
(r_exprs): r_exprs . n_expr consing dot rule replaced with CONSDOT.
(n_expr): New n_expr . n_expr rule introduced here for producing
qref expressions.
(yybadtoken): Handle CONSDOT and LAMBDOT.
* txr.1: Documented qref dot.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* debug.c (debug_set_state, debug_restore_state): New functions.
* debug.h (debug_state_t): New type.
(debug_set_state, debug_restore_state): Declared, and defined
as dummy macros in non-debug-support build.
* lisplib.c (opt_dbg_autoload): New global variable.
(lisplib_try_load): Disable or enable debugging around
library loading based on opt_dbg_autoload option.
* lisplib.h (opt_dbg_autoload): Declared.
* txr.c (help): List --debug-autoload option.
(no_dbg_support): New static function to avoid repeated code.
(txr_main): Add debugger option. Change duplicate no debug support
error messages into calls to no_dbg_support.
* txr.1: Document --debug-autoload
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (path_test_set_entries, path_test_instantiate):
New static functions.
(dlt_register): Registered new functions to dl_table.
* txr.1: Documented new functions.
* share/txr/stdlib/path-test.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Added check for geteuid and related functions.
* sysif.c (getuid_wrap, geteuid_wrap, getgid_wrap, getegid_wrap,
getgroups_wrap, setuid_wrap, seteuid_wrap, setgid_wrap, setegid_wrap):
New static functions.
(sysif_init): Register intrinsics getuid, geteuid, getgid,
getegid, getgroups, setuid, seteuid, setgid, setegid.
* txr.1: Documented new functions.
|
|
|
|
|
|
|
|
| |
test-set-indent-mode, get-indent, set-indent, inc-indent
and width-check intrinsic functions. Register indent-off,
indent-data and indent-code variables.
* txr.1: Documented stream output indentation API.
|
|
|
|
|
|
|
| |
Allow negative widths to be specified with a leading minus sign,
so that we can indent to the left.
* txr.1: Document ~! format directive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (vformat_align_pre, vformat_align_post): Change to void
return. Do not check return value of put_char.
(vformat_num, vformat_str): Change to void return. Do not check return
value of vformat_align_pre, vformat_aign_post or put_char.
(vformat): Do not check return value of vformat_str or vformat_num.
nilout exit point no longer needed.
(put_string): Do not intercept return value of ops->put_string.
Return t.
(put_char): Do not intercept return value of ops->put_char.
Do not check return value of put_indent. Return t.
* txr.1: Document t return of put-char, put-byte and put-string.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(bind_args): Include the entire context form in argument
mismatch errors.
(apply): Include the function name, or else source code
if it has no name, in argument mismatch erors.
(eval_init): Register func-get-name intrinsic.
* eval.h (func_get_name): Declared.
* txr.1: Documented func-get-name.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(eval_error): Derive location of error from
the last_form_evaled, if form doesn't have it.
(eval_init): Re-register source-loc-str as binary with an optional arg.
* match.c (debuglf, sem_error, file_err, typed_error): Default new
argument of source_loc_str.
* parser.h (source_loc_str): Declaration updated.
* parser.l (source_loc_str): Take second argument which specifies
alternative value if the source loc info is not found.
* unwind.c (uw_throw): Simplify code thanks to source_loc_str
default argument.
* txr.1: Document new argument of source-loc-str.
|
|
|
|
|
|
|
|
| |
* hash.h (hash_revget): Declared.
* eval.c (eval_init): Registered hash-revget intrinsic.
* txr.1: Documented hash-revget.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (arith-init): Changing *flo-...* from special to
lexical, and adding un-earmuffed variants. The earmuffed
versions are obsolescent.
Adding %pi% and %e% global lexicals. Earmuffed versions are
also made global lexical, and obsolescent.
* eval.c (lookup_global_var, lookup_global_var_l): New functions.
(lookup_var): Uses lookup_global_var.
(reg_varl): New function.
(reg_var): Uses reg_var.
(eval_init): Register global lexicals user-package, system-package
and keyword-package. Old symbols with earmuffs are obsoleted,
and also turned into global lexicals.
(top-vb, top-fb): Changed to lexical.
* eval.h (lookup_global_var, lookup_global_var_l, reg_varl):
Declared.
* genvim.txr: Scan ver.tl so that the lib-version variable
is included. Extract reg_varl calls.
* glob.c (glob_init): glob-err and other variables made lexical.
* lib.c (get_user_package, get_system_package, get_keyword_package):
Use lookup_global_var_l to avoid searching dynamic scope for
lexicals which cannot be dynamically rebound.
* share/txr/stdlib/ver.tl (lib-version): New global lexical variable.
(*lib-version*): Turned lexical. Obsolescent.
* signal.c (sig-init): sig-* variables turned lexical.
* sysif.c (sysif-init): s-*, poll-* and w-* variables turned lexical.
* syslog.c (syslog-init): log-* variables turned lexical.
* txr.c (sysroot-init): stdlib and *txr-version* variables turned
lexical. txr-version variable added, and *txr-version* is
obsolescent.
(txr-main): self-path variable added. *self-path* turns lexical
and is obsolescent.
* txr.1: Documentation updated. Lexical variables not referred
to as special. Special variables referred to as special.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (defvarl_s, defparm_s, defparml_s, sys_mark_special_s): New
symbol variables.
(mark_special): Return val rather than void, since it's hoisted
into Lisp domain now with func_n1.
(op_defvar): Renamed to op_defvarl, and doesn't call mark_special.
defvarl is now the special form for defining variables, and special
marking is an embellishment added by macros.
(me_defparm): Renamed to me_def_variable. Handles defvar, defparm
and defparml.
(do_expand): Expand defvarl, rather than defvar.
(eval_init): Intern defvarl, defparm, defparml and mark-special
symbols, and initialize corresponding globals.
Register defvarl special operator, retiring defvar.
Register defparm to me_def_variable, and register defvar and
defparml to the same.
* txr.1: Document support for global lexical scopes and the
new macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.h (statf): Declaration removed.
* sysif.c (w_stat): Function takes val instead of const wchar_t *
as leftmost argument.
(w_lstat, w_fstat): New static functions, with same interface as w_stat.
(stat_to_list, stat_impl): New static functions.
(statp, statl): New static functions.
(statf): Function removed, name re-used for new static function.
(sysif_init): stat intrinsic registered to statp function, not statf.
lstat and fstat intrinsics registered to statl and statf.
* txr.1: Documented lstat and fstat.
|
|
|
|
|
|
|
|
| |
(expand_opt_params_rec, expand_vars): Follow rename of special_p.
(eval_init): Register special-operator-p and special-var-p
intrinsics.
* txr.1: Document special-operator-p and special-var-p.
|
|
|
|
|
| |
* txr.1: Numerous sections moved around. Miscellaneous formatting
and wording fixes. New sections under TXR Lisp intro section.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (enum align): New enum.
(vformat_align_pre, vformat_align_post): New static functions.
(vformat_num, vformat_str): Argument left renamed to align, and changed
to enum align. vformat_align_pre and vformat_align_post are called to
generate the correct padding for left, center and right alignment.
(vformat): Two-valued local variable left turned into three-valued
align. The ^ prefix on the width field is recognized.
* txr.1: Documented ^ width prefix.
|
|
|
|
|
| |
placelet as a way of writing place update macros.
Example added under placelet.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
word list literals and word list quasiliterals, except
in <= 109 compatibility mode. An escaped newline in
these literals, together with surrounding whitespace,
now produces a single space, except in <= 109
compatibility mode.
* txr.1: Documented new rules for WLL's and QLL's,
and added compatibility notes.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/with-resources.tl: New file.
* lisplib.c (with_resource_set_entries, with_resources_instantiate):
New static functions.
(lisplib_init): Register new functions under dlt_register.
* txr.1: Document with-resources.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register nthcdr function.
* lib.c (nthcdr): New function.
* lib.h (nthcdr): Declared.
* share/txr/stdlib/place.tl (nthcdr): New defplace.
* txr.1: Documented.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (op_mac_param_bind): New static function.
(eval_init): Register mac-param-bind operator.
* share/txr/stdlib/place.tl (define-place-macro): Use
mac-param-bind inside a lambda instead of tb macro.
* txr.1: Document mac-param-bind.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register second through tenth as intrinsic.
* gencadr.txr: New cadr.c changes encoded.
* lib.c (second, third, fourth, fifth, sixth): Functions
reimplemented using ref, so they are much more efficient
for vectors and strings.
(seventh, eighth, ninth, tenth): New functions.
* lib.h (seventh, eighth, ninth, tenth): Declared.
* share/txr/stdlib/place.tl: place macros defined for
second through tenth.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
define-place-macro to list of names.
* share/txr/stdlib/place.tl (*place-macro*): New global hash.
(sys:tigger-load, sys:pl-expand): New functions.
(call-update-expander, call-clobber-expander, call-delete-expander):
Recognize and expand place macros.
(define-place-macro): New macro.
(first, rest): Places redefined using define-place-macro, replacing
the old hack of copying the expanders from one table entry to another.
* txr.1: Documented place macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (init): Call cadr_init.
* lisplib.c (dl_table, set_dlt_entries, dlt_register): Externalize.
* lisplib.h (dl_table, set_dlt_entries, dlt_register): Declared.
* Makefile (OBJS): Add cadr.o.
* cadr.c: New file.
* cadr.h: New file.
* gencadr.txr: New file.
* share/txr/stdlib/cadr.tl: New file.
* txr.1: Document cadr accessors.
|
|
|
|
|
|
| |
semantics so that (del (cdr x)) is symmetric with (del (car x)).
* txr.1: Update documentation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (split_func): New static function.
(partition_split_common): New static function, based on
on contents of partition function.
(partition): Now a wrapper around partition_split_common.
(split): New function.
* lib.h (split): Documented.
* txr.1: Documented split.
|
| |
|
| |
|