[nem-en] macro-based syntax extensions.
Michal Moskal
michal.moskal at gmail.com
Fri Mar 2 12:13:50 CET 2007
On 3/2/07, Ivan A Eryshov <ivan.eryshov at gmail.com> wrote:
> Guys,
>
> I have a questions about macro-based syntax extensions.
>
> 1. Why syntax extension's keywords can not contain numeric symbols?
I guess it's a bug.
> 2. Can I use in syntax non-keyword at first position?
Not really. The way the parser works, is by building a tree of syntax
extensions, and the root of that tree needs to be a keyword. It might
be possible to overcome that limitation by looking more than one token
ahead in the lexer, but this would probably require major changes in
the parser.
In such situations you can try to define your macro to be an operator,
which makes it possible to use infix.
--
Michał
More information about the devel-en
mailing list