Re: [racket-users] Building regexen in at-exp

2016-11-05 Thread Eli Barzilay
On Fri, Oct 28, 2016 at 3:18 PM, David Storrs wrote: > tl;dr : Why is the following an error? > > #lang at-exp racket > (define a "this") > @pregexp{^@a} ;; Should produce #px"^this" but errors out > @pregexp{@(~a "^" a)} ;; This works but is clumsy I see that the problem was pointed to you se

Re: [racket-users] Building regexen in at-exp

2016-10-28 Thread Vincent St-Amour
To understand what's going on, consider the following program: #lang at-exp racket (define a "this") (define (f . l) (for-each displayln l)) @f{^@a} which prints ^ this What's going on is that the `{}` in at-exp notation will evaluate to a list of strings. One fo

[racket-users] Building regexen in at-exp

2016-10-28 Thread David Storrs
tl;dr : Why is the following an error? #lang at-exp racket (define a "this") @pregexp{^@a} ;; Should produce #px"^this" but errors out @pregexp{@(~a "^" a)} ;; This works but is clumsy Long version: The at-exp language (http://www.greghendershott.com/2015/08/at-expressions.html and https://do