summaryrefslogtreecommitdiffstats
path: root/txr.vim
Commit message (Collapse)AuthorAgeFilesLines
* * txr.vim: Regenerated.Kaz Kylheku2013-12-101-19/+20
|
* syslog support; bitwise logior and logand functions become variadic.Kaz Kylheku2013-12-101-81/+87
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile: Use -iquote to restrict our #include search paths from being processed for #include <...>. Add syslog.o to OBJS-y if have_syslog is y. * configure (have_syslog): New variable, set by detecting syslog API. * eval.c (eval_init): logand and logior registrations changed to go to variadic versions. New syslog variables and functions registered. * lib.c (logandv, logiorv): New functions. * lib.h (logandv, logiorv): Declared. * txr.c (main): Call syslog_init. * syslog.c: New file. * syslog.h: New file. * txr.1: Updated. * txr.vim: Regenerated.
* * genvim.txr: Missing catch and finally keywords added.Kaz Kylheku2013-12-021-11/+11
| | | | * txr.vim: Regenerated.
* Refresh.Kaz Kylheku2013-11-291-65/+67
|
* * genvim.txr: Missing highlighting for hex integers.Kaz Kylheku2013-11-241-0/+1
| | | | * txr.vim: Updated.
* * genvim.txr: Change how the hard-coded symbols (end, and, or) areKaz Kylheku2013-11-221-9/+9
| | | | | | * added, and also add the missing rep to these. * txr.vim: Regenerated.
* * genvim.txr: Handle symbols whose C names end with _star_s,Kaz Kylheku2013-11-051-7/+7
| | | | | | and also ones with underscores. * txr.vim: Updated.
* * genvim.txr: Include syntactic directives which aren't extracted fromKaz Kylheku2013-10-271-0/+1
| | | | | | sources because actions aren't registered for them. * txr.vim: Regenerated.
* * genvim.txr: Split long lines of keywords.Kaz Kylheku2013-10-231-2/+104
| | | | * txr.vim: Updated.
* * txr.vim: Updated using genvim.txr.Kaz Kylheku2013-10-231-91/+4
|
* Version 67Kaz Kylheku2013-07-121-1/+1
| | | | | | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version, set date and documented string-cmp. * configure (txr_ver): Bumped. * eval.c (eval_init): Forgotten string-cmp registered as intrinsic. * txr.vim: Highlighting for string-cmp. * RELNOTES: Updated.
* * txr.vim: Bringing up to date.Kaz Kylheku2013-07-121-6/+16
|
* Bring syntax highlighting function list up to date.Kaz Kylheku2012-09-171-5/+7
|
* * eval.c (eval_init): New intrinsics: make-similar-hash, copy-hash,Kaz Kylheku2012-09-121-2/+4
| | | | | | | | | | | | | | hash-uni, hash-diff, hash-isec. * hash.c (make_similar_hash, copy_hash, hash_uni, hash_diff, hash_isec): New functions. * hash.h (make_similar_hash, copy_hash, hash_uni, hash_diff, hash_isec): Declared. * txr.1: Updated. * txr.vim: Highlighting for these new functions.
* * eval.c (eval_init): Follow function renames.Kaz Kylheku2012-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * hash.c (make_hash): Likewise. * lib.c (assq): Renamed to assql for consistency. (aconsq_new): Renamed to aconsql_new. (aconsq_new_l): Renamed to aconsql_new_l. (alist_remove_test): Use equal rather than eq. Association lists use equal equality by default. (alist_nremove): Use memqual rather than memq. (alist_nremove1): Use equal rather than eq. (merge): Bugfix: unnecessary consing caused by using append instead of nconc on list pieces that are already destructively chopped up. This has implications for the efficiency of sort over lists! (multi_sort_less): Implement key functions. (multi_sort): Interface change: arguments rearranged, and new argument to specify key functions. * lib.h (assoc, assq, assql, aconsq_new, aconsq_new_l): Declarations renamed. (multi_sort): Declaration updated. * txr.1: Documented alist library, list sorting and completed documenting lazy library. * txr.vim: multi-sort highlighted.
* Provide access to line number info and source path.Kaz Kylheku2012-04-111-0/+1
| | | | | | | | | | | | | | * eval.c (eval_init): New intrinsic functions source-loc and source-loc-str. New variable *self-path*. * txr.1: Stub doc sections. * txr.c (self_path): New variable. * txr.h (self_path): Declared. * txr.vim: Syntax highlighting for source-loc, source-loc-str and *self-path*.
* * eval.c (eval_init): Expose regex-compile and regexp as intrinsics.Kaz Kylheku2012-04-101-1/+1
| | | | | | | | | | | | | * lib.c (obj_init): Change spelling of nongreedy operator and put it into the user package so that it is available for use with regex-compile. * regex.c (match_regex, search_regex): Bugfix: optional start position argument argument not defaulting to zero. * txr.1: Documented regex-compile and regexp. * txr.vim: Highlighting regex-compile and regexp.
* * arith.c (bignum): Previously static function now exposed as external.Kaz Kylheku2012-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | * arith.h (bignum): Declared. * configure: Added check for tm_gmtoff and tm_tmzone fields being present in struct tm. * eval.c (eval_init): New intrinsic functions: time, time-usec. * lib.c (num): If the cnum is outside of the fixnum range, then construct a bignum. (time_sec, time_sec_usec): New functions. * lib.h (mut): Slight change to macro to eliminate compiler warning. (time_sec, time_sec_usec): Declared. * txr.1: Stub section for time and time-usec. * txr.vim: Highlighting for time and time-usec.
* * txr.vim: Remove duplicate lines.Kaz Kylheku2012-04-081-4/+0
|
* * txr.vim: Fixed accidental breakage.Kaz Kylheku2012-04-081-1/+1
|
* Rounding out hash table functionality with lazy lists thatKaz Kylheku2012-04-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | can walk table content in different ways. * eval.c (op_dohash): Follow interface change of hash_next. (eval_init): hash-keys, hash-values, hash-pairs and hash-alist intrinsics introduced. * filter.c (trie_compress): Follow interface change of hash_next. * hash.c (hash_next): Silly interface which takes a pointer to the iterator has changed to just take the iterator. The function unambiguously returns nil when the iteration ends, so there is no need to set the iterator variable to nil. (maphash): Follows interface change of hash_next. (hash_keys_lazy, hash_values_lazy, hash_pairs_lazy, hash_alist_lazy): New static functions. (hash_keys, hash_values, hash_pairs, hash_alist): New functions. * hash.h (hash_next): Declaration updated. (hash_keys, hash_values, hash_pairs, hash_alist): Declared. * lib.c (make_half_lazy_cons): New way of constructing lazy cons, with the car field specified. It simplifies situations when the previous cons computes the car of the next one. Why hadn't I thought of this before? * lib.h (make_half_lazy_cons): Declared. * txr.1: Doc stubs for new hash functions. * txr.vim: Highlighting for new hash functions.
* * txr.vim: @[...] syntax not marked as "contained" because itKaz Kylheku2012-04-051-1/+1
| | | | can freely occur, and is useful in @(output).
* * arith.c (numeq): New function.Kaz Kylheku2012-03-291-1/+1
| | | | | | | | | | | | | | | | | (exptmod): Bugfix: was no normalizing the bignum, ouch. Also was reporting "non-integral operands" for other errors. * eval.c (eval_init): Registered = intrinsic function. * lib.c (numeqv): New function. * lib.h (numeq, numeqv): Declared. * txr.1: Documented expt, sqrt, isqrt, exptmod, fixnump, bignump, integerp, floatp, numberp, zerop, evenp, oddp, >, <, >=, <= and =. * txr.vim: Highlight =
* * arith.c (gcd): Allow zeros. Don't issue "non-integral"Kaz Kylheku2012-03-291-1/+1
| | | | | | | | | | | | | | | exception if MPI fails. (floorf, ceili): Map integer argument to itself. (tang, asine, acosi): New functions. * eval.c (eval_init): New intrinsics: tan, asin, acos. * lib.h (tang, asine, acosi): Declared. * txr.1: Documented gcd, abs, floor, ceil, sin, cos, tan asin, acos, atan, log, and exp. * txr.vim: Highlighting for tang, asine, acosi.
* * txr.1: num-str added to doc stub.Kaz Kylheku2012-03-291-1/+1
| | | | * txr.vim: num-str added.
* * eval.c (eval_init): Register match-str and match-str-treeKaz Kylheku2012-03-241-0/+1
| | | | | | | | | | intrinsics. * lib.c (match_str, match_str_tree): Default position to zero. * txr.1: Doc stubs created. * txr.vim: Highlighting for match-str and match-str-tree.
* * arith.c (expo): New function.Kaz Kylheku2012-03-221-1/+1
| | | | | | | | | | * eval.c (eval_init): expo registered as intrinsic exp. * lib.h (expo): Declared. * txr.1: Added to stub heading. * txr.vim: Highlighting for exp.
* Fix sqrt confusion. There must be a separate isqrtKaz Kylheku2012-03-221-1/+1
| | | | | | | | | | | | | | | | | for the integer square root. * arith.c (sqroot_fixnum): Renamed back to isqrt_fixnum. (sqroot): Rewritten to handle only floating-point square root. (isqrt): New function, based on previous sqroot, handles only integers. * eval.c (eval_init): New intrinsic, isqrt. * lib.h (isqrt): New declaration. * txr.1: Doc stubs. * txr.vim: Highlighting for isqrt.
* * arith.c (floorf, ceili, sine, cosi, atang, loga): New functions.Kaz Kylheku2012-03-221-2/+3
| | | | | | | | | | | * eval.c (eval_init): New intrinsic functions registered: floor, ceil, sin, cons, atan, log. * lib.h (floorf, ceili, sine, cosi, atang, loga): Declared. * txr.1: Doc stub section for new functions. * txr.vim: Highighting added.
* * arith.c (divi): New function.Kaz Kylheku2012-03-211-1/+1
| | | | | | | | | | * eval.c (eval_init): divi registered as / intrinsic. * lib.h (divi): Declared. * txr.1: divi added to stub heading. * txr.vim: / operator highlighted.
* * txr.1: Doc stubs for new functions floatp, integerp,Kaz Kylheku2012-03-211-1/+3
| | | | | | float-str, int-flo and flo-int. * txr.vim: Highlighting for new functions.
* * eval.c (eval_init): New intrinsic functionsKaz Kylheku2012-03-161-1/+2
| | | | | | | | | | | | | | | | | | chain, andf, orf, iff. * lib.c (chainv): New function. (do_and, do_or): Generalized to handle functions of any arguments via apply. (andf, orf): Turn do_and and do_or into variadic function instead of a monadic function. (do_iff): New static function. (andv, orv, iff): New functions. * lib.h (chainv, andv, orv, iff): New functions declared. * txr.1: Doc stubs created. * txr.vim: Updated.
* Version 61txr-61Kaz Kylheku2012-03-151-1/+3
| | | | | | | | | | | | | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * eval.c (op_modplace): Fix warning about uninitialized variable. No bug. * filter.c: gcc compilation regresion: missing <stdio.h> breaks inclusion of "stream.h" header. Strangely, didn't show up when configured for compiling with g++ on Ubuntu. * match.c (match_filter): Fixed ununsed variable warning. * txr.vim: Bunch of missing keywords added. * dep.mk: Regenerated.
* Implementing #H((...) ...) read/print syntax for hash tables.Kaz Kylheku2012-03-141-1/+1
| | | | | | | | | | | | | | | | * hash.c (print_key_val, hash_print_op): New static functions. (hash_ops): hash_print_op wired in in place of cobj_print_op. * parser.l (HASH_H): New token recognized. * parser.y (HASH_H): New terminal symbol. (hash): New nonterminal symbol. (expr): Acquires hash as a constituent. (hash_from_notation): New static function. * txr.1: Hash syntax described. * txr.vim: Updated.
* Remove accidentally added lines.Kaz Kylheku2012-03-131-3/+0
|
* Implementing URL filtering.Kaz Kylheku2012-03-131-2/+4
| | | | | | | | | | | | | | | | * eval.c (eval_init): New intrinsic functions: url-encode, url-decode. * filter.c (tourl_k, fromurl_k): New keyword variables. (is_url_reserved, digit_value): New static functions. (url_encode, url_decode): New functions. (filter_init): Intialize new keyword variables and register new :tourl and :fromurl filters. * filter.h (tourl_k, fromurl_k, url_encode, url_decode): Declared. * txr.1: Updated. * txr.vim: Likewise.
* * txr.vim: Update. Adding remq, remql, remqual, regsub, *stddebug*Kaz Kylheku2012-03-041-3/+4
|
* Version 60Kaz Kylheku2012-03-041-0/+1
| | | | | | | | | | | | | | | | | | | * txr.c (version): Bumped. * txr.1: Bumped version and set date. * configure (txr_ver): Bumped. * RELNOTES: Updated. * txr.vim: Handle : symbol properly. * eval.c (op_defun): Bugfix: documentation says that defun supports the same parameter list as lambda, and that is the intent. But this was broken, since op_defun was expecting the parameter list to be a proper list containing only bindable symbols, ruling out the use of the consing dot for rest parameter as well as the colon keyword symbol for optional parmeters.
* * txr.vim: Recognize backslash-newline break in regexes.Kaz Kylheku2012-02-271-3/+3
|
* * txr.vim: Substantially revised for better lexical accuracyKaz Kylheku2012-02-271-15/+26
| | | | and highlighting of errors.
* * eval.c (del_s): New symbol variable.Kaz Kylheku2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | (eval_error): nostatic added to suppress a g++ warning. (dwim_loc): Takes new value as the original unevaluated form so it can control evaluation. Support for del operator added. (op_modplace): Bugfixes: new value form was being unconditionally evaluated and out of order w.r.t. other forms. Now there is left to right order. The form is evaluated later, since for most operators it is on the right, with the exception of push. dwim places can now optionally control the evaluation of newform. del operator supported in gethash case as a special case. error case added for del: if it's not handled in gethash or dwim_loc, it is an error. (eval_init): del_s initialized, and del operator added to table. * txr.vim: syntax highlighting for del. * txr.1: Documented del.
* * eval.c (eval_init): Intrinsic bindings for sub, ref, refsetKaz Kylheku2012-02-221-1/+1
| | | | | | | | | | | | | | | | and replace. * lib.c (do_sort): Static function renamed to sort_list. (swap, quicksort, sort_vec): New static functions. (sort): Made generic over lists, vectors and strings. (refset): New function. * lib.h (sort): Declaration updated (parameter name change). (refset): Declared. * txr.1: Mention refset. * txr.vim: Updated with refset.
* Introducing optional arguments.Kaz Kylheku2012-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * debug.c (help, show_bindings): put_string arguments reversed. * eval.c (bind_args): Support colon notation in interpreted function lambda lists for optional arguments. Improved error checking. (apply): Allow optional arguments to be left out. (dwim_loc): Reversed arguments to replace_str, replace_vec, replace_list. (eval_init): Numerous intrinsics now have arguments that are optional. New function rand introduced which reverses arguments relative to random. New intrinsic function hash introduced for alternative construction of hashes. * gc.c (sweep): Reversed arguments to put_char. * hash.c (weak_keys_k, weak_vals_k, equal_based_k): New keyword symbol variables. (hashv): New function. (hash_init): Intern new symbols. * hash.h (weak_keys_k, weak_vals_k, equal_based_k, hashv): Declared. * lib.c (colon_k): New keyword symbol variable. (replace_list, replace_str, replace_vec): Arguments rearranged. (tree_find): testfun becomes optional argument. (int_str): base becomes optional argument. (func_f0, func_f1, func_f2, func_f3, func_f4, func_n0, func_n1, func_n2, func_n3, func_n4, func_f0v, func_f1v, func_f2v, func_f3v, func_f4v, func_n0v, func_n1v, func_n2v, func_n3v, func_n4v, func_interp): Initialize optargs to zero. (func_n0o, func_n1o, func_n2o, func_n3o, func_n4o): New functions. (cobj_print_op): Reversed arguments to put_string. (find): testfun and keyfun become optional arguments. (replace): Parameters rearranged and arguments rearranged in calls to replace_list, replace_str and replace_vec. (obj_init): colon_k initialized. (obj_print, obj_pprint): Arguments reversed, and stream defaults to std_output. Arguments reversed in calls to put_char and put_string. (dump): Arguments reversed in call to put_char. * lib.h (struct func): sizes of minparam, fixparam bitfields adjusted. New bitfield optargs. New unnamed bitfield added so the previous ones add up to 16 bits. (colon_k): Declared. (func_n0o, func_n1o, func_n2o, func_n3o, func_n4o): Declared. (replace_list, replace_str, replace_vec, replace): Declarations updated. * match.c (debuglf, dump_shell_string, dump_byte_string, dump_var, do_output_line, extract): Reversed arguments to put_char and
* * lib.c (sub, ref, replace): New functions.Kaz Kylheku2012-02-191-0/+1
| | | | | | | | | | * lib.h (sub, ref, replace): Declared. * match.c (format_field): Generic indexing using new functions. * txr.1: Documentation stub. * txr.vim: Highlighting for new functions.
* Allow braced output variables to actually be arbitrary substitutions.Kaz Kylheku2012-02-181-1/+1
| | | | | | | | | | | | | | * eval.c (subst_vars): Treat the variable as an arbitrary expression rather than just a symbol. * match.c (subst_vars): Likewise. * parser.y (o_var): Further simplification. The first item in an output var is an expr and not an IDENT. * txr.1: Updated. * txr.vim: Likewise.
* * eval.c (eval_init): Register match-fun.Kaz Kylheku2012-02-161-1/+1
| | | | | | | | | | | | | | | * match.c (v_do): Store match context. (match_fun): New function. * match.h (match_fun): Declared. * stream.c (streamp): New function. * stream.h (streamp): Declared. * txr.1: Stub section for match-fun. * txr.vim: Highlight match-fun.
* TXR Lisp gets exception handling.Kaz Kylheku2012-02-161-1/+2
| | | | | | | | | | | | | | | | | * eval.c (op_catch, expand_catch_clause, expand_catch): New static functions. (expand): Handle catch operator. (eval_init): Added catch operator to op_table, and registered new functions throw, throwf and error. * txr.1: Documented catch operator and created stub section for throw, throwf and error. * txr.vim: Updated. * unwind.c (uw_throwfv, uw_errorfv): New functions. * unwind.h (uw_throwfv, uw_errorfv): Declared.
* Fix accidental mistake.Kaz Kylheku2012-02-141-1/+1
|
* * eval.c (rangev): If a descending range is specified,Kaz Kylheku2012-02-141-2/+2
| | | | | | | | | | | but the step is omitted, the step should be negative one rather than one. (range_star_v_func, range_star_v): New static functions. (eval_init): New function, range*, registered. * txr.1: Stub section for range is also for range*. * txr.vim: Recognize range* function.
* * eval.c (subst_vars): Handle lone symbols (not wrappedKaz Kylheku2012-02-131-5/+7
| | | | | | | | | | | | in sys::var form) as variables. This allows interpretation of metanums in quasiliterals, because these are replaced by variables in the op expander. * parser.l: Recognize METANUM in QSILIT state. * parser.y (quasi_item): METANUM parsed in quasiliteral. * txr.vim: Metanums highlighted properly.