| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(do_eval_args): Allow calls specified by improper lists
like (x y . z) where the z expression must evaluate to a list
that turns into addition arguments to be applied.
(transform_op, expand_op): New static functions.
(expand): Call expand_op.
(eval_init): Initialize rest_s and op_s. Use rest_s
to register rest function.
* lib.c (gensym): New function based on gensymv.
(gensymv): Now calls gensym.
* lib.h (gensym): Declared.
* parser.l: Parse @ followed by digits as a new kind of token,
METANUM.
* parser.y (METANUM): New token.
(meta_expr, exprs): Missing rlcp's added.
(expr): METANUM variant introduced.
(yybadtoken): Handle METANUM.
* txr.1: Documented one-symbol argument list of lambda.
Documented op. Closed some unbalanced parentheses.
* txr.vim: Highlight op.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(do_eval, do_eval_args): New static functions.
(eval, eval_args): Become wrappers for do_eval and do_eval_args,
respectively.
(eval_lisp1, eval_args_lisp1): New static functions.
(dwim_loc, op_dwim): Use eval_lisp1 and eval_args_lisp1 instead
of eval and eval_args.
* parser.y (meta_expr): Bugfix: expand the whole dwim expression,
rather than its arguments, which are not an expression.
* txr.1: Updated with notes that dwim really does Lisp-1 style
evaluation.
|
| |
|
|
|
|
|
|
|
| |
as the documentation says. Also support an optional trailing ;
delimiter in hex escapes.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (dwim_loc): Assignments to string indices and ranges
supported. New arguments for this purpose.
(op_modplace): Use new dwim_loc interface for returned value.
(op_dwim): Support assignment to string ranges.
(eval_init): replace_str registered.
* lib.c (string_extend): If the argument is a number, let it
specify the amount by which to extend the string.
(replace_str): New function.
* lib.h (replace_str): Declared.
* txr.1: Updated.
* txr.vim: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of range arguments. They are already evaluated since the cons
expression is evaluates as part of the dwim arglist.
Replaced some open code with function calls to the new listref
and listref_l functions.
(tostring, tostringp): made extern and moved to lib.c.
* lib.c (listref, listref_l): New functions.
(tostring, tostringp): moved here from eval.c.
* lib.h (listref, listref_l, tostring, tostringp): Declared.
* match.c (format_field): Handle index and range references.
* txr.1: Documented new output variable syntax.
|
|
|
|
|
|
|
|
|
|
| |
to list and array ranges.
(op_modplace): Pass extra arguments to dwim_loc so it can
do the job for ranges. If dwim_loc returns 0, it means
that it did everything.
(op_dwim): Support list and array ranges.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (sub_list, replace_list, vectorp): New functions.
(sub_vec): Allow negative indices from end of array.
(replace_vec): New function.
* lib.h (sub_list, replace_list, vectorp, replace_vec): Declared.
* parser.l (DOTDOT): Scan .. as new token.
* parser.y (DOTDOT): New token.
(expr): New syntax with DOTDOT.
(yybadtoken): Handle DOTDOT.
* txr.vim: Added new functions. Also missing append* and dwim.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(dwim_loc, op_dwim): New static functions.
(op_modplace): Support assignment to dwim forms
with the help of dwim_loc.
(expand_place): Handle dwim places.
(eval_init): Initialize dwim_s. Register dwim operator
in op_table.
* eval.h (dwim_s): Declared.
* lib.c (chr_str, chr_str_set): Allow negative indices to index
backwards from end of string.
(vecref, vecref_l): Allow negative indices to index from
rear of array.
(obj_print, obj_pprint): Render (dwim ...) forms as [...].
* parser.l: Peoduce new METABKT token type for @[,
and '[', ']' tokens.
* parser.y (METABKT): New token. %type declaration for '['.
(list): Support square-bracket style of list, translated
into dwim form.
(meta_expr): Support @[...] variant.
(yybadtoken): Handle METABKT in switch.
* txr.1: Documented [...] syntax and dwim operator.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
| |
|
| |
|
| |
|
|
|
|
| |
variant of the @(next) syntax.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
available as append*.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
| |
New symbol variables.
(op_each): New static function.
(expand): Handle the four new operators.
(eval_init): Intern new symbols, register new operators.
* txr.1: Documented each, each*, collect-each and collect-each*.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (list_str): New function.
* lib.h (list_str): Declared.
* txr.1: Doc stub section created.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
| |
(eval_init): New functions registered.
* txr.1: Stub sections created.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (prog1_s, gen_s, generate_s, delay_s, promise_s): New symbol
variables.
(eval_prog1, op_prog1, expand_gen, expand_delay): New static functions.
(expand): Handle gen and delay.
(lazy_mapcar_func, lazy_mapcar, lazy_mapcarv_func, lazy_mapcarv,
lazy_mappendv): New static functions.
(rangev_func, rangev, generate_func, generate, repeat_infinite_func,
repeat_times_func, repeatv, force): New static functions.
(eval_init): New operators and functions interned.
lazy-flatten renamed to flatten*.
* lib.c (null_f): New global variable.
(ltail, lazy_appendv): New functions.
(lazy_appendv_func): New static function.
(obj_init): null_f protected and initialized.
* lib.h (null_f, ltail, lazy_appendv): Declared.
* txr.1: Documented.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated. Wrong December dates fixed.
|
|
|
|
|
|
|
|
| |
(v_fuzz): New static function.
(syms_init): fuzz_s initialized.
(dir_tables_init): v_fuzz entered into v_directive_table.
* txr.1: Documented @(fuzz).
|
|
|
|
|
|
|
| |
* parser.y (gather_parts, additional_gather_parts): New nonterminals.
(gather_clause): Syntax refactored for until/last clause.
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(do_output_line): Process new :counter argument of rep.
(do_output): Ditto, for repeat.
(syms_init): Intern new keyword symbol.
* match.h (counter_k): Declared.
* parser.l (REPEAT, REP): Lexical syntax changed to
allow arguments.
* parser.y (repeat_rep_helper): Takes extra argument, representing
the repeat/rep args. This is inserted into the second position
of the output list.
(repeat_clause, rep_elem): Extract repeat/rep arguments and
pass to repeat_rep_helper.
(yybadtoken): Do not put quotes around the word "number".
* txr.1: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Use new symbol variable mod_s instead
of calling intern.
* match.c (mod_s, modlast_s): Symbol variables defined.
(do_output_line): mod and modlast directives implemented under rep.
(do_output): likewise under repeat.
(syms_init): Initialize new symbol variables.
* match.h (mod_s, modlast_s): Declared.
* parser.l (MOD, MODLAST): Parse new token types.
* parser.y (MOD, MODLAST): New tokens.
(repeat_parts_opt, rep_parts_opt): New syntax.
(repeat_rep_helper): Handle mod and modlast syntax.
* txr.1: Updated.
* txr.vim: Updated.
|
| |
|
| |
|
| |
|
|
|
|
| |
catch clauses and in finally clauses.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
| |
Introductory text rewritten.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c:x (lazy_flatten_scan, lazy_flatten_func): New static functions.
(lazy_flatten): New function.
* lib.h (lazy_flatten): Declared.
* match.c (v_next): Use lazy_flatten instead of flatten for
processing a :list source. This means that @(next :list ...)
can be used to process infinite lazy lists.
* txr.1: Documented lazy-flatten.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
| |
(some_satisfy): Return the first non-nil result, rather than t.
(all_satisfy): Return the value of the last item, if all items
are processed.
* lib.h (memql): Declared.
* txr.1: Documented memq, memql, memqual, tree-find, some,
all, none, eq, eql and equal.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* arith.h (normalize): Declared.
* rand.c (random): Bugfix: normalize the bignum before returning it.
* txr.1: Doc stubs for PRNG functionality.
|
|
|
|
|
|
|
|
| |
* lib.c (cat_vec): New function.
* lib.h (cat_vec): Declared.
* txr.1: Documentation stub.
|
|
|
|
|
|
|
|
| |
* lib.c (copy_vec, sub_vec): New functions.
* lib.h (copy_vec, sub_vec): Declared.
* txr.1: Stub sections created.
|
|
|
|
|
|
|
|
|
|
| |
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(eval_init): Registered new functions: symbol-function,
func-get-form, func-get-env, functionp, interp-fun-p.
* lib.c (nappend2, getplist_f, improper_plist_to_alist):
tail variable renamed to avoid clash in macro.
(func_get_form, func_get_env, interp_fun_p): New functions.
* lib.h (func_get_form, func_get_env, interp_fun_p): Declared.
(list_collect): Fix macro not to throw error, but handle the case.
* match.c (vars_to_bindings, extract_bindings): tail variable
renamed to avoid clash in macro.
* txr.1: Documentation stubs.
|