On Fri, May 09, 2008, Jeff Johnson wrote:
> On May 9, 2008, at 1:20 AM, Ralf S. Engelschall wrote:
>> On Thu, May 08, 2008, Jeff Johnson wrote:
>>
>>> [...]
>>> So any ideas about syntax? Off the top of my head, maybe
>>> :foo(fooarg1,fooarg2):bar(bararg)
>>> L->R (or R->L, it really doesn't matter yet) serial application
>>> of parameterized header extensions.
>>> [...]
>>
>> I think the ":foo(fooarg1,fooarg2):bar(bararg)" syntax plus a left to
>> right ("foo", then "bar") execution of the transformation makes both
>> sense and would be a good thing. Additionally, the transformator "foo"
>> should be searched both in an internal table of C-coded transformators
>> and as a Lua function so that one can easily hook into the processing.
>
> todo++
>
> Two questions:
>
> 1) "... the transformator "foo" ..."
> In the example I gave did you mean specifically that the initial "foo"
> should be handled differently
> than the final "bar". Presumably the "foo" as used by both of us has a
> different contextual
> meaning and all the tokens should be handled identically with a lua
> function overloading.
The "foo" and "bar" tokens all should be treated identically. They just
should have a left-to-right execution order.
> 2) implicit vs explicit Lua header tag/format extensions.
> By explicit, I mean that I'd do something like
> ...:lua(function,arg1,arg2)
> because its easier to code up. But implictly overloading all the
> tokens
> as possible lua function names could be done, is certainly prettier
> even if
> slightly harder coding.
> is :lua(funcion,arg1,arg2) gud enuf initially?
I think ":lua(...)" initially is certainly good enough.
> Since I'm gonna be messing with the --queryformat parser, I'm likely going
> to also see if I can't get syntax for a selector-by-value on tag contents,
> something
> like perl's "~=" like
> --qf '%{tag~=/pattern/:foo:bar}
> at the same time.
Good idea. I would use "%{tag:m/pattern/:foo:bar}" (filtering) and
""%{tag:s/pattern/subst/:foo:bar}" (adjusting) for the syntax.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Fri May 9 17:30:35 2008