Sören Tempel
1503217e86
(chibi parse): Ensure reason is always a string
...
While testing a `(chibi parser)`-based parser I noticed that
`parse-string` is the only provided parser combinator which uses a list,
instead of a string, as a failure reason. It is not explicitly
documented but since all other standard parser combinator use a string
for the error reason I assume this to be a bug and have adjusted the
`parse-string` combinator accordingly in this commit.
2022-04-09 10:55:20 +02:00
Alex Shinn
9fe1e69c23
partial fix for issue #816
2022-03-15 23:45:59 +09:00
Alex Shinn
9d2875b05e
Merge branch 'master' into identifier-macros
2022-03-15 19:47:40 +09:00
Daphne Preston-Kendal
9a0212efff
Move identifier-syntax to (chibi ast)
2022-03-15 10:27:56 +01:00
Daphne Preston-Kendal
7a4e793e49
Move make-variable-transformer to (chibi ast)
2022-03-15 09:25:21 +01:00
Alex Shinn
c5cfc5cded
fix missing newline in test line wrapping output
2022-02-24 22:43:49 +09:00
Daphne Preston-Kendal
51b0203dc5
Ditch the syntax-case version of identifier-syntax now it’s in core
2022-02-04 10:40:21 +01:00
Daphne Preston-Kendal
d769a7970c
Wrap identifier-syntax output in make-transformer
2022-01-03 09:50:07 +01:00
Daphne Preston-Kendal
4a3c7eaf1f
Support identifier-syntax in (chibi syntax-case)
2021-12-30 10:58:26 +01:00
Alex Shinn
6615a74609
undoing unintended commit
2021-12-29 14:27:49 +09:00
Alex Shinn
b769a318ef
use unsigned char* in sexp_update_string_index_lookup (fixes issue #804 )
2021-12-29 11:55:58 +09:00
Alex Shinn
ab29a2b973
skip common prefix/suffix in diff
2021-12-28 16:07:43 +09:00
Alex Shinn
71cc9b0d3c
add make-procedure to (chibi ast)
2021-12-02 22:02:03 +09:00
Alex Shinn
6e636594a5
simplify opt-lambda def; copy list tail for rest arguments
2021-11-25 22:01:59 +09:00
Alex Shinn
1eee928e67
allow non-optional bindings in let-optionals[*]
2021-11-25 00:14:15 +09:00
Arthur A. Gleckler
9b6099ca87
Support more MIME types for common file types.
...
In `servlet-respond', the server defaults to Content-Type "text/html;
charset=UTF-8" for extensions that don't appear in
`mime-type-from-extension'. This meant that CSS files, JavaScript
files, and various types of image files were getting the wrong
Content-Type, which was fine when they were served directly, but
caused clients to close the connection when they were loaded over
HTTP/1.1, which can deliver back-to-back resources on the same
connection.
Sort the types in the `mime-type-from-extension' list now that it is
longer. It's still not long enough for the order to be material for
performance.
2021-11-18 22:09:47 -08:00
Arthur A. Gleckler
153b4d894a
Fix typo in comment.
2021-11-18 18:06:40 -08:00
Alex Shinn
4dde693435
http servers should ignore SIGPIPE by default
2021-11-19 10:49:04 +09:00
Alex Shinn
182048ed9a
adjust for rounding up converting from fixnum to double in exact-integer-sqrt ( fixes #786 )
2021-11-08 09:27:50 +09:00
Alex Shinn
9e523b6832
Merge pull request #764 from jgesswein/fix-test-runner-indentation
...
Fix indentation of test runner output
2021-09-06 14:11:54 +09:00
Jürgen Geßwein
e2c8619a21
Implement review comments
...
Add comment to procedure indent-string to indicate need for a reset for
a second report.
Correct import of (chibi optional).
2021-09-05 13:15:00 +02:00
Alex Shinn
1881116804
enforce order of let-optionals* val/rest binding in non-chibi impl (issue 778)
2021-09-02 12:58:41 +09:00
Alex Shinn
6be3784db0
nitpick (issue #778 )
2021-08-30 17:27:33 +09:00
Alex Shinn
08d2847767
explicitly state that it is an error if the default values mutate the let-optionals list (issue #778 )
2021-08-30 16:15:57 +09:00
Alex Shinn
6cafda8916
Decouple syntax-case from the Chibi core.
...
This restores third-party (ab)users of the Chibi macro system such
as in https://gist.github.com/baguette/2632464 , while allowing us
to break those uses in more interesting ways.
It also keeps the core slightly smaller (both in C and Scheme)
and speeds up the macro expansion process.
2021-08-10 23:19:35 +09:00
Lassi Kortela
3a5f884144
Simplify snprintf usage
...
snprintf(buf, sizeof(buf), ...) is the canonical idiom.
2021-08-07 23:17:38 +03:00
Jürgen Geßwein
e0497b3084
Implement review comments
...
Add some newlines and a comment to improve readability.
Use local string port instead of parameterizing current-output-port.
Pass symbol 'BEGIN to tell test reporter that evaluation of a test
starts. Adapt documentation of current-test-reporter accordingly.
Use define-opt instead of case-lambda.
2021-08-07 21:14:11 +02:00
Alex Shinn
9710962cd2
don't assume map works on improper lists in cpp-define
2021-07-28 10:35:05 +09:00
Jürgen Geßwein
b23db00aed
Fix indentation of test runner output
...
Fix standard test runner so that its output is properly indented and
lines are properly terminated.
Refactor standard test runner so that it is possible to plug in another
runner with different output.
2021-07-25 13:21:34 +02:00
Alex Shinn
5b8e196e0f
parse-seq should check for ignored value in fast paths as well (issue #757 )
2021-07-19 21:49:39 +09:00
Roger Crew
3337049811
shorter factor (issue #751 cont.)
2021-06-30 00:29:54 -07:00
Roger Crew
2759aaa306
add factor-alist and export it (chibi math prime)
...
a more useful version of factor
2021-06-29 23:48:12 -07:00
Roger Crew
680aede9ae
totient and aliquot rewrite + corrected tests for n=1 (issue #751 cont.)
2021-06-29 23:48:12 -07:00
Roger Crew
b89bd9f889
faster factor, (factor 1) = () (issue #751 cont.)
...
no need to go up to sqrt(n), Instead track i^2 and quit when that gets
larger than the (remaining) n (i.e., not the original n)
2021-06-29 23:48:12 -07:00
Roger Crew
41aa1a918e
miller-rabin-composite? rewrite (issue #751 )
...
modular-root-of-one? is replaced with the correct witness tester
2021-06-29 23:48:09 -07:00
Roger Crew
7d39108e72
factor-twos cps version using first-bit-set
...
first-bit-set is way faster than looping
2021-06-29 23:43:53 -07:00
Alex Shinn
f3bccf1f7b
removing unintended export
2021-06-28 17:31:14 +09:00
Alex Shinn
378b56a0c3
adding opt-lambda* and define-opt*
2021-06-28 17:27:22 +09:00
Alex Shinn
0fbd89dd00
ignore keywords in non-keyword positions (issue #753 )
2021-06-28 16:19:43 +09:00
Alex Shinn
05c546e38d
match fix for (a ...) patterns where a was already bound - thanks to Andy Wingo
2021-06-21 16:44:02 +09:00
Alex Shinn
5610653c20
servlets should assume html if no Content-Type is specified
2021-05-28 12:07:23 +09:00
Alex Shinn
05ca40fa51
chibi doc fixes for irregex manual
2021-05-14 13:49:07 +09:00
Alex Shinn
4a06997978
guard against failed module-ref
2021-05-13 22:10:30 +09:00
Alex Shinn
7b2fbb0bf2
fixing ffi doc extraction for cond-expanded procedures
2021-05-10 18:40:33 +09:00
Alex Shinn
12ad1d37d8
add docs and tests for assert, unify with SRFI 145
2021-05-06 20:34:03 +09:00
Alex Shinn
249f4f21ba
allow tracing macros
2021-05-06 10:17:03 +09:00
Alex Shinn
1db8a573f1
more extensive list of constructs not to descend into
2021-05-05 08:08:12 +09:00
Alex Shinn
9a9f974d69
assert improvements: dedup vars, ignore lambdas, allow report:
2021-05-05 07:56:14 +09:00
Alex Shinn
ef9daf22c8
handle include-shared in analyze-module
2021-04-26 14:27:11 +09:00
Alex Shinn
d64f159608
fix docs on test-group
2021-04-16 10:10:18 +09:00