summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * genman.txr: Simplify double plass over BODY into single pass.Kaz Kylheku2015-07-032-30/+32
|
* Allow op arguments like @1 to be places.Kaz Kylheku2015-07-032-0/+15
| | | | | | | * share/txr/stdlib/place.tl: Introducing new defplace for (sys:var ...) which is treated as if it were a symbol, in anticipation of the op/do macro placing that syntax with a symbol.
* Support trailing semicolon after hex/octal characters.Kaz Kylheku2015-07-024-6/+47
| | | | | | | | | | | | | | | | * 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.
* Hash-bang support for .tl files.Kaz Kylheku2015-07-026-5/+32
| | | | | | | | | | | | | | | | * parser.c (read_eval_stream): New boolean argument to request hash bang support. * parser.h (read_eval_stream): Declaration updated. * eval.c (sys_load): Pass new thid argument to read_eval_stream, to decline hash bang support. * match.c (v_load): Likewise. * txr.c (txr_main): Request hash bang support from read_eval_stream. Thus files referenced from the txr command line can have a #! line, which is ignored.
* * txr.1: Replace wrong use of .coSSKaz Kylheku2015-07-021-1/+1
|
* Handle escapes accurately in Vim syntax highlighting.Kaz Kylheku2015-07-022-5/+25
| | | | | | | | | * genvim.txr (txr_badesc, txr_stresc, txr_numesc, txr_regesc): New match categories. (txr_string, txr_quasilit, txr_regex, txl_regex): No longer use skip= argument, but rather contain escape categories. All escapes are colored as Special rather than String, and unknown or malformed escapes are colored as errors.
* * genman.txr: Take advantage of \@ escape in quasilit.Kaz Kylheku2015-07-013-2/+13
| | | | | | | * genvim.txr (txr_escat): New match category containing \@. Colorized a String. (txr_quasilit): Contains txr_escat. Thus, \@ looks like any other escape inside a quasilit.
* * genman.txr: Bugfix: reproduce the correct opening bracketKaz Kylheku2015-07-012-1/+7
| | | | before a function link.
* * txr.1: avoid term "regular macro".Kaz Kylheku2015-07-011-2/+2
|
* Fix issues in configure found by ShellCheck.Kaz Kylheku2015-06-272-8/+13
| | | | | | | | * configure (have_timegm, tm_gmtoff, tm_tmzone): Unused variables removed. (SIZEOF_LONG_LONG_T): Reference to nonexistent variable fixed. Also, fixed two instances of arithmetic expressions using unnecessary $ prefixes on variables.
* Fix TXR 97 regression in quasiliterals.Kaz Kylheku2015-06-272-1/+12
| | | | | | | | | * eval.c (expand_quasi): When the modifiers argument of a var item is expanded, the expansion incorrectly places it as the fourth item rather than third. This is effectively a continuation of the incomplete regression fix that was applied on 2014-08-29. The breakage is that `@{(expr) modifier}` ignores modifier whenever (expr) is an expression that undergoes expansion.
* Third round of quasiliteral-related fixes.Kaz Kylheku2015-06-262-5/+13
| | | | | | | | | * 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.
* Third round of quasiliteral-related fixes.Kaz Kylheku2015-06-262-0/+14
| | | | | | * parser.l (char_esc): Recognize \@ escape. (grammar): Add a rule for a \@ escape in quasiliterals, and quasi word list literals.
* Second round of quasiliteral-related fixes.Kaz Kylheku2015-06-262-1/+17
| | | | | | | | | * parser.l: Only shift to QSPECIAL state when @ is followed by a trailing context consisting of certain characters. Not every kind of Lisp object syntax can be introduced with @ in a quasiliteral. Adding a rule to produce an error when @ appears that is not followed by an allowed character.
* First round of quasiliteral-related fixes.Kaz Kylheku2015-06-263-25/+54
| | | | | | | | | | | | | | | | | | | | | * parser.l: Do not try to recognize floating-point literals in QSPECIAL state; that is not possible because @134.3 in a quasiliteral parses as a METANUM followed by ".3". On the other hand, recognize METANUM literals in QSPECIAL state, so that @@123 scans. Recognize @ as a token in QSPECIAL state, so @@abc will scan. When transitioning from QSILIT and QWLIT states to QSPECIAL upon scanning @, return a @ token, which is now parsed in the grammar. * parser.y (quasi_meta_helper): New static function. (q_var): Do not handle SYMTOK any more, only the braced variable syntax. SYMTOK is handled as a n_expr. Braced vars are handled with explicit '@' token, which is now produced by the scanner when it shifts from QSILIT to QSPECIAL. (quasi_item): No longer necessary to recognize various forms here such as quotes and splices. Just recognize a n_expr, preceded by '@'.
* * genman.txr: New filter to add hyperlinks within code inKaz Kylheku2015-06-262-0/+31
| | | | more places such as examples and summary lists.
* * genman.txr: indentation.Kaz Kylheku2015-06-261-10/+10
|
* * txr.1: Spelling, grammar.Kaz Kylheku2015-06-261-8/+8
|
* * txr.1: partition example: wrong use of where function.Kaz Kylheku2015-06-242-2/+6
|
* * txr.1: Formatting fixes.Kaz Kylheku2015-06-241-7/+16
|
* * hash.c (hash_from_pairs, hash_list): New functions.Kaz Kylheku2015-06-245-2/+68
| | | | | | | | | * 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.
* Refactoring n-ary functions to use a single helper.Kaz Kylheku2015-07-243-20/+23
| | | | | | | * lib.c (nary_op): New function. (plusv, mulv, logandv, logiorv): Use nary_op. * lib.h (nary_op): Declared.
* Hash subset testing.Kaz Kylheku2015-06-235-0/+86
| | | | | | | | | | | * 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.
* * genman.txr: Point to hacked manutils.Kaz Kylheku2015-06-221-4/+2
|
* * genvim.txr: Add ifa.tl library file.Kaz Kylheku2015-06-224-331/+337
| | | | * tl.vim, txr.vim: Regenerated.
* * share/txr/stdlib/place.tl: Get rid of big progn around theKaz Kylheku2015-06-223-528/+534
| | | | | | whole module. * genvim.txr: Handle (def's not preceded by spaces.
* Version 109.txr-109Kaz Kylheku2015-06-217-270/+307
|
* * lisplib.c (ifa_set_entries): Add conda.Kaz Kylheku2015-06-215-11/+79
| | | | | | | | * share/txr/stdlib/ifa.tl (conda): New macro. * tests/012/ifa.tl: Adding test for conda. * txr.1: Documenting conda.
* * genman.txr: Rewrite the man2html-generated inner name links with hashKaz Kylheku2015-06-202-24/+61
| | | | | | values derived from the title text, so that when sections are inserted or deleted, the URL's remain stable. The PREAMBLE is gone, and VERSION is collected when processsing the body.
* * genman.txr (month-name): Filter removed.Kaz Kylheku2015-06-202-5/+8
| | | | Page date is converted to a time value, and later formatted.
* Remove places.h generation hack.Kaz Kylheku2015-06-205-23/+22
| | | | | | | | | | | | | | * Makefile (GEN_HDRS, LISP_TO_C_STRING): Variables removed. (%.h: %.tl): Rule removed. The place.h header is no longer generated from place.tl. * lisplib.c (place_instantiate): Load place.tl from stdlib directory, rather than obtaining it from a string literal in generated header place.h. * place.tl: Moved to share/txr/stdlib directory. * genvim.txr: Refer to place.tl in stdlib.
* * 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-203-3/+29
| | | | * txr.1: Document have.
* * txr.1: Documented ifa.Kaz Kylheku2015-06-193-4/+166
| | | | | | | * 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.
* * Makefile: whitespace fixes.Kaz Kylheku2015-06-191-3/+3
|
* Test ifa macro.Kaz Kylheku2015-06-194-2/+68
| | | | | | | | | * Makefile (TEST_OUT): Include .tl files. (tst/%.out): New rule variant, from .tl prerequisite. * tests/012/ifa.expected: New file. * tests/012/ifa.tl: New file.
* * parser.c (parser_mark): Do not mark p->syntax_tree ifKaz Kylheku2015-06-192-1/+8
| | | | | its value is nao. Introduced on 2015-06-10, "Error handling improvement in read".
* * lib.c (mkstring): Fix neglect to null terminate.Kaz Kylheku2015-06-182-3/+8
|
* * lib.c (cat_str): Detect overflow in the total lengthKaz Kylheku2015-06-182-4/+26
| | | | calculation.
* Improvements in equal hashing function.Kaz Kylheku2015-06-182-4/+18
| | | | | | | * hash.c (equal_hash): For conses and vectors, ensure that distinct permutations lead to different hash codes. This is done by accumulating the partial hash with a multiplier, rather than just adding subhashes.
* * 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
|
* Library .txr files become .tl and are autoloaded.Kaz Kylheku2015-06-186-43/+93
| | | | | | | | | | | | | | | | | * lisplib.c (ver_set_entries, ver_instantiate, txr_case_set_entries, txr_case_instantiate): New static functions. (lisplib_init): Register new functions. * share/txr/stdlib/txr-case.txr: Reduced to a load for the corresponding .tl file, retained for backward compatibility. * share/txr/stdlib/ver.txr: Likewise. * share/txr/stdlib/txr-case.tl: New file, based on previous contents of corresponding .txr file. * share/txr/stdlib/ver.tl: Likewise.
* Adding anaphoric ifa macro.Kaz Kylheku2015-06-178-5/+103
| | | | | | | | | | | | | | | | | | | | * Makefile (install): Install .tl files present in stdlib directory. (INSTALL): Handle argument 2 being a list. * eval.c (load): New function. * eval.h (load): Declared. * lisplib.c (ifa_set_entries, ifa_instantiate): New functions to lazily load ifa.tl. (lisplib_init): Register new functions. * txr.c (stdlib_path): New variable. (sysroot_init): Store the stdlib path in stdlib_path. * txr.h (stdlib_path): Declared. * share/txr/stdlib/ifa.tl: New file.
* Refactoring of lisplib.cKaz Kylheku2015-06-172-8/+39
| | | | | | | | | | | * lisplib.c (set_dlt_entries): New static function. (set_place_dlt_entries): Renamed to place_set_entries. Uses set_dlt_entries as subroutine. (place_instantiate): Argument changes from table to function, which is invoked to null out the hash entries. (dlt_register): New static function. (lisplib_init): Use dlt_register to register dynamic loading of places_tl.
* 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-137-286/+403
|