| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
since (sortuniq list) can be done as (sort (uniq list)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intrinsics.
* lib.c (chr_isblank, chr_isunisp): New functions.
* lib.h (chr_isblank, chr_isunisp): Declared.
* regex.h (spaces): Declaration for existing variable added.
* txr.1: Documented chr-isblank and chr-isunisp.
* genvim.txr: Add missing sysif.c.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(opt_gc_delta): New global variable.
(make_obj): Use opt_gc_delta rather than MALLOC_DELTA_THRESH.
(gc_set_delta, gc_wrap): New static functions.
(gc_late_init): New function.
* gc.h (gc_late_init): Declared.
* genvim.txr: scan gc.c also.
* lib.c (init): call gc_late_init.
* txr.1: Document new --gc-delta option and the functions
gc and gc-set-delta.
* txr.c (help): Help text for --gc-delta.
(txr_main): Parse --gc-delta option.
* txr.h (opt_gc_delta): Declared.
|
|
|
|
|
|
|
|
|
|
|
|
| |
*flo-min*, *flo-max*, *flo-epsilon*, *pi* and *e*.
* genvim.txr: Include arith.c in scan for symbols.
* lib.c (init): arith_init() must now be called after eval_init().
* txr.1: Documented new variables..
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
| |
* parser.y (quasi_item): Support splices as items.
* genvim.txr: Syntax highlighting support for unquotes in
quasiliterals.
* txr.vim: Updated.
|
|
|
|
| |
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
integers and floating literals.
* genvin.txr (txr_num): The general solution is to over-match
a number by one character: a non-token constituent, and then
subtract that from the highlight region using me=e-1.
This solves the prefix ambiguities between numbers and symbols.
(txr_badnum): New match: matches floating literals with trailing
junk, which are highlighted as errors.
(txr_directive, txr_list, txr_bracket, txr_mlist, txr_mbracket):
All of these contain a txr_badnum.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
| |
* genvim.txr (txl_regex): Missing syntactic region added.
(txr_regex): Start pattern is just a slash; no optional # in front.
* txr.vim: Regenerated.
|
| |
|
|
|
|
| |
* txr.vim: Regenerate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the SPECIAL, NESTED and BRACED states, do not pop the state in all
three, only in SPECIAL (to terminate the @\ continuation).
* txr.1: Eliminate wrong claim that string literals do not split across lines,
which is directly contradicted two paragraphs later. Document that
quasiliterals also split.
* genvim.txr (txr_regex, txl_regex): These definitions change from "syn match"
to "syn region" so that the backslash-newline continuation can be properly
handled.
(txr_string, txr_quasilit): Correctly handle split literals.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Input side for now; output later.
* parser.y (if_clause, elif_clauses_opt, else_clause_opt): New nonterminals.
(IF, ELIF, ELSE): New tokens.
(yybadtoken): Handle IF, ELIF, ELSE.
* parser.l: Recognize and return new tokens IF, ELIF and ELSE.
* txr.1: Documented.
* genvim.txr: Updated with if, elsif and else directive keywords.
* txr.vim: Regenerated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(op_prof, me_pprof): New static functions.
(eval_init): Intern prof symbol, store in prof_s.
Captured interned + symbol in plus_s. Register prof operator and pprof
macro.
* gc.c (gc_bytes): New global variable.
(more): Use nse function chk_malloc_gc_more instead of chk_malloc.
(make_obj): Increment gc_bytes.
* lib.c (malloc_bytes): New global variable.
(chk_malloc, chk_realloc): Increment malloc_bytes.
(chk_calloc): Bugfix: incorrect size in recursion into oom_realloc.
Incorrect calculation of malloc_high_bound. Increment malloc_bytes.
(chk_malloc_gc_more): New function.
* lib.h (alloc_bytes_t): New typedef.
(malloc_bytes, gc_bytes): Declared.
(chk_malloc_gc_more): Declared.
* stream.c (format_s): New symbol global.
(stream_init): format_s inited.
format_s used to register formatv function.
* stream.h (format_s): Declared.
* txr.1: Documented prof and pprof.
* genvim.txr: Recognize reg_fun calls with intern
followed by a preceding assignment or other syntax.
* txr.vim: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
moved to filter.c.
* filter.c (trie_compress_intrinsic, html_encode, html_decode): New
static functions.
(filter_init): Register make_trie, trie_add, trie_compress_intrinsic,
filter_string_tree, filter_equal, html_encode and html_decode
as intrinsics. Move registration of url_encode and url_decode here.
* genvim.txr: Look for registrations in filter.c too.
* txr.1: Documented.
* txr.vim: Updated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.h (apply_intrinsic, lazy_mapcar): Declarations added.
* stream.c (open_files, open_file_star): New functions.
(stream_init): Registered new functions as intrinsics.
* txr.1: Documented open-files and open-files*. Added to make-catenated-stream documentation.
* genvim.txr: Replace bunch of code with open-files.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of identifiers to rule this out from being the first character of a
symbol which has no prefix. Recognize the ^ character as a token in the
NESTED state.
* lib.c (obj_print, obj_pprint): Render sys:qquote as ^.
* parser.y (choose_quote): Function removed.
(n_expr): Recognize '^' as quasiquote. Removed all the "smart quote"
hacks that try to make quote behave as quote or quasiquote, or try to
cancel out unquotes and quotes.
* tests/009/json.txr: Fixed to ^ quasiquote.
* tests/010/reghash.txr: Likewise.
* tests/011/macros-2.txr: Likewise.
* tests/011/mandel.txr: Likewise.
* tests/011/special-1.txr: Likewise.
* txr.1: Updated docs.
* genvim.txr: Revamped definitions for txr_ident and txl_ident so that
unqualified identifiers cannot start with # or ^, but ones with @ or :
in front can start with these characters.
* txr.vim: Regenerated.
|
|
|
|
| |
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
re-binding. C code now has to go through the dynamic environment lookup
to access things like *random-state*, or *stdout*. As part of this,
I'm moving some intrinsic variable and function initializations out of
eval.c and into their respective modules. Macros are are used to make
global variables look like ordinary C variables. This is very similar
to the errno trick in POSIX threads implementations.
* eval.c (looup_var, lookup_var_l): Restructured to eliminate silly
goto, the cobjp handling is gone.
(reg_fun, reg_var): Internal function becomes external.
reg_var registers a simple cons cell binding now, without any
C pointer tricks to real C global variables.
(c_var_mark): Static function removed.
(c_var_ops): Static struct removed.
(eval_init): Numerous initializations for streams, syslog, rand,
signals and others moved to their respective modules.
The new symbol variables user_package_s, keyword_package_s
and system_package_s are interned here, and the variables are
created in a special way.
* eval.h (reg_var, reg_fun): Declared.
* gc.c (prot1): Added assert that the loc pointer isn't null.
This happened, and blew up during garbage collection.
* lib.c (system_package, keyword_package, user_package): Variables
removed these become macros.
(system_package_var, keyword_package_var, user_package_var): New
global variables.
(system_package_s, keyword_package_s, user_package_s): New
symbol globals.
(get_user_package, get_system_package, get_keyword_package): New
functions.
(obj_init): Protect new variables. Initialization order of modules
tweaked: the modules sig_init, stream_init, and rand_init are moved
after eval_init because they register variables.
* lib.h (keyword_package, system_pckage, user_package): Variables
turned into macros.
(system_package_var, keyword_package_var, user_package_var): Declared.
(system_package_s, keyword_package_s, user_package_s): Declared.
(get_user_package, get_system_package, get_keyword_package): Declared.
* rand.c (struct random_state): Renamed to struct rand_state to
avoid clash with new random_state macro.
(random_state): Global variable removed.
(random_state_s): New symbol global.
(make_state, rand32, make_random_state, random_fixnum, random):
Follow rename of struct random_state.
|
|
|
|
|
|
|
|
| |
(eval_init): Initialiation of delay_s removed.
Symbol now interned in reg_mac call for registering me_delay .
* genvim.txr: Updated to recognize a reg_mac call
with intern.
|
|
|
|
|
|
|
| |
in eval_init. Also, scans reg_mac registrations now.
* txr.vim: Refreshed. The previously missed "delay" operator is now
listed, thanks to reg_mac.
|
|
|
|
|
|
| |
* txr.1: Documented.
* genvim.txr, txr.vim: Updated.
|
| |
|
| |
|
|
|
|
|
|
| |
Do not color embedded decimal integers in symbols as integers.
* txr.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(transform_op): Recognize compounded metas, and strip one level off.
(eval_init): Intern sys:expand function so we have access to the
form expander from TXR Lisp.
* lib.c (obj_print, obj_pprint): Fix: wasn't rendering metanumbers.
* parser.y (list): Support @ in front of anything. If it's an atom,
treat it similarly to a metasymbol or metanumber.
* txr.1: Documented meta-meta arguments in nested op.
* genvim.txr, txr.vim: Support coloring for compounded meta syntax.
|
|
|
|
| |
like @ (a b c) and @ [1 2 3].
|
| |
|
|
|
|
| |
* txr.vim: Regenerated.
|
|
|
|
| |
* txr.vim: Regenerated.
|
|
|
|
| |
* txr.vim: Updated.
|
|
|
|
|
|
| |
* added, and also add the missing rep to these.
* txr.vim: Regenerated.
|
|
|
|
|
|
| |
and also ones with underscores.
* txr.vim: Updated.
|
|
|
|
|
|
| |
sources because actions aren't registered for them.
* txr.vim: Regenerated.
|
|
|
|
| |
* txr.vim: Updated.
|
|
|