| |
Qilang |
As of now, the second <<L>> would bind over the first. No identity would be (defcc <f>
Hi Mark,
Cool this looks like a natural building block, but what do you think
(defcc <f>
They is nice to have for situations like
/Stefan
On 26 June, 11:37, Mark Tarver <dr.mtar...@ukonline.co.uk> wrote:
> (defcc <grab-numbers>
> (defcc <numbers>
> (defcc <number>
> (defcc <grab-my-name>
> Examples:
> (compile <grab-my-name> [ghhghg 7 8 :name Mark Tarver])
> (compile <grab-numbers> [just some numbers 1 2 3/4 tum te tum])
> The code is 85 lines.
> Mark
created. you would have to have
<<L1>> <numbers> <<L2>> := (if (= <<L1>> <<L2>>) ..... #\Escape);)
From: "snorgers" <stefan.ta...@spray.se>
To: "Qilang" <Qilang@googlegroups.com>
Sent: Friday, June 26, 2009 8:42 PM
Subject: Re: segment matching variables in Qi-YACC (for Snorgers ;))
about patterns like
<<L>> <numbers> <<L>> := ...)
<string-prefix> <<boundary>> <endl> <<String>> <<boundary>> := (COERCE
<<String>> STRING);
> Here is a sugaring on top of Qi that enables you to have segment
> matching variables in Qi-YACC. <<...>> is a stuff matcher.
> <<X>> <numbers> <<Y>> := <numbers>;)
> <number> <numbers>;
> <number>;)
> -*- := (if (number? -*-) [-*-] #\Escape);)
> <<X>> :name <<Y>> := <<Y>>;)
> [Mark Tarver]
> [1 2 3/4]