Matthew Flatt
25dd8727cb
add datum-case', etc. as
syntax/datum'
...
This library is used by Redex, which wants a `syntax'-like template
language, but for datum values instead of syntax objects. Using
`datum-case' and `datum' generates much less code. Redex uses
only a small part of the general functionality, so adding
`syntax/datum' could be overkill. It's implemented by generalizing
the `syntax-case' and `syntax' pattern matching and template
constructing code, though; it's not a lot of extra code, and it's
easiest to generalize completely. We may find other uses for
datum templates, too.
2011-12-12 08:13:20 -07:00
Robby Findler
622bec0719
avoid (format "~s" x) in favor of (symbol->string x) for symbols
...
when doing typesetting stuff in Redex, as the former seems to have
some kind of context dependency that makes it insert ||s around
some upper-case symbols sometimes
2011-12-10 02:55:47 -06:00
Robby Findler
e55ed2dc25
improve syntax error reporting for judgment-holds in reduction relations (and
...
probably elsewhere)
2011-12-08 20:35:46 -06:00
Robby Findler
447bd44a0c
minor rackety
2011-12-05 01:14:54 -06:00
Robby Findler
f725066bf9
fix bug in the handling of side-conditions
2011-12-05 01:14:54 -06:00
Robby Findler
ce7523f01f
more atoms can be shared now, so wrap 'em up
2011-12-02 16:38:56 -06:00
Robby Findler
458e2c2282
some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:'
2011-11-30 06:45:50 -06:00
Robby Findler
9db206b231
add in keymap mixin
2011-11-29 18:43:37 -06:00
Robby Findler
e788c6f49e
adjust define-judgment-form so that it
...
a) avoids creating big intermediate lists of the same things over and over
(this closes PR 12380)
b) generates less code (by generating calls to local functions)
c) normalizes its output (sorts by the printed representation)
2011-11-20 22:50:07 -06:00
Robby Findler
0a75219438
added support for where & side-condition & judgment-holds to define-relation
...
closes PR 12382
2011-11-20 21:34:22 -06:00
Robby Findler
b93486ed69
compile the left-hand sides of define-judgment only once, not during each time we try to check a judgment
...
related to PR 12380
2011-11-17 20:55:05 -06:00
Robby Findler
755dc28e55
Fixes define-relation's handling of ellipses across clauses
...
closes PR 12378
2011-11-17 17:00:11 -06:00
Robby Findler
3379fb8df6
fix some redex bugs caught by drdr tests
2011-11-09 06:47:38 -06:00
Robby Findler
0ce6c75591
Rackety (mostly letrec-values => define and minimizing dependencies)
2011-10-31 09:14:34 -05:00
Robby Findler
64dfdb3c7f
Change the expansion of reduction-relation so that it generates less code
...
(by expanding into a call to a 30 or so line procedure, instead of putting
that code directly into the result of the macro).
This produces about a 6x speedup on this reduction-relation
(reduction-relation L (--> 0 1) (--> 1 2) ... (--> 99 100))
where L is
(define-language L)
The time it takes to run "racket r6rs.rkt" in the shell from the
directory collects/redex/examples/r6rs speeds up by about 10% (15%
with errortrace enabled), in the case where all .zo files are built,
except the ones in the r6rs directory. (Also worth noting that "racket
-l redex" takes more than 50% of that time.) And the change has no
noticeable effect on the time it takes to run r6rs-test.rkt.
2011-10-31 08:53:09 -05:00
Robby Findler
41f68af64a
delay the construction of the compatible-closure grammar (the 'cross' thing)
...
until it is actually used. (This can make a big difference for large grammars
in models that don't actually use the compatible closure stuff.)
2011-10-30 22:36:53 -05:00
Robby Findler
9d371153fd
add the #:stop-when argument to apply-reduction-relation*
2011-10-23 12:10:56 -05:00
Casey Klein
57a8ed5c79
Fixes matching of prefab struct literals
...
Fixes PR 12298
2011-10-17 19:37:16 -05:00
Robby Findler
9ab6a93127
fix the error check
...
closes PR 12290
2011-10-15 14:00:16 -05:00
Robby Findler
db2e13a09b
add a "Step Until Choice" option into the redex stepper
2011-10-14 13:37:12 -05:00
Ryan Culpepper
7cc1476170
syntax/parse: fix bug: integrated stxclass might not bind pvar to syntax
2011-09-21 16:58:52 -06:00
Casey Klein
634f5c9e0c
Removes now outdated comment
2011-09-08 09:11:52 -05:00
Casey Klein
97e792200f
Gives a function a better name
2011-09-08 09:11:52 -05:00
Casey Klein
6d43376f9c
Adds support for `judgment-holds' clauses in metafunctions
2011-09-08 09:11:52 -05:00
Casey Klein
ac7856a377
Moves metafunction construction to later expansion step
2011-09-08 09:11:51 -05:00
Casey Klein
2b4f604776
Replaces use of `define-syntax-set'
2011-09-08 09:11:51 -05:00
Casey Klein
145828527f
Fixes handling of pattern variables that look like metafunctions
2011-08-31 11:20:02 -05:00
Casey Klein
c0625dc30c
Adds define-term form
2011-08-30 15:10:50 -05:00
Eli Barzilay
1db5ad97f8
Fix another bunch of "language" typos.
2011-08-26 05:26:46 -04:00
Casey Klein
2eced78000
Fixes indentation
2011-08-17 11:59:43 -05:00
Casey Klein
9e2e11e9c4
Tests metafunction Check Syntax arrows
2011-08-16 14:32:33 -05:00
Casey Klein
98eaaebc65
Improves error messages for Redex definition forms
2011-08-15 12:46:14 -05:00
Casey Klein
4d1651645a
Improves error message for premise typos
2011-08-10 12:24:02 -05:00
Casey Klein
a2dc2d9540
Fixes arity checks outside define-judgment-form
2011-08-10 12:24:02 -05:00
Casey Klein
87f3541979
Adds support for ellipsis-repeated premises
2011-08-10 12:24:01 -05:00
Casey Klein
88cd7cd303
Adds with-compound-rewriters typesetting form
2011-08-10 12:24:00 -05:00
Casey Klein
52c50dd67e
Adds an alternative syntax for define-judgment-form rules
...
The conclusion may come last instead of first when a sequence of
dashes precedes it.
2011-08-10 12:24:00 -05:00
Casey Klein
dbfbf59256
Changes syntax for define-judgment-form mode and contract specs
2011-08-10 12:23:59 -05:00
Casey Klein
d58a743b89
Fixes define-judgment-form at the top-level with errortrace enabled
2011-08-10 12:23:59 -05:00
Casey Klein
576272362b
Adds define-judgment-form form
2011-08-05 07:19:23 -05:00
Casey Klein
8887ea2ef3
Refactors meta-function implementation further
2011-08-05 07:19:22 -05:00
Casey Klein
6e38233286
Deletes dead code
2011-08-05 07:19:22 -05:00
Casey Klein
7898018cad
Factors out name-consistency check
2011-08-05 07:19:22 -05:00
Casey Klein
24dc005ff4
Removes special case for typesetting recursive calls
...
This case doesn't appear necessary, since LWs are constructed in an
expansion step that occurs after all of the meta-function names
(including the current one) are bound.
2011-08-05 07:19:21 -05:00
Casey Klein
3dc677d270
Factors out parsing of relation contracts
2011-08-05 07:19:21 -05:00
Casey Klein
c9c2bb8ad7
Refactors construction of meta-function and relation lws
2011-08-05 07:19:20 -05:00
Eli Barzilay
3157955d40
".ss" -> ".rkt" scan done.
2011-07-02 10:37:53 -04:00
Eli Barzilay
40124a0619
A long overdue scan to eliminate files without terminating newlines.
...
(DrRacket should really do that.)
2011-06-28 02:01:41 -04:00
Robby Findler
78006b5720
redex: adjust the 'horizontal rule-pict-style so that it doesn't add space after the last rule
...
extend render-reduction-relation-rules so you can specify rule indicies instead of just
the names of the rules
2011-06-21 06:32:51 +08:00
Robby Findler
b43e956c7b
Redex: added to-lw/stx
...
plus improved the redex docs slightly and Rackety
2011-05-30 21:33:55 -05:00