[antlr-interest] TreeParser transform examples
Michael Brade
brade at informatik.uni-muenchen.de
Wed Mar 15 01:30:28 PST 2006
On Tuesday 14 March 2006 17:31, Jose Ventura wrote:
> If I understand you, you want add STRING AST in OPERATORS.
> I don't test this code, but you can try anything also:
>
> structured_term!:
> * {AST aux=null;}*
> #(NS_LABEL #(PREFIX prefix:NCNAME)
> #(LOCAL label:NCNAME)
> {
> ## = #([OPERATORS,"operators"],
> #([TYPE_SEL,"type"], [STRING,"tree"]),
> #([NAMESPACE_SEL,"namespace"], prefix),
> #([LABEL_SEL,"label"], label),
> );
> * aux=##;
Heh, nice one! Thanks, it works. I still find it a little weird and hacky to
have to do that...
Cheers,
--
Michael Brade; KDE Developer, Student of Computer Science
|-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
°--web: http://www.kde.org/people/michaelb.html
KDE 4: Beyond Your Expectations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20060315/077329cb/attachment.bin
More information about the antlr-interest
mailing list