| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
* parser.c (repl): If we continue the loop due to detecting a
blank line, we must free that line, since we are outside of
the unwind block (and continue would violate that block if we
were). If a line contains nothing but a comment, then enter
that line into the history.
* txr.1: Documented treatment of commented lines.
|
|
|
|
|
|
|
|
| |
* parser.c (read_eval_ret_last): New function.
(repl): Use read_eval_ret_last for :read command.
* txr.1: Document :read in new section on direct
read from the terminal.
|
|
|
|
|
|
|
|
| |
* parser.c (repl): Subtle difference. Test form's syntax for
equality to :quit, not its value. The REPL should not
terminate if a form happens to calculate :quit as a value.
* txr.1: Updated.
|
|
|
|
| |
* txr.1: document Home, End and Delete support.
|
|
|
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (complete_line): If Ctrl-C is
pressed in completion mode, we cancel completion and return
0 so the command loop reads a new character.
* txr.1: Documented Ctrl-C in completion mode, and removed
the falsehood that ESC is a cancel command, adding instead
an explanation about the ESC handling is really for.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The manual documents a filter called :tointeger, but it has
never existed. The keyword was misspelled in the source code
from the beginning as :toinger.
I'm fixing the typo and renaming the filter to :toint
at the same time.
* filter.c (tointeger_k, toint_k): Former renamed
to latter.
(filter_init): Initialize toint_k with correctly
spelled symbol. Register filter under toint_k.
* filter.h (tointeger_k, toint_k): Former renamed
to latter.
* txr.1: Changed mention of :tointeger to :toint.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation says that *args* is bound to nil,
but actually it is not bound at all.
Let us fix this by actualy binding *args* to the
remaining arguments, and by also allowing
modification of *args* to dynamically take effect.
* txr.c: Set up value of *args* prior to processing
any option which evaluates TXR Lisp. Afterwards,
reload the argument list from that variable.
* txr.1: Documented semantics of *args* during
command line processing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register package-alist, package-name
and package-symbols intrinsics.
* genvim.txr: Rather than scanning C sources for TXR Lisp
symbols, iterate over the packages and their symbols,
collecting anything which has a binding or is self-evaluating.
To get the stdlib symbols, we trigger the autoloads by doing
boundp queries on a few symbols.
* txr.1: Document package-alist, package-name and
package-symbols.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The self-path variable is not bound in TXR Lisp scripts
or the command line.
* txr.c (txr_main): Set self-path to "cmdline-expr" before
command line Lisp evaluations. (For TXR pattern language
syntax invoked in a -c, it continues to be "cmdline").
Set self-path to the file name when reading a Lisp file.
Also, the legacy, undocumented *self-path* is only set
for TXR scripts, and is reverted to being a special variable,
not a global lexical.
* txr.1: Documented self-path in more detail.
|
|
|
|
| |
* txr.1: Missing .desc added.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register subtypep and typep.
* eval.h (list_s): Existing variable declared.
* lib.c (atom_s, integer_s, number_s, sequence_s, string_s):
new symbol variables.
(subtypep, typep): New functions.
(obj_init): Initialize new symbol variables.
* lib.c (atom_s, integer_s, number_s, sequence_s, string_s):
Declared.
* txr.1: Documented type hierarchy and the new functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (compat_fixup): Call rand_compat_fixup.
* rand.c (random_state_var_s): New global symbol variable.
(rand_compat_fixup): New static function.
(rand_init): Initialize random_state_var_s by intering
the earmuffed symbol *random-state*. Initialize random_state_s
to the non-earmuffed symbol random-state.
* rand.h (random_state_var_s): Declared.
(random_state): Macro updated to look up the special
variable using random_state_var_s, rather than random_state_s.
(rand_compat_fixup): Declared.
|
|
|
|
|
| |
* txr.1: Debugger and Compatibility are moved out of the TXR
library description, into their own major sections.
|
|
|
|
|
|
|
|
| |
* signal.c (kill_wrap): Return boolean indication of success,
with compatibility to previous behavior.
* txr.1: Document return value of kill, and put in
compatibility note.
|
|
|
|
|
|
|
| |
* signal.c (raise_wrap): New static function
(sig_init): Register raise intrinsic.
* txr.1: Documented raise.
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.l (yyerrorf): Don't print the program prefix
and parenthes, except if compatibility to 114 or older is
requested. The main motivation for this is the repl, where the
program prefix is not informative. The new format is also a
de facto standard which is compatible with other parsers.
Vim understands it directly.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* genvim.txr: Scan struct.c, path-test.tl and struct.tl files.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Detect getpwuid, getpwuid_r and others.
* sysif.c (passwd_s, name_s, gecos_s, dir_s, shell_s): New
symbol variables.
(setpwent_wrap, endpwent_wrap, fill_passwd, make_pwstruct,
getpwent_wrap, getpwuid_wrap, getpwnam_wrap): New static
functions.
(sysif_init): Initialize new symbol variables. Create
passwd structure type. Register setpwent, endpwent,
getpwent, getpwuid and getpwnam intrinsics.
* txr.1: Documented passwd structure and functions.
|
|
|
|
|
| |
* txr.1: Document time struct, time-struct-local
and time-struct-utc.
|
|
|
|
|
|
| |
* txr.1: stat structure described; places updated to refer
to it rather than the old propertly list. Compatibility
note added.
|
|
|
|
|
| |
* txr.1: Fixed incorrect macro use under
in, mapdo, set, and getenv.
|
|
|
|
|
| |
* txr.1: :whole doesn't bind the entire macro form.
Added Dialect Note to compare with CL.
|
|
|
|
| |
* txr.1: New section on structs documenting functions and macros.
|
|
|
|
|
| |
* txr.1: The { x | y } notation has been used in the
document for a long time; now it is explained.
|
|
|
|
|
| |
* txr.1: Verbatim exact duplicate of packagep documentation removed.
Fixed duplicated mknod heading over description of chmod.
|
|
|
|
|
|
| |
* txr.1: Documented --gc-debug, --vg-debug and --dv-regex.
* txr.c (help): Cover above options.
|
|
|
|
|
|
|
|
| |
* eval.c (builtin_reject_test): Suppress the diagnostic against
redefinition of built-in macros and operators if the compatibility
is 107 or lower. The rejection appeared in 108.
* txr.1: Document this compatibility behavior.
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register shuffle as intrinsic.
* lib.c (shuffle): New function.
* lib.h (shuffle): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* args.c (args_copy_to_list): New function.
* args.h (ARGS_MIN): New preprocessor symbol.
(args_add_list): New inline function.
(args_copy_to_list): Declared.
* debug.c (debug): Args in debug frame are now struct args *.
Pull them out nondestructively for printing using
args_copy_to_list.
* eval.c (do_eval_args): Fill struct args argument list
rather than returning evaluated list.
Dot position evaluation is handled by installing
the dot position value as args->list.
(do_eval): Allocate args of at least ARGS_MAX for the
call to do_eval_args. Then use generic_funcall to
invoke the function rather than apply.
(eval_args_lisp1): Modified similarly to do_eval_args.
(eval_lisp1): New static function.
(expand_macro): Construct struct args argument list for
the sake of debug_frame.
(op_dwim): Allocate args which are filled by eval_args_lisp1,
and applied to the function/object with generic_funcall.
The object expression is separately evaluated with
eval_lisp1.
* match.c (h_fun, v_fun): Construct struct args arglist for
the sake of debug_frame call.
* unwind.c (uw_push_debug): args argument becomes
struct args *.
* unwind.h (struct uw_debug): args member becomes
struct args *.
(uw_push_debug): Declaration updated.
* txr.1: Update documentation about dot position argument in
function calls. (list . a) now works, which previously didn't.
|
|
|
|
|
|
| |
* txr.1: Make it clear that @rest is not inserted
if meta-numbers or @rest is present. Move
example to the end.
|
|
|
|
|
|
| |
* 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
|
| |
|