scsh-users
[Top] [All Lists]

"dynamic" rx expressions

To: scsh-news@zurich.ai.mit.edu
Subject: "dynamic" rx expressions
From: briand@zipcon.net
Date: 05 Feb 2002 23:41:49 -0800
Organization: www.zipcon.net

Very simply, why doesn't this work ?

> (define x '(| "a1" "b2"))
> x
'(| "a1" "b2")
> (rx x)

Error: Illegal regular expression
       x
1> 
> (rx ,x)

Error: Cannot coerce value to regular expression.
       (| "a1" "b2")
1> 
> 

Any help appreciated.  Here's my goal, just in case there is a better
way :

I'm trying to pass regexp sexp's on the command line.

They come in as strings, so I make a string input port, (read) them,
and then try to do:

(rx ,value)

to create the regular expression.

Brian

-- 

   "There is no right place for the dead to live."

    -- Kai, last of the Brunnen-G


<Prev in Thread] Current Thread [Next in Thread>