| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
placelet as a way of writing place update macros.
Example added under placelet.
|
| |
|
| |
|
|
|
|
|
| |
Lists can be spliced and quoted. Metanums and metavars can
be prefixed by multiple @'s.
|
|
|
|
| |
Refer to source tree.
|
| |
|
|
|
|
|
|
| |
* tests/012/quasi.expected: New file.
* tests/012/quasi.tl: New file.
|
|
|
|
| |
tests in this directory.
|
| |
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/place.tl (place-form-p): Take
environment parameter. Expand the place form using sys:pl-expand.
* share/txr/stdlib/ifa.tl (ifa): Pass environment
to place-form-p.
(nthcdr): Pass environment down to place-form-p.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means short, relative names are used for C source files when
compiling in the source directory.
* Makefile (CFLAGS): Exclude -iquote $(top_srcdir) arguments
if top_srcdir is blank. Remove slash after $(top_srcdir),
since the variable includes it now, if its value is not blank.
(SRCS, ABBREV, opt/%-win.o, lex.yy.c, y.tab.c, install): Remove slash
after $(top_srcdir).
(dbg/%.o, opt/%.o): Only include rules for depending
on $(top_srcdir)%.c prerequisite if top_srcdir is not blank.
In the blank case, the rules are redundant.
* configure: if configuring in the root of the source tree,
establish top_srcdir as blank, otherwise establish is as
an absolute path with a trailing slash.
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (TESTS_OUT): Don't use find to hunt down tests;
but rather wildcard. This way common.tl is not mistakenly
identified as an independent test file.
* tests/012/ifa.tl: Removed test code, placed in new file
which is loaded.
* tests/common.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (CFLAGS): Search for mpi header in $(top_srcdir).
(ABBREV): Remove top_srcdir prefix from source names.
(dbg/%.o, opt/%.o): Extra set of pattern rules for searching
for prerequisites in $(top_srcdir) where primary C sources
are found and in the local dir where some generated C is found.
This way we don't rely on VPATH.
(opt/%.res): Bogus target removed.
(VPATH): Removed in favor of explicitly referencing $(top_srcdir).
Was causing problems for tests.
(lex.yy.c, y.tab.c): Prerequisites referenced in $(top_srcdir).
|
|
|
|
|
|
|
|
|
|
|
| |
word list literals and word list quasiliterals, except
in <= 109 compatibility mode. An escaped newline in
these literals, together with surrounding whitespace,
now produces a single space, except in <= 109
compatibility mode.
* txr.1: Documented new rules for WLL's and QLL's,
and added compatibility notes.
|
|
|
|
|
| |
Remove hard-coded txr-case symbols. Recognize operators registered
with in-line intern.
|
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/with-resources.tl: New file.
* lisplib.c (with_resource_set_entries, with_resources_instantiate):
New static functions.
(lisplib_init): Register new functions under dlt_register.
* txr.1: Document with-resources.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register nthcdr function.
* lib.c (nthcdr): New function.
* lib.h (nthcdr): Declared.
* share/txr/stdlib/place.tl (nthcdr): New defplace.
* txr.1: Documented.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (op_mac_param_bind): New static function.
(eval_init): Register mac-param-bind operator.
* share/txr/stdlib/place.tl (define-place-macro): Use
mac-param-bind inside a lambda instead of tb macro.
* txr.1: Document mac-param-bind.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register second through tenth as intrinsic.
* gencadr.txr: New cadr.c changes encoded.
* lib.c (second, third, fourth, fifth, sixth): Functions
reimplemented using ref, so they are much more efficient
for vectors and strings.
(seventh, eighth, ninth, tenth): New functions.
* lib.h (seventh, eighth, ninth, tenth): Declared.
* share/txr/stdlib/place.tl: place macros defined for
second through tenth.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
define-place-macro to list of names.
* share/txr/stdlib/place.tl (*place-macro*): New global hash.
(sys:tigger-load, sys:pl-expand): New functions.
(call-update-expander, call-clobber-expander, call-delete-expander):
Recognize and expand place macros.
(define-place-macro): New macro.
(first, rest): Places redefined using define-place-macro, replacing
the old hack of copying the expanders from one table entry to another.
* txr.1: Documented place macros.
|
|
|
|
|
| |
value returned when printing dwim forms, due to
mutating the obj variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (init): Call cadr_init.
* lisplib.c (dl_table, set_dlt_entries, dlt_register): Externalize.
* lisplib.h (dl_table, set_dlt_entries, dlt_register): Declared.
* Makefile (OBJS): Add cadr.o.
* cadr.c: New file.
* cadr.h: New file.
* gencadr.txr: New file.
* share/txr/stdlib/cadr.tl: New file.
* txr.1: Document cadr accessors.
|
|
|
|
|
|
| |
semantics so that (del (cdr x)) is symmetric with (del (car x)).
* txr.1: Update documentation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (split_func): New static function.
(partition_split_common): New static function, based on
on contents of partition function.
(partition): Now a wrapper around partition_split_common.
(split): New function.
* lib.h (split): Documented.
* txr.1: Documented split.
|
| |
|
| |
|
|
|
|
|
| |
stream should be the resolved name, not the abstract original,
so that error messages correlate to the file.
|
|
|
|
| |
allow "it" to be mutable when it denotes a place form.
|
|
|
|
| |
* lisplib.c (place_set_entries): Add place-form-p to list of names.
|
|
|
|
|
|
|
| |
* eval.c (sys_lisp1_value_s): New global symbol variable.
(expand_lisp1_value): New static function.
(do_expand): Use expand_lisp1_value.
(eval_init): Initialize sys_lisp1_value_s.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
ogetter-sym variable for caching the sequence; use the getter
for the sequence place to access it. Again, this is for placelet,
where the caching is visible. Another way to fix this is to
clobber the cache variable when updating the sequence place.
|
|
|
|
| |
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (prime_parser): Take name as argument,
and install it into parser.
(lisp_parser): Pass name to parse, instead of setting it
in the parser object.
* parser.y (parse): Take name as argument and pass
down to prime_parser.
* parser.h (prime_parser, parse): Declarations updated.
|
|
|
|
|
| |
* parser.c (read_eval_stream): Get name of original stream,
and pass that down to lisp_parse as the name argument.
|
|
|
|
|
| |
* parser.c (read_eval_stream): Add terminating newline to
the first line that was examined for hash bang.
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (parser_mark, parser_common_init): Remove reference to primer.
(parser): Don't take primer argument, remove reference to member.
(ensure_parser): Don't take primer argument, don't pass to parser
function.
(lisp_parse): Don't pass primer string to ensure_parser.
* parser.h (primer_t): Remove primer member.
(parser): Declaration updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test case: file containing 4(prinl 3). Scanner consumes 4 and (.
The ( is lost when the scanner is reset for the next call to yyparse,
resulting in jut prinl being read and interpreted as a variable.
* parser.c (prime_parser): If present, append hold byte to priming
string. Takes parser_t * instead of parser, and returns void now.
* parser.l (reset_scanner): Now returns int value, the value
of the scanner's yy_hold_char variable which is nonzero when
the scanner is hanging on to an unmatched byte of input.
* parser.h (reset_scanner, prime_parser): Declarations updated.
* parser.y (parse): Pass hold byte returned by reset_scanner to
prime_parser.
|
| |
|
|
|
|
|
| |
* stream.c (cat_unget_byte, cat_unget_char): Recursive
call to unget_byte and unget_char with reversed arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser.c (parser_destroy): New GC finalizer static function.
(parser_ops): Register parser_destroy.
(parser_common_init): New function, shared by parse and parse_once.
Initializes embedded scanner.
(parser_cleanup): New function, shared by parse_once and
parser_destroy.
(parser): Use parser_common_init.
* parser.h (parser_t): New member, yyscan.
(reset_scanner, parser_common_init): Declared.
* parser.l (reset_scanner): New function.
* parser.y (parse_once): Use parser_common_init, and
thus perform only a few initializations. Do not
define scanner as a local variable.
(parse): Call reset_scanner instead of
yylex_init since the scanner is being reused,
and for the same reason do not call yylex_destroy.
GC will do that now.
|
|
|
|
|
| |
* lisplib.c (place_set_entries): Add define-modify-macro to
list of names.
|
| |
|
|
|
|
|
|
|
| |
* parser.l (grammar): Scan a METANUM token in the
BRACED state also. This allows us to correctly
reference op arguments in a quasiliteral, as in
`foo @{@1 [1..2] ","} bar`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (null_stream_print): Static function removed.
(stream_print_op): New function. Prints stream's name and address.
(null_get_prop): Pull stream name from strm_ops structure
rather than hard-coding to "null-stream".
(null_ops, stdio_ops, tail_ops, pipe_ops, string_in_ops,
byte_in_ops, string_out_ops, strlist_out_ops, dir_ops,
cat_stream_ops): Use stream_print_op in place of cobj_print_op.
Initialize name.
(stdio_stream_print): Use name from ops structure,
and include object address.
(string_in_get_prop): Likewise.
(cat_stream_print): Likewise.
* stream.h (struct strm_ops): New member, name.
(strm_ops_init): Initialize name.
(stream_print_op): Declared.
* syslog.c (syslog_strm_ops): Use stream_print_op. Initialize name.
|