Ryan Culpepper
40bfaced34
syntax/parse: add unwindable state: syntax-parse-state-{ref,set!,...}
2018-01-18 17:25:30 +01:00
Ryan Culpepper
785ffdacce
syntax/parse: remove some absolute paths related to lazy-require-syntax
...
Since the previous version of this code was first written, Racket's
requirements seem to have relaxed---but not completely!
If *all* related module paths are made relative, then the deps
test case breaks (but only the test is pre-compiled ?!!).
If requires from disappearing module(s) to residual module(s)
use absolute module paths, it seems to work.
2018-01-18 16:59:26 +01:00
Ryan Culpepper
c913d14d7c
syntax/parse: use lazy-require-syntax
2018-01-18 16:59:26 +01:00
Alexis King
e4d1bbc473
syntax/parse: Arrange for built-in macro’s names to be preserved
...
The dance that syntax/parse performs to lazily load its implementation
rewrites uses of syntax/parse macros in such a way that their original
names were discarded, which shows up in error messages. By simply
invoking the underlying transformer directly in the proxy macro instead
of expanding to a rewritten use, users’ names can be preserved.
fixes #1909
2018-01-18 16:59:26 +01:00
Ryan Culpepper
bf47b22091
syntax/parse: make undo cooperate with ~commit and ~! (cut)
2018-01-18 16:59:26 +01:00
Ryan Culpepper
c61353a0f8
syntax/parse: add ~undo, #:undo for unwinding effects
...
Note: this version doesn't work with ~commit or ~!, because
it stores both choice points and undo actions in the failure
continuation. Commit and cut should discard choice points but
preserve undo actions.
2018-01-18 16:59:26 +01:00
Ryan Culpepper
f238a16fbc
syntax/parse: add ~or* and ~alt, like ~or{S,H} and ~or{EH}, respectively
2018-01-18 14:59:28 +01:00
Ryan Culpepper
fc25ef0323
support string, bytes (bindings from racket) as stxclass refs
...
add compile-time table as alternative to stxclass binding
2018-01-18 14:58:31 +01:00
Ryan Culpepper
2c1a36f55f
syntax/parse: clean up "at"/"within"-term handling
...
Added comments and examples about "at" and "within" terms
Fixed ps->stx+index bugs related to struct and vector patterns
2018-01-18 14:56:26 +01:00
Ryan Culpepper
2de80c8091
syntax/parse: fix ps->stx+index; fixes #1602
...
Collapse CDR frames separated by ORD, POST, etc. For example,
(1 ORD 2 stx) should be same as (3 stx).
2018-01-18 14:56:09 +01:00
Georges Dupéron
c5df776e82
Partial inclusion of upstream changes, to avoid a compilation error.
2017-09-01 13:55:02 +02:00
Georges Dupéron
8b2fa5e5c2
Fixed typo #%intef-begin → #%intdef-begin
2017-02-03 15:34:12 +01:00
Georges Dupéron
21ee81c841
Require auto-syntax-e in residual. Provide template-metafunction?
2017-02-03 10:17:55 +01:00
Georges Dupéron
25ed9ec068
Integrate auto-syntax-e, as this needs a deep modification in the syntax-mapping struct
2017-02-01 08:01:18 +01:00
Georges Dupéron
c259afbe61
Removed parse/private/keywords.rkt, to improve compatibility with the official syntax/parse (that file defines ~optional etc.)
2017-01-28 05:16:59 +01:00
Georges Dupéron
29c90350b2
Failed attempt at making metafunctions from syntax/parse/experimental/template and stxparse-info/parse/experimental/template compatible. I can manage to extract the binding from syntax/parse/…, but it seems to recognize a different struct (e.g. as if they were struct instances from two different phases)
2017-01-28 05:16:50 +01:00
Georges Dupéron
5be04ef8fd
Removed all structure definitions from the copy of syntax/parse, and used the ones definied in the official syntax/parse
2017-01-28 05:16:48 +01:00
Georges Dupéron
41634ba262
Attempt to fix residual bug
2017-01-28 05:16:42 +01:00
Georges Dupéron
c42aef881c
Support for define/syntax-parse, including when there are multiple defines. Search for the most up-to-date list of current-pvars is done by performing a dichotomy over a set of sequentially numbered current-pvars-paramNNN. Closes FB case 180.
2017-01-28 05:16:41 +01:00
Georges Dupéron
9bfa089c45
Bugfix: with-pvars must be called after binding the pvar, not before.
2017-01-28 05:16:38 +01:00
Georges Dupéron
45003e6e42
Implemented current-pvars
2017-01-28 05:16:36 +01:00
Georges Dupéron
02a0d43d0d
Changed syntax/parse module paths to stxparse-info/parse
2017-01-28 05:16:33 +01:00
Georges Dupéron
8d4f899aa3
Imported files from 28f1df4cff
2017-01-28 05:16:11 +01:00