summaryrefslogtreecommitdiffstats
path: root/txr.1
Commit message (Collapse)AuthorAgeFilesLines
...
* Let's have placelet and placelet*.Kaz Kylheku2015-07-111-3/+20
| | | | | | | | * share/txr/stdlib/place.tl (placelet*): New macro. * lisplib.c (place_set_entries): Add placelet* to list of names. * txr.1: Updated to document placelet* and fix mistakes.
* * eval.c (eval_init): Register bindable as intrinsic.Kaz Kylheku2015-07-101-0/+20
| | | | * txr.1: Documented.
* New placelet macro.Kaz Kylheku2015-07-101-0/+83
| | | | | | | | | | | | | | * lisplib.c (place_set_entries): Add placelet to list of names. * share/txr/stdlib/place.tl (sys:placelet1, placelet): New macros. (defplace dwim): Do not retrieve the place's value into a local variable and have the getter expand to that variable. Rather, have the getter retrieve the value. A getter that refers to a cached copy breaks the semantics of placelet, and any place operator which can evaluate the location after it is stored. * txr.1: Documented placelet.
* * txr.1: Replace callf example under mapf.Kaz Kylheku2015-07-061-3/+2
|
* * txr.1: three incorrect .metn/.meta usesKaz Kylheku2015-07-061-3/+3
|
* Clarify clear-error and flush return value.Kaz Kylheku2015-07-061-1/+5
| | | | | | | | | | | * stream.c (stdio_clear_error): Return the prior value of h->err. Do not inspect feof(h->f) or ferror(h->f); just clear the error status of the stream. (stdio_close): Set h->err from errno if fclose failed. (dir_clear_error): Return prior value of h->err. * txr.1: Document return value convetion for clear-error, and flush-stream.
* * txr.1: wrap* syntax fixKaz Kylheku2015-07-031-1/+1
|
* Support trailing semicolon after hex/octal characters.Kaz Kylheku2015-07-021-1/+16
| | | | | | | | | | | | | | | | * parser.l (%option): Remove nounput option since we need yyunput. (grammar): Rule for matching hex and octal escape in SPECIAL state recognizes optional semicolon. In 109 compatibility, this is pushed back into the stream, otherwise consumed. * txr.1: Updated documentation, including compat notes. * genvim.txr (txr_char): Include optional semicolon in match. Corrected some errors where 8 and 9 were being included as matches for octal digits. (txr_error): Default match for \x or \o not followed by digits.
* * txr.1: Replace wrong use of .coSSKaz Kylheku2015-07-021-1/+1
|
* * txr.1: avoid term "regular macro".Kaz Kylheku2015-07-011-2/+2
|
* Third round of quasiliteral-related fixes.Kaz Kylheku2015-06-261-5/+10
| | | | | | | | | * parser.l (char_esc): Recognize \@ escape. (grammar): Add a rule for a \@ escape in quasiliterals, and quasi word list literals. * txr.1: Document \@, and remove the lie that @@ encodes for a single @ in quasiliterals.
* * txr.1: Spelling, grammar.Kaz Kylheku2015-06-261-8/+8
|
* * txr.1: partition example: wrong use of where function.Kaz Kylheku2015-06-241-2/+2
|
* * txr.1: Formatting fixes.Kaz Kylheku2015-06-241-7/+16
|
* * hash.c (hash_from_pairs, hash_list): New functions.Kaz Kylheku2015-06-241-2/+34
| | | | | | | | | * hash.h (hash_from_pairs, hash_list): Declared. * eval.c (eval_init): Registered hash-from-pairs and hash-list intrinsic. * txr.1: Documented new functions.
* Hash subset testing.Kaz Kylheku2015-06-231-0/+48
| | | | | | | | | | | * eval.c (eval_init): Register hash-subset and hash-proper-subset intrinsics. * hash.c (hash_subset, hash_proper_subset): New functions. * hash.h (hash_subset, hash_proper_subset): Declared. * txr.1: New functions documented.
* Version 109.txr-109Kaz Kylheku2015-06-211-2/+2
|
* * lisplib.c (ifa_set_entries): Add conda.Kaz Kylheku2015-06-211-0/+34
| | | | | | | | * share/txr/stdlib/ifa.tl (conda): New macro. * tests/012/ifa.tl: Adding test for conda. * txr.1: Documenting conda.
* * txr.1: Fixed several instances of "<< sym)".Kaz Kylheku2015-06-201-6/+6
|
* * eval.c (eval_init): Register have function, synonym of true.Kaz Kylheku2015-06-201-2/+19
| | | | * txr.1: Document have.
* * txr.1: Documented ifa.Kaz Kylheku2015-06-191-0/+145
| | | | | | | * share/txr/stdlib/ifa.tl: Tightened up the tests for situations when the macro is ill-formed, following the improved specification. Also, eval-error is thrown instead of just error.
* * txr.1: No loads requiredKaz Kylheku2015-06-181-34/+11
| | | | | Removing references to the need for explicitly loading any library material.
* * txr.1: Document *txr-version* and *lib-version*Kaz Kylheku2015-06-181-0/+23
|
* * txr.1: Lisp can come from files.Kaz Kylheku2015-06-181-0/+7
|
* txr.1: Misspelled casequal; duplicate posq section.Kaz Kylheku2015-06-161-24/+1
|
* * txr.1: Improved wording in syntactic places.Kaz Kylheku2015-06-151-23/+8
|
* * txr.1: Corrections.Kaz Kylheku2015-06-141-4/+4
|
* Version 108.txr-108Kaz Kylheku2015-06-131-2/+2
|
* * txr.1: formatting fixes: get-error, finalize.Kaz Kylheku2015-06-131-4/+3
|
* * txr.1: Documented Lisp loading.Kaz Kylheku2015-06-131-3/+119
|
* * stream.c (catenated_stream_p, catenated_stream_push): New functions.Kaz Kylheku2015-06-071-0/+41
| | | | * stream.h (catenated_stream_p, catenated_stream_push): Declared.
* * txr.1: Document new syntactic places framework and place-mutating macros.Kaz Kylheku2015-05-251-285/+2316
|
* Introduce defparm operator.Kaz Kylheku2015-05-211-6/+46
| | | | | | | | * eval.c (me_defparm): New function. (eval_init): Register defparm. * txr.1: Documented defparm together with defvar. defvar documentation is revised.
* Variables are now deletable places, if they are global.Kaz Kylheku2015-05-151-1/+1
| | | | | | * place.tl (sys:sym-delete-expander): New function. (get-delete-expander): Retrieve delete expander for symbols.
* * eval.c (symbol_value): Retrieve the binding of a symbolKaz Kylheku2015-05-151-10/+88
| | | | | | | | | | macro also. (boundp): Return t for symbol macros. (makunbound, fmakunbound): New functions. (eval_init): Register makunbound and fmakunbound. * txr.1: Document changes to symbol-value and boundp, and add dialect notes about the different semantics of binding.
* * txr.1: Round of spelling fixes.Kaz Kylheku2015-05-151-46/+46
|
* * lib.c (replace_list, replace_str, replace_vec): HandleKaz Kylheku2015-05-141-2/+4
| | | | | | | | the case when from is a vector, for consistency with the sel function and the dwim operator. * txr.1: Document that the third argument of select and replace may be a vector.
* Spelling in car/cdr doc.Kaz Kylheku2015-05-101-1/+1
|
* Minor formatting fix in ret macro description.Kaz Kylheku2015-05-091-1/+1
|
* Crack down on redefinitions of built-ins.Kaz Kylheku2015-05-081-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c (builtin, eval_initing): New global variable. (op_defun, op_defmacro): During initialization, record functions and macros in builtin hash. (builtin_reject_test): New static function. (expand_macrolet): Perform builtin reject test for fbind, lbind, and macrolet. (regfun, reg_mac): Add symbol to builtin hash. (eval_init): GC-protect new hash table variable and initialize it. Set eval_initing to true over eval initialization. The flip function is renamed fo flipargs. (eval_compat_fixup): New function, for dealing with the operator/function conflict over flip. * eval.h (eval_compat_fixup): Declared. * lib.c (compat_fixup): Call eval_compat_fixup. * tests/011/macros-2.txr: This test was defining a macro called while which is now illegal. Renamed to whilst. * tests/011/macros-2.expected: Regenerated. * txr.1: Function flip renamed to flipargs and documented in Compatibility section.
* * Makefile (LISP_TO_C_STRING): Strip comments, but not comment lines,Kaz Kylheku2015-05-071-1/+13
| | | | | | | | | | | | | | | | | | so line numbers don't change. * eval.c (eval_init): Fix registrations of lisp-parse and read. * lisplib.c (place_instantiate): Give name to parsed string stream using new lisp_parse argument. * parser.c (lisp_parse): Takes new argument to override name. * parser.h (lisp_parse): Declaration updated. * txr.c (txr_main): Call lisp_parse with four args, defaulting the new one. * txr.1: Documented new argument.
* Fix corruption triggered by extended gc disabling.Kaz Kylheku2015-05-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that when gc is disabled, the gc function does nothing. But various code depends on calls to gc() doing something, like making space available in various static arrays. When gc is disabled for long periods, there are issues, like array overruns. * gc.c (gc): Must no longer be called at all if gc_enabled is false, and asserts that it is true. Callers must check the gc_enabled flag and implement appropriate cases. (make_obj): Only call gc when gc_enabled is true. If there is no space in the freshobj array after trying gc, or gc couldn't be tried because it is disabled, then schedule a full gc. (gc_set): If the checkobj array is full, only call gc if gc is enabled, otherwise schedule a full_gc. (gc_mutated): Do not assume that the mutobj array has room for another object; only set the object's generation to -1 and put it into the array if there is room. Similarly to gc_set, do a gc if there is no room, but if gc is not enabled, then schedule a full gc. (gc_wrap): Only call gc if gc_enabled is true, and return t in that case rathe than nil. * txr.1: Document return value of sys:gc function.
* Adding poll function.Kaz Kylheku2015-04-281-0/+51
| | | | | | | | | | | | | | * configure: Check for the poll function and set HAVE_POLL accordingly in config.h. * stream.h (fd_k): External declaration added. * sysif.c (poll_wrap): New function. (sysif_init): Registered poll-in, poll-out, poll-err, poll-pri, poll-rdhup, poll-nval, poll-rdband, poll-wrband variables and poll function. * txr.1: Documented poll.
* Version 107.txr-107Kaz Kylheku2015-04-261-2/+2
|
* Allow (force ...) to be an assignable place.Kaz Kylheku2015-04-251-8/+5
| | | | | | | | | | | | | | This allows mlet variables to be assignable. * eval.c (force_s): New global variable. (op_modplace): Handle force form. (me_mlet): Use force_s symbol. (force_l): New static function. (eval_init): Initialize force_s variable. Use it in registration of force function. * txr.1: Remove text in mlet definition that variables are not assignable. Replace with note about an unspecified behavior.
* Introducing mlet macro.Kaz Kylheku2015-04-251-1/+107
| | | | | | | * eval.c (me_mlet): New static function. (eval_init): Registered mlet macro. * txr.1: Documented mlet.
* * txr.1: lconsp: unterminated syntax block.Kaz Kylheku2015-04-231-0/+1
|
* * txr.1: name typo in lcons sample implementation.Kaz Kylheku2015-04-231-1/+1
|
* * txr.1: Fix formatting issuesKaz Kylheku2015-04-221-10/+10
| | | | whilet, whenlet, iflet, for*
* Version 106.txr-106Kaz Kylheku2015-04-211-2/+2
|