On Thu, Aug 20, 2009 at 4:39 PM, erik quanstrom<quans...@quanstro.net> wrote:
>> > i'm sure i've done them.  this is a lame example, since i can't remember
>> > where i've used these techniques off the top of my head
>> >
>> > ,x:.*: g/#pragma/ x:[^  ]+[     ]: g/print/p
>>
>> How is this recursive?
>
> in the sense that 'x' is recursively applied to the output of 'x'.
> i have no idea what you would mean by applying the same 'x'
> expression to the output of said 'x' expression, as regular expressions
> are greedy and can't count.  wouldn't they all loop forever?

No, I know you can apply them `recursively', I mean something more
like an expression in a CFG or yacc.

>
> can you outline somehow what you're thinking of?

Basically, if you could take a bracketed expression in sam and then
name it, and then call it recursively.

All the problems with CFGs (shift/reduce problems, ambiguities, etc)
would possibly apply.

>
> - erik
>
>

Reply via email to