lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, May 4, 2013 at 1:13 PM, Pierre-Yves Gérardy <pygy79@gmail.com> wrote:
> Grammars are straightforward:
>
> `V(label)` is a sub-procedure call.
> the key-value pairs are respectively sub-procedure names and definition.
>
> Each grammar is self-contained. If a grammar has a sub grammar, the
> `V()` calls do not cross the parent-child boundaries.
>
> Groups are a bit more complex, and behave differently according to the
> capture that surrounds them, if any. No time now, more on this later.
>
> -- Pierre-Yves

I forgot: V() labels can be any Lua object.

The entry point of the grammar is the numeric 1 key. If a string is
found there instead of a pattern, it is turned into a V() call to that
label.

-- Pierre-Yves