summaryrefslogtreecommitdiffstats
path: root/txr.1
Commit message (Collapse)AuthorAgeFilesLines
* * eval.c (rest_s, op_s): New variables.Kaz Kylheku2012-02-031-5/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* * txr.1: UTF-8 handling clarified.Kaz Kylheku2012-02-021-12/+16
|
* * eval.c (lookup_sym_lisp1): New function.Kaz Kylheku2012-02-011-12/+48
| | | | | | | | | | | | | | | (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.
* typo.Kaz Kylheku2012-01-281-1/+1
|
* * parser.l: Support hex and octal escapes in string and quasiliterals,Kaz Kylheku2012-01-271-2/+7
| | | | | | | as the documentation says. Also support an optional trailing ; delimiter in hex escapes. * txr.1: Documented.
* Version 55txr-055Kaz Kylheku2012-01-261-2/+2
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* Document that source for range assignment can be a string, vector or list.Kaz Kylheku2012-01-261-3/+9
|
* * arith.c (plus, minus): Better wording in error messages.Kaz Kylheku2012-01-261-14/+19
| | | | | | | | | | | | | | | | | | * 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.
* * txr.1: More discussion of ranges.Kaz Kylheku2012-01-261-0/+22
|
* * eval.c (dwim_loc, dwim_op): Eliminated redundant re-evaluationKaz Kylheku2012-01-261-1/+37
| | | | | | | | | | | | | | | | | 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.
* * eval.c (dwim_loc): Handles full responsibility for assigningKaz Kylheku2012-01-251-2/+22
| | | | | | | | | | 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.
* * eval.c (eval_init): New functions registered.Kaz Kylheku2012-01-251-0/+20
| | | | | | | | | | | | | | | | | | * 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.
* * eval.c (dwim_s): New symbol variable.Kaz Kylheku2012-01-251-4/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* Version 54txr-54Kaz Kylheku2012-01-211-2/+2
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* Minor edits.Kaz Kylheku2012-01-141-12/+13
|
* Remove junk.Kaz Kylheku2012-01-141-2/+0
|
* Spelling.Kaz Kylheku2012-01-141-1/+1
|
* Minor fixes, and removed last vestiges of references to the obsolescentKaz Kylheku2012-01-141-8/+11
| | | | variant of the @(next) syntax.
* Minor.Kaz Kylheku2012-01-141-6/+6
|
* Minor edits.Kaz Kylheku2012-01-121-2/+2
|
* Clarification.Kaz Kylheku2012-01-121-1/+3
|
* * eval.c (eval_init): Make lazy_appendv functionKaz Kylheku2012-01-121-7/+15
| | | | | | available as append*. * txr.1: Documented.
* Version 53Kaz Kylheku2012-01-111-1/+1
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* * eval.c (each_s, each_star_s, collect_each_s, collect_each_star_s):Kaz Kylheku2012-01-111-0/+59
| | | | | | | | | | | 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.
* * eval.c (eval_init): list_str registered.Kaz Kylheku2012-01-111-0/+2
| | | | | | | | | | * lib.c (list_str): New function. * lib.h (list_str): Declared. * txr.1: Doc stub section created. * txr.vim: Updated.
* * eval.c (tostring, tostringp): New static functions.Kaz Kylheku2012-01-101-1/+1
| | | | | | | | (eval_init): New functions registered. * txr.1: Stub sections created. * txr.vim: Updated.
* Spat of new features having to do with lazy processing.Kaz Kylheku2012-01-101-6/+134
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Version 52txr-52Kaz Kylheku2012-01-071-2/+2
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated. Wrong December dates fixed.
* * match.c (fuzz_s): New symbol variable.Kaz Kylheku2012-01-061-0/+23
| | | | | | | | (v_fuzz): New static function. (syms_init): fuzz_s initialized. (dir_tables_init): v_fuzz entered into v_directive_table. * txr.1: Documented @(fuzz).
* * match.c (v_gather): Implemented until/last clause.Kaz Kylheku2012-01-061-0/+16
| | | | | | | * parser.y (gather_parts, additional_gather_parts): New nonterminals. (gather_clause): Syntax refactored for until/last clause. * txr.1: Updated.
* * match.c (counter_k): New keyword symbol variable.Kaz Kylheku2011-12-301-1/+11
| | | | | | | | | | | | | | | | | | | | (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.
* New functionality: mod and modlast directives in repeat and rep.Kaz Kylheku2011-12-291-9/+24
| | | | | | | | | | | | | | | | | | | | | | * 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.
* * txr.1: Missing Description headings added.Kaz Kylheku2011-12-291-0/+4
|
* * txr.1: Useless sentence under reduce-left and reduce-right removed.Kaz Kylheku2011-12-291-3/+0
|
* Spelling.Kaz Kylheku2011-12-291-2/+2
|
* * txr.1: Clarifying semantics of exceptions being thrown inKaz Kylheku2011-12-281-8/+13
| | | | catch clauses and in finally clauses.
* Version 51txr-51Kaz Kylheku2011-12-281-1/+1
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* * txr.1: Capitalize TXR where it makes sense.Kaz Kylheku2011-12-281-76/+63
| | | | Introductory text rewritten.
* More formatting changes.Kaz Kylheku2011-12-251-267/+192
|
* * txr.1: Formatting fixes.Kaz Kylheku2011-12-251-31/+95
|
* * eval.c (eval_init): New function interned.Kaz Kylheku2011-12-251-2/+6
| | | | | | | | | | | | | * 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.
* Version 50txr-50Kaz Kylheku2011-12-231-2/+2
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* * lib.c (memql): New function.Kaz Kylheku2011-12-231-1/+136
| | | | | | | | | | | (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.
* * txr.1: Documented copy-list, reverse, nreverse, ldiff and flatten.Kaz Kylheku2011-12-221-0/+103
|
* * txr.1: Documented reduce-left and reduce-right.Kaz Kylheku2011-12-221-0/+50
|
* * arith.c (normalize): Linkage changed to extern.Kaz Kylheku2011-12-211-0/+8
| | | | | | | | * arith.h (normalize): Declared. * rand.c (random): Bugfix: normalize the bignum before returning it. * txr.1: Doc stubs for PRNG functionality.
* * eval.c (eval_init): New function registered.Kaz Kylheku2011-12-201-0/+2
| | | | | | | | * lib.c (cat_vec): New function. * lib.h (cat_vec): Declared. * txr.1: Documentation stub.
* * eval.c (eval_init): New functions registered as intrinsics.Kaz Kylheku2011-12-201-0/+4
| | | | | | | | * lib.c (copy_vec, sub_vec): New functions. * lib.h (copy_vec, sub_vec): Declared. * txr.1: Stub sections created.
* Version 049txr-049Kaz Kylheku2011-12-191-2/+2
| | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated.
* * eval.c (bindings_helper): Fix format arguments.Kaz Kylheku2011-12-181-0/+9
| | | | | | | | | | | | | | | | | (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.