[il-antlr-interest: 20869] [antlr-interest] Turing the option(output=AST) on and off at run time

2008-12-05 Thread chain one
Is that possible?Due to the memory consuming issue, in the first pass, I only want to grab some data to be used in the second pass and at the second pass, the AST is built up using the same grammar file. So I need to turn on the option(output=AST) at the begin of the second pass. Is that possib

[il-antlr-interest: 20868] Re: [antlr-interest] [stringtemplate-interest] Generating text from models

2008-12-05 Thread John D. Mitchell
On Friday 2008.12.05, at 12:33 , Terence Parr wrote: [...] >> In addition to just querying attributes from the context, you can >> also pass parameters to (query) functions. And this is mandatory in >> our case. Our input data is XML and the templates emit portions from >> the XML by referring to

[il-antlr-interest: 20867] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Jim Idle
On Fri, 2008-12-05 at 11:47 -0800, Howard Lewis Ship wrote: > I'm having a problem; I need to split my grammar into a lexer grammar > and a parser grammar so I can specify a superClass option for the > lexer grammar. > > My source files are > src/main/antlr/org/apache/tapestry5/internal/antlr/Pro

[il-antlr-interest: 20866] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Mike Pagel
>> Can ST do this as well? > Well, it depends on what the arguments are. if it's an attribute or > string of some kind, you can use the format option and a renderer. That would probably work but look a little weird I guess. > Any time I need to pass an argument back into the model from the > t

[il-antlr-interest: 20865] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Terence Parr
ha! I knew I have done this: http://www.codegeneration.net/tiki-read_article.php?articleId=65 IGenerate Java and XML code from the reflection API. > > thanks a lot. For a full model-to-text transformation you can then > merge the model's object tree and the corresponding template at the >

[il-antlr-interest: 20864] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Mike Pagel
Hey Ter, thanks a lot. For a full model-to-text transformation you can then merge the model's object tree and the corresponding template at the top of the hierarchy, and the latter then pulls in further more fine-grained templates as it is proceeds. And this is exactly what XPAND or much rathe

[il-antlr-interest: 20863] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Howard Lewis Ship
I'm having a problem; I need to split my grammar into a lexer grammar and a parser grammar so I can specify a superClass option for the lexer grammar. My source files are src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyTokens.g and PropertyExpression.g. The plugin generates a Property

[il-antlr-interest: 20862] [antlr-interest] new tool by Yang Jiang

2008-12-05 Thread Terence Parr
Hi, here is a nice gui tool from Yang that shows relationship between Java parse trees and source code: http://www.antlr.org/wiki/display/ANTLR3/Tool+showing+grammatical+structure+of+Java+code Ter List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.o

[il-antlr-interest: 20861] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Jim Idle
On Fri, 2008-12-05 at 09:57 -0800, Howard Lewis Ship wrote: > Is this the right plugin artiface? > > org.codehaus.mojo > antlr3-maven-plugin > 3.1.1.1 > No it is org.antlr as per teh post to the group: org.antlr an

[il-antlr-interest: 20860] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Howard Lewis Ship
Got it ... missed that the groupId had changed: org.antlr antlr3-maven-plugin 3.1.1.2 On Fri, Dec 5, 2008 at 9:39 AM, Jim Idle <[EMAIL PROTECTED]> wrote: > On Fri, 2008-12-05 at 09:30 -0800, Howard Lewis Ship wrote: > > I don't see it here: > > http://mirrors.i

[il-antlr-interest: 20859] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Jared Bunting
No. Use: org.antlr antlr3-maven-plugin 3.1.1.1 This plugin is derived from the original plugin at codehaus, but has been incorporated in the antlr project. -Jared Howard Lewis Ship wrote: > Is this the right plugin artiface? > > org.codehaus.mojo > antlr3-maven-plugin >

[il-antlr-interest: 20858] Re: [antlr-interest] New Maven artifact for compiling antlr grammars

2008-12-05 Thread Howard Lewis Ship
Is this the right plugin artiface? org.codehaus.mojo antlr3-maven-plugin 3.1.1.1 On Fri, Dec 5, 2008 at 9:39 AM, Jim Idle <[EMAIL PROTECTED]> wrote: > On Fri, 2008-12-05 at 09:30 -0800, Howard Lewis Ship wrote: > > I don't see it here: > > http://mirrors.ibibli

[il-antlr-interest: 20857] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Terence Parr
On Dec 5, 2008, at 5:00 AM, Oliver Zeigermann wrote: > Ah. So you pass in the root of your POJO graph and let ST do the rest? > Without using a tree walker? > > And the static POJO structure is your metamodel? > > Cool idea. > > Thanks for sharing :) > > Oliver > > P.S.: Can you share a demo tem

[il-antlr-interest: 20856] Re: [antlr-interest] newbie request for help

2008-12-05 Thread Jim Idle
On Thu, 2008-12-04 at 22:46 -0800, Kenny Leung wrote: > Hi All. > > I thought I would get my feet wet by writing a parser for Objective-C > type encodings. I thought it would be pretty easy for such a brief > "language", but it is turning out to be pretty difficult. > > One of the problems l

[il-antlr-interest: /] Re: [antlr-interest] Objective-C

2008-12-05 Thread Philip Mötteli
Hello, Am 04.12.2008 um 17:20 schrieb Jim Idle: > On Thu, 2008-12-04 at 09:07 +0100, Philip Mötteli wrote: >> >> I writing my first grammar and would like to use as language target >> Objective-C. I see, that quite some work has been done for >> Objective-C >> by Kay Röpke. Unfortunately the

[il-antlr-interest: 20854] Re: [antlr-interest] newbie request for help

2008-12-05 Thread Kenny Leung
On Dec 5, 2008, at 3:30 AM, Gavin Lambert wrote: > At 19:46 5/12/2008, Kenny Leung wrote: > >One of the problems lies in parsing something like this: > > > > {vids=^vids} > > > >which means a struct named "vids", which is composed of void * > >(^v), int, double, and short. > > > >After the "

[il-antlr-interest: 20852] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Oliver Zeigermann
Ah. So you pass in the root of your POJO graph and let ST do the rest? Without using a tree walker? And the static POJO structure is your metamodel? Cool idea. Thanks for sharing :) Oliver P.S.: Can you share a demo template that shows this? 2008/12/5 Mike Pagel <[EMAIL PROTECTED]>: > Hi the

[il-antlr-interest: 20851] Re: [antlr-interest] Generating text from models

2008-12-05 Thread Mike Pagel
Hi there, actually, I just noticed that ST *is* able to pull properties (in the C# or Java beans sense) into the template, which it obviously done through reflection. That way, I am already able to use any kind of model expressed in for form of bean-like metamodel classes... Love it. Mike M

[il-antlr-interest: 20850] Re: [antlr-interest] newbie request for help

2008-12-05 Thread Gavin Lambert
At 19:46 5/12/2008, Kenny Leung wrote: >One of the problems lies in parsing something like this: > > {vids=^vids} > >which means a struct named "vids", which is composed of void * >(^v), int, double, and short. > >After the "{", I need to interpret vids as a single token, and >after t

[il-antlr-interest: 20849] Re: [antlr-interest] newbie request for help

2008-12-05 Thread micha
On Friday 05 December 2008 07:46:10 Kenny Leung wrote: > Hi All. > > One of the interesting things I found was that this is legal: > > NUMBER : '0'..'9'; that's a lexer rule > but this is not: > > number : '0'..'9'; that's a parser rule, the ".." syntax is only allowed in lexer rules.

[il-antlr-interest: 20848] [antlr-interest] newbie request for help

2008-12-05 Thread Kenny Leung
Hi All. I thought I would get my feet wet by writing a parser for Objective-C type encodings. I thought it would be pretty easy for such a brief "language", but it is turning out to be pretty difficult. One of the problems lies in parsing something like this: {vids=^vids} which means