| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
functions.
(expand): New case for quasiliterals.
(eval_init): Register quasi literal as special operator.
* match.c (format_field): Linkage changed to external.
* match.h (format_field): Declared. Declarations rearranged.
|
|
|
|
|
|
| |
* eval.c (and_s, or_s): Redundant variables removed.
* match.h (do_s): extern storage class specifier added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New functions list, append and eval. Code walking framework for
expanding quasiquotes. quotes right now.
* eval.c (let_s, lambda_s, call_s, cond_s, if_s, and_s, or_s
defvar_s, defun_s, list_s, append_s): New symbol variables.
(eval_intrinsic, op_quote, expand_forms, expand_cond_pairs,
expand_place, expand_qquote): New static functions.
(expand): New external function.
(eval_init): Initialize new symbol variables. Use newly defined symbol
variables to register functions. Also, new functions: quote, append,
list and eval.
* eval.h (expand): Declared.
* lib.c (appendv): New function.
(obj_init): quote and splice operator symbols moved into system
package.
(obj_print, obj_pprint): Support for printing quotes and splices.
* lib.h (appendv): Declared.
* match.c (do_s): New symbol variable.
(syms_init): New variable initialized.
(dir_tales_init): New variable used instead of intern.
* match.h (do_s): Declared.
* parser.y (elem): @(do) form recognized and its argument passed
through the new expander.
(o_elem, quasi_item): Pass list through expander.
(list): Use choose_quote to decide whether to put
regular quote or quasiquote on quoted list.
(meta_expr): Fixed abstract syntax so the expression is a single
argument of the sys:expr, rather than multiple arguments.
(unquotes_occur, choose_quote): New static function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of text and regular expressions, that whole mixture is
considered to follow the variable and used for matching.
The earlier semantics change whereby a single unescaped
space denotes the regular expression / +/ broke the
simple case @a word. It caused the @a to be followed
not by the text " word" but by just the regular expression
element.
With this change @a word means that a is followed by
the regex / +/ and "word".
* match.c (text_s): New symbol variable.
(h_text): New function.
(syms_init): Initialize new symbol variable.
(dir_tables_init): Hook h_text into horizontal directives table.
* match.h (text_s): Declared.
* parser.y (text, texts): New nonterminals.
(elem): TEXT, SPACE and regex are now handled under texts
grammar production. All texts are run together and produce
an item which looks like (text items ...).
* txr.1, RELNOTES: Updated.
* txr.c (remove_hash_bang_line): Updated to find #! buried
in (text ...) syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (gather_s): New keyword variable.
(v_gather): New function.
(syms_init): gather_s initialized.
(dir_tables_init): v_gather entered into table.
* match.h (gather_s): Declared.
* parser.l: GATHER token scanning added.
* parser.y: GATHER token added. gather_clause nonterminal added.
* txr.1: New directive documented.
* txr.vim: gather keyword introduced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(get_filter): Treat (:fun ...) syntax as a single function
call with extra arguments, currying it up as curried function that
invokes match_funcall once.
* match.c (match_funcall): Extended to take a list of the
additional arguments from get_filter. Adds these to the
function call form generated for the v_func call.
* match.h (match_funcall): Declaration updated.
* txr.1: Function Filter additional arguments documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(get_filter): Handle (fun ...) syntax.
* match.c (v_bind): Establish dynamic environment frame around
dest_bind, and stash the bindings there so filters can have access
to the bindings.
(v_output): Likewise, around do_output calls.
(v_fun): New function.
(match_files): Function handling broken out into v_fun.
(match_funcall): New function.
* match.h (match_funcall): Declared.
* unwind.c (uw_push_env): Initialize match_context.
(uw_get_match_context, uw_set_match_context): New functions.
* unwind.h (struct uw_dynamic_env): New member, match_context.
(uw_get_match_context, uw_set_match_context): Declared.
* txr.1: Documented function filters.
|
|
|
|
|
|
| |
hash.h, lib.c, lib.h, match.c, match.h, parser.h, parser.l, parser.y,
regex.c, regex.h, stream.c, stream.h, txr.1, txr.c, txr.h, unwind.c,
unwind.h, utf8.c, utf8.h: Updated e-mail address.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (choose_s, longest_k, shortest_k): New variables.
(match_line, match_files): Introduced choose directive.
(match_init): Initialize new variables.
* match.h (choose_s): Declared.
* parser.l (yybadtoken): Handle CHOOSE.
(CHOOSE): Clause added for returning this token.
* parser.y: Added #include "match.h".
(CHOOSE): New token symbol.
(choose_clause): New nonterminal symbol.
(clause): choose_clause added.
(all_clause, some_clause, none_clause, maybe_clause,
cases_clause): Abstract syntax tree tweaked.
(choose_clause): New syntax.
(elem): Abstract syntax trees tweaked for many clauses.
New CHOOSE clauses.
(out_clause): New error case for choose_clause.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol variables.
(match_lines): Keyword arguments in collect implemented.
(match_init): New function.
* match.h (match_init): Declared.
* parser.l (COLLECT): Lexical syntax changed for COLLECT to
allow for argument material.
* parser.y (%union): obj renamed to val.
(exprs_opt): New nonterminal.
(collect_clause): Rewritten for arguments.
* txr.c (main): Call to match_init introduced.
|
|
|
|
|
|
| |
lib.h, match.c, match.h, parser.h, parser.l, parser.y, regex.c,
regex.h, stream.c, stream.h, txr.1, txr.c, txr.h, unwind.c, unwind.h,
utf8.c, utf8.h: Updated copyright year.
|
| |
|
|
|
|
|
| |
we wouldn't have to declare object variables at all, so why
use an obtuse syntax to do so?)
|
|
|