[il-antlr-interest: 23694] [antlr-interest] AST->Template: Not Getting It

2009-05-13 Thread Christopher Laco
I suck at this, clearly I don't get it. It feels like I've made zero progress in weeks. I finally got to the point where I can output a simple AST with one grammar, and I'm trying to use a tree grammar to translate that into the target language using templates. My simple tree: (DOCUMENT (GET '

[il-antlr-interest: 23657] [antlr-interest] What does this error mean in english?

2009-05-11 Thread Christopher Laco
"mismatched tree node: DOCUMENT expecting DOCUMENT" I'm not having very good luck trying to do simple things apparently. My ToStringTree: (DOCUMENT (PRINT 'variable')) My tree grammar: document : ^(DOCUMENT statement*) ; statement : ^(PRINT LITERAL) ; List: http://www.antlr.

[il-antlr-interest: 23656] [antlr-interest] ToStringTree

2009-05-11 Thread Christopher Laco
Is there a quick and dirty way to print out the tree with tabs/line feeds to make it a little more readable using the C# runtime? -=Chris List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---

[il-antlr-interest: 23626] Re: [antlr-interest] Targeting different runtimes with the same grammar

2009-05-08 Thread Christopher Laco
Chris Lambrou wrote: > Is there a recommended way of writing a grammar so that it can be used to > target different runtimes? I'd like to be able to use the same grammar to > target both C# (for use in an ASP.NET server application) and in JavaScript > (for use by clients). The ANTLR book is fill

[il-antlr-interest: 23600] Re: [antlr-interest] Whitespace issues

2009-05-07 Thread Christopher Laco
I'm having a problem turning this text into tokens. I know it has to be something obvious, but I can't see it... [%"Dear "%][% name %][%", It has come to our attention that your account is in arrears to the sum of "%][% debt %][%". Please settle your account before "%][%