write simpler a syntax form ?

Damien Mattei <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <CADEOadeDAY9Xf3e+oq8z+iUsyRw9Sc1bB72ENJMYhqpq5VfrrQ@mail.gmail.com>
do you think this can be written simpler?

#`(list #,@(optimizer-parse-square-brackets-arguments-lister-syntax
#`(#,@#'args-brackets)))

i'm quite afraid the look the 'syntax' get....

it is part of this macro:

(define-syntax $bracket-apply$

  (lambda (stx)

    (syntax-case stx ()


      ;; a version that pre-compil the infix expression, should be faster
      ;; scheme@(guile-user)> {#(1 2 3 4 5 6 7 8 9)[6 - 4 : 5 + 2]}
      ;; optimizer-parse-square-brackets-arguments-lister-syntax :
args-brackets=(#<syntax:unknown file:2:22 6> #<syntax:unknown
file:2:24 -> #<syntax:unknown file:2:26 4> #<syntax:unknown file:2:28
:> #<syntax:unknown file:2:30 5> #<syntax:unknown file:2:32 +>
#<syntax:unknown file:2:34 2>)
      ;; $bracket-apply$ :
#'parsed-args=(#<syntax:apply-square-brackets.scm:106:37 list>
(#<syntax:unknown file:2:24 -> #<syntax:unknown file:2:22 6>
#<syntax:unknown file:2:26 4>) #<syntax:unknown file:2:28 :>
(#<syntax:unknown file:2:32 +> #<syntax:unknown file:2:30 5>
#<syntax:unknown file:2:34 2>))
      ;; $1 = #(3 4 5 6 7)

      ;; scheme@(guile-user)> (define i 5)
      ;; scheme@(guile-user)> {#(1 2 3 4 5 6 7 8 9)[6 - 4 : i + 2]}
      ;; optimizer-parse-square-brackets-arguments-lister-syntax :
args-brackets=(#<syntax:unknown file:4:22 6> #<syntax:unknown
file:4:24 -> #<syntax:unknown file:4:26 4> #<syntax:unknown file:4:28
:> #<syntax:unknown file:4:30 i> #<syntax:unknown file:4:32 +>
#<syntax:unknown file:4:34 2>)
      ;; $bracket-apply$ :
#'parsed-args=(#<syntax:apply-square-brackets.scm:106:37 list>
(#<syntax:unknown file:4:24 -> #<syntax:unknown file:4:22 6>
#<syntax:unknown file:4:26 4>) #<syntax:unknown file:4:28 :>
(#<syntax:unknown file:4:32 +> #<syntax:unknown file:4:30 i>
#<syntax:unknown file:4:34 2>))
      ;; $2 = #(3 4 5 6 7)
      (($bracket-apply$ container . args-brackets)


       (with-syntax ((parsed-args #`(list
#,@(optimizer-parse-square-brackets-arguments-lister-syntax
#`(#,@#'args-brackets)))))
		
		    (display "$bracket-apply$ : #'parsed-args=") (display
#'parsed-args) (newline)
		
		    #'($bracket-apply$next4list-args container parsed-args))))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.