[il-antlr-interest: 23642] Re: [antlr-interest] Targetin g different runtimes with the same grammar

2009-05-10 Thread Matthew M. Burke
On 09/05/2009, at 7:59, 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

[il-antlr-interest: 23619] Re: [antlr-interest] Implementing if statements in a tree parsing Interpreter

2009-05-08 Thread Matthew M. Burke
Thanks to all who wrote with suggestions, etc. I finally twigged to a solution that allowed me to get the approach I had started to work---probably should have spotted this quicker. In case anybody's interested, the key line of code is flagged below: Matthew M. Burke wrote: > >

[il-antlr-interest: 23545] [antlr-interest] Implementing if statements in a tree parsing Interpreter

2009-05-06 Thread Matthew M. Burke
My next question: I am building an interpreter based on the ideas in http://www.antlr.org/wiki/display/ANTLR3/Simple+tree-based+interpeter. In particular, I am taking the first approach of starting a new tree parser for each function invocation. Now I need to implement if statements (well, a

[il-antlr-interest: 23513] [antlr-interest] Parsing Best Practices---Where to check for predefined names

2009-05-04 Thread Matthew M. Burke
I am building a parser for a language that has the following syntax for function invocations and a few "function-like" usages. In particular, statements such as Set 17 are valid for a handful of predefined names. In my grammar, I have a rule which describes what's allowed to be o

[il-antlr-interest: 23017] [antlr-interest] Targeting Objective-C

2009-04-05 Thread Matthew M. Burke
I've just downloaded ANTLR 3.1.3 as I am starting a project where I need to implement an interpreter in Objective-C. I see that while there is an Objective-C target, and what looks like quite a lot of work, it is currently broken. I'm willing to be brave and try and fix it, but before I ta