guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rackets syntax parse


From: Stefan Israelsson Tampe
Subject: Re: rackets syntax parse
Date: Wed, 8 Feb 2012 22:50:15 +0100

Hmm,

The problems on master is not due to beeing a list a I thought. Is there anything wrong with

(syntax-case x (integrate)
                          [(integrate predicate description)
                           (pk 'matched)
                           #'(make-integrate #'predicate
                                             'description)]
                          [#f
                           #''#f])])

x =
(#(syntax-object integrate ((m-7SKZ$evMo3A5a3cVUSaE3A-12230 top) #(ribcage () () ()) #(ribcage #(l) #((m-7SKZ$evMo3A5a3cVUSaE3A-12230 top)) #("l-7SKZ$evMo3A5a3cVUSaE3A-12240")) #(ribcage (integrate-description integrate-predicate integrate? make-integrate integrate integrate-fkns) ((top) (top) (top) (top) (top) (top)) (((hygiene syntax parse src rep-data) . #(syntax-object integrate-description ((top)) (hygiene syntax parse src rep-data))) ((hygiene syntax parse src rep-data) . #(syntax-object integrate-predicate ((top)) (hygiene syntax parse src rep-data))) ((hygiene syntax parse src rep-data) . #(syntax-object integrate? ((top)) (hygiene syntax parse src rep-data))) ((hygiene syntax parse src rep-data) . #(syntax-object make-integrate ((top)) (hygiene syntax parse src rep-data))) ((hygiene syntax parse src rep-data) . #(syntax-object integrate ((top)) (hygiene syntax parse src rep-data))) ((hygiene syntax parse src rep-data) . #(syntax-object integrate-fkns ((top)) (hygiene syntax parse src rep-data))))) shift #(ribcage () () ()) #(ribcage #(q mk ? fn n i) #((top) (top) (top) (top) (top) (top)) #("l-7SKZ$evMo3A5a3cVUSaE3A-1112" "l-7SKZ$evMo3A5a3cVUSaE3A-1113" "l-7SKZ$evMo3A5a3cVUSaE3A-1114" "l-7SKZ$evMo3A5a3cVUSaE3A-1115" "l-7SKZ$evMo3A5a3cVUSaE3A-1116" "l-7SKZ$evMo3A5a3cVUSaE3A-1117")) #(ribcage () () ()) #(ribcage () () ()) #(ribcage #(nm) #((top)) #("l-7SKZ$evMo3A5a3cVUSaE3A-1107")) #(ribcage #(name field) #((top) (top)) #("l-7SKZ$evMo3A5a3cVUSaE3A-1103" "l-7SKZ$evMo3A5a3cVUSaE3A-1104")) #(ribcage () () ()) #(ribcage #(x) #((top)) #("l-7SKZ$evMo3A5a3cVUSaE3A-1100")) #(ribcage (define-struct) ((top)) (((hygiene syntax parse src misc) . #(syntax-object define-struct ((top)) (hygiene syntax parse src misc)))))) (hygiene syntax parse src misc)) #(syntax-object t-1375 ((top)) (hygiene syntax parse src lib)) #(syntax-object "identifier" ((#f top) shift #(ribcage () () ())) (hygiene syntax parse src lib)))

x do have the simple structure of
((syntax integrate) (syntax t-1375) (syntax "identifier"))

Something in the syntax structure has to be corrupt!

On Wed, Feb 8, 2012 at 9:16 PM, Stefan Israelsson Tampe <address@hidden> wrote:
I tried, got, new errors. it looks like if we have
(syntax-case x () ((a b c) ...))

and if x is a list of syntax pattern then we do not match in master
but do match in stable-2.0

/stefan

;;; WARNING: compilation of /home/stis/stis/src/guile-syntax-parse/syntax/parse/src/parse.scm failed:
;;; ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'

This codee compiles under


On Tue, Feb 7, 2012 at 11:55 PM, Andy Wingo <address@hidden> wrote:
On Tue 07 Feb 2012 22:58, Stefan Israelsson Tampe <address@hidden> writes:

>     Just use #'f instead of (datum->syntax #'name 'f).
>
> I would love to use this, but when I tried that, the code failed in
> some cases, maybe because of the bugs you mensioned?

Try on master, perhaps?

Andy
--
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]