summaryrefslogtreecommitdiffstats
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug #34799: errors in horizontal functionsKaz Kylheku2011-11-101-0/+12
| | | | | | | | | | | reported to caller line number. * match.c (ml_bindings_specline): Extended with extra argument (h_coll): Pass nil for new argument of ml_bindings_specline. (h_fun): Extract line number from stored function. Pass line number to ml_bindings_specline. (h_define, v_define): Store function as a cons cell containing the line number and body.
* * txr.1: Document -l/--lisp-bindings.Kaz Kylheku2011-11-101-0/+4
|
* * match.c (opt_nobindings, opt_arraydims): GlobalKaz Kylheku2011-11-101-0/+18
| | | | | | | | | | | | | | | | | variables moved from parser.l. (opt_lisp_bindings): New variable. (dump_bindings): Dump Lisp syntax bindings on standard output if opt_lisp_bindings is set. (v_cat): Do not complain about trailing material; this is not compatible with horizontal cat. * parser.l (opt_nobindings, opt_arraydims): Moved to match.c. * txr.c (txr_main): New options, --lisp-bindings and the equivalent -l. * txr.h: opt_lisp_bindings declared.
* Task #11583Kaz Kylheku2011-11-101-0/+9
| | | | | | | * match.c (dir_tables_init): Mapping flatten_s, forget_s, local_s, merge_s, set_s, cat_s and filter_s to hv_trampoline function, thereby making all these directives work in horizontal contexts in one fell swoop.
* Task #11583Kaz Kylheku2011-11-101-0/+11
| | | | | | | | | More generic approach. * match.c (h_bind): Function removed. (hv_trampoline): New function. (dir_tables_init): hv_trampoline installed in h_directive_table instead of h_bind.
* * parser.l: Fixed wrong error message.Kaz Kylheku2011-11-101-0/+4
|
* * match.c (v_fun): Bugfix: if there is material afterKaz Kylheku2011-11-101-0/+8
| | | | | | | the function call, decline it; it is a horizontal context. * txr.1: Discussion and examples of calls that are in a horizontal context.
* * txr.1: Documented horizontal function definitions and callsKaz Kylheku2011-11-091-0/+4
|
* Task #11583Kaz Kylheku2011-11-091-0/+9
| | | | | | | @(bind) in horizontal mode. * match.c (mf_from_ml, h_bind): New functions. (dir_tables_init): h_bind entered into table.
* * match.c (h_fun, v_fun): Slightly more informative tracing from failedKaz Kylheku2011-11-091-0/+5
| | | | function calls.
* * txr.vim: Missing coll keyword added.Kaz Kylheku2011-11-091-0/+4
|
* Task #11431. First cut at horizontal match functions.Kaz Kylheku2011-11-081-0/+16
| | | | | | | | | | | | | | * match.c (h_fun): New function. (match_line): Rearranged not to do hash lookup if the directive is a regex or list. If hash lookup fails, try it as a horizontal function. (h_define): New function. Handles horizontal function syntax embedded in line. (v_define): Handle the horizontal function syntax occuring on a line by itself. The function info is now stored as a cons cell whose car is the vertical function and cdr the horizontal one. (v_fun): Adjust to new function storage convention. (dir_tables_init): h_define entered in table. * parser.y: Added syntax for horizontal define.
* * txr.vim: Make sure whitespace is recognized after @.Kaz Kylheku2011-11-061-0/+4
|
* Task #11581 & bugfix.Kaz Kylheku2011-11-061-0/+14
| | | | | | | | | | | | * match.c (noval_s): New symbol variable. (vars_to_bindings): Use a default value of noval_s to indicate a required variable, rather than nil, which would not allow an optional variable with a default value of nil. (h_coll, v_collect): Check default value against noval_s, rather than nil. (v_gather): Support :vars keyword. (syms_init): Initialize new symbol variable. * txr.1: Documented gather's :vars parameter.
* Task #11581Kaz Kylheku2011-11-061-0/+19
| | | | | | | | | | | | | | | | | * 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.
* * lib.c (env): Fixed inappropriate cut-and-pasted error messages.Kaz Kylheku2011-11-051-0/+6
| | | | | Check for failure of GetEnvironmentStringsW, and call FreeEnvironmentStringsW is called.
* * match.c (dir_tables_init): Bugfix: horizontal @(some)Kaz Kylheku2011-11-051-0/+5
| | | | directive not included in dispatch table.
* * configure: Bugfixes. Before the compiler tests, we mustKaz Kylheku2011-11-051-0/+8
| | | | | | | remove the conftest executable, to make sure that the next test will try to re-make it. The configure runs fast enough that the new conftest.c does not always have a timestamp which is newer than previous conftest executable.
* Task #11442. Make work on MingW.Kaz Kylheku2011-11-051-0/+9
| | | | | | | * configure: Test for environ and GetEnvironmentStrings. * lib.c: Conditionally include <windows.h>. (env): Implemented for POSIX and Windows with #ifdefs.
* Task #11442. Access to environment variables.Kaz Kylheku2011-11-051-0/+16
| | | | | | | | | | | | | | * lib.c (env_list): New static variable. (env): New function. (match): Declaration of nonexistent function removed. (obj_init): New variable gc-protected. * lib.h (env): Declared. * match.c (env_k): New symbol variable. (v_next): Implemented :env. * txr.1: @(next :env) described.
* * hash.c (ll_hash): Added a break in the case that handlesKaz Kylheku2011-11-041-0/+6
| | | | | pointer hashing of identity-equal objects. Without this, if the pointer size is not 4 or 8, we fall through to the next case.
* * txr.c (help): Change year from 2009 to 2011.Kaz Kylheku2011-11-041-0/+4
|
* * tests/008/students.txr: Use disciplined collect with :vars.Kaz Kylheku2011-11-031-0/+4
|
* * tests/008/students.txr: Regexes removed.Kaz Kylheku2011-11-031-0/+4
|
* * txr.vim: Added missing keywords.Kaz Kylheku2011-11-021-0/+4
|
* * genman.txr: Use filter for mapping month digits to names.Kaz Kylheku2011-11-011-0/+5
| | | | Added comment about where to find the right man2html.
* * txr.vim: Added installation instructions.Kaz Kylheku2011-11-011-0/+4
|
* Syntax highlighting for Vim.Kaz Kylheku2011-11-011-0/+6
| | | | * txr.vim: New file.
* Version 041txr-041Kaz Kylheku2011-10-301-0/+45
|
* We don't include headers in headers in this project.Kaz Kylheku2011-10-301-0/+10
| | | | | | | | * parser.h: Do not include <stdio.h> * regex.c: Include <limits.h> * regex.h: Do not include <limits.h>
* Bug #34691Kaz Kylheku2011-10-301-0/+18
| | | | | | | | | | | | | | | | Changing the parameter passing convention for vertical directives. They take one parameter which is a pointer, rather than a copy of the structure. They do not have to perform a structure assignment when returning next_spec_k. * match.c (v_match_func): Typedef updated to new function signature. (v_skip, v_trailer, v_freeform, v_block, v_accept, v_accept, v_next, v_parallel, v_collect, v_flatten, v_forget, v_forget, v_merge, v_bind, v_set, v_cat, v_output, v_define, v_try, v_defex, v_throw, v_deffilter, v_filter, v_eof, v_fun): Refactored. (match_files): Updated dispatch logic to new style calls. (match_funcall): Updated to new way of calling v_fun.
* * HACKING: Grammar fixes. Expanded on lazy strings a little bit.Kaz Kylheku2011-10-291-0/+6
| | | | | Added something about mem_t *, and a few extra words here and there, including a blurb about a Valgrind debugging caveat.
* Bug #34657Kaz Kylheku2011-10-271-0/+8
| | | | | | * txr.1: Added explanations about the differences between empty streams and empty lines, and to watch out when passing empty strings to @(next :string ...).
* Bugfix: prepared_error_message variable needs to be gc-protected.Kaz Kylheku2011-10-261-0/+11
| | | | | | | | | * parser.h (parse_init): Declared. * parser.l (parse_init): New function. * txr.c (main): Call parse_init. (txr_main): No need to gc-protect yyin_stream since parse_init does it.
* Parse error handling improvements.Kaz Kylheku2011-10-261-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | * parser.l (prepared_error_message): New static variable. (yyerror): Emit and clear prepared error message. (yyerrprepf): New static function. (yybadtoken): Function moved into parser.y. (grammar): For irrecoverable lexical errors, stash error message with yyerrprepf and return the special error token ERRTOK to generate a syntax error. I could find no other interface to the parser to make it cleanly exit. * parser.y (ERRTOK): New terminal symbol, does not appear anywhere in the grammar. (spec): Bail after 8 errors, recover to nearest newline, and use yyerrok to clear error situation. (YYEOF): Provided by Bison, conditionally defined for other yacc-s. (yybadtoken): Function moved from parser.l. Checks for the next token being YYEMPTY or YYEOF, and also handles ERRTOK. * stream.c (vformat_to_string): New function. (format): If stream is nil, format to string and return it. * stream.h (vformat_to_string): Declared.
* * match.c (v_cat): Bugfix: unterminated variable argument list.Kaz Kylheku2011-10-261-0/+6
| | | | * tests/001/query-3.txr: Updated to new cat syntax.
* Fixed lame @(cat) directive, without obsolescence phase.Kaz Kylheku2011-10-261-0/+8
| | | | | | * match.c (v_cat): Rewritten. * txr.1: Documented.
* * configure: put in set -u to trap unbound variables,Kaz Kylheku2011-10-251-0/+5
| | | | and fixed resulting errors that were found.
* * match.c (filter_s): New symbol variable.Kaz Kylheku2011-10-251-0/+9
| | | | | | | | (v_filter): New function. (syms_init): New symbol variable initialized. (dir_tables_init): New function entered into table. * txr.1: Documented new filter directive.
* dep.mk: Regenerated.Kaz Kylheku2011-10-251-0/+4
|
* Shorthand for filters which map multiple texts to a commonKaz Kylheku2011-10-251-0/+18
| | | | | | | | | | | | | | | | | replacement text. * filter.c (build_filter_from_list): Allow tuples to denote multiple keys mapping to the same value. * lib.c (do_curry_123_2, do_curry_123_1): New static functions. (curry_123_2, curry_123_1): New functions. * lib.h (curry_123_2, curry_123_1): New functions declared. * match.c (v_deffilter): Allow tuples of strings rather than just pairs. * txr.1: Updated.
* * parser.y: Remove mention of nonexistent terminal \\Kaz Kylheku2011-10-251-0/+5
| | | | from %right associativity clause.
* * txr.1: Updated.Kaz Kylheku2011-10-251-0/+2
|
* * filter.c (fun_k): New keyword variable.Kaz Kylheku2011-10-251-0/+8
| | | | | | | (function_filter): Use :fun keyword symbol instead of fun. (filter_init): New keyword variable initialized. * filter.h (upcase_k, downcase_k, fun_k): Declared.
* * match.c (v_bind): Use sem_error to throw errors with line numberKaz Kylheku2011-10-251-0/+5
| | | | info.
* Bugs #34641, #34629.Kaz Kylheku2011-10-241-0/+9
| | | | | | | * lib.c (search_str_tree): If multiple strings from the needle tree matching within within the haystack string, then take the leftmost match. If there are multiple matches at the same leftmost position, take the longest one.
* * filter.c (function_filter): New function.Kaz Kylheku2011-10-241-0/+23
| | | | | | | | | | | | | | | | | | | | | | (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.
* Turning attention to some plumbing.Kaz Kylheku2011-10-241-0/+15
| | | | | | | | | | | | | * unwind.c (uw_env_stack): New static variable. (uw_unwind_to_exit_point): Maintain correct uw_env_stack during unwinding. (uw_find_env): Just retrieve the env stack pointer; no search. (uw_push_env): Store a pointer to the previous environmental frame and just initialize the bindings to nil. No need to cons up a copy of the bindings from the previous frame. (uw_get_func): Perform a search through the environment stack. * unwind.h (struct uw_dynamic_env): New member, up_env.
* * tests/007/except-1.txr: Use next :list insteadKaz Kylheku2011-10-231-0/+6
| | | | | of piping from echo command. As a result, this test case should run on MingW.
* * match.c (list_k, string_k): New keyword symbol variables.Kaz Kylheku2011-10-231-0/+9
| | | | | | | | (v_next): Implement :list and :string keywords. (syms_init): New keyword variables initialized. NOTE: the :var keyword is deprecated. * txr.1: Documented :list and :string.