[il-antlr-interest: 21675] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Jim Idle
Andy Grove wrote: > Hi, > > In my generated parse, a variable "a1" is declared thus: > > DbsMySQL_CPPParser_alias1_return a1; > > Under certain conditions the variable gets initialized by calling a > method: > > a1=alias(ctx); > > However, when parsing my input, the variable is not getting >

[il-antlr-interest: 21674] Re: [antlr-interest] C runtime issue

2009-02-03 Thread Jim Idle
Andy Grove wrote: > Hi, > > When I invoke my generated C parser, I see memory usage climb from > 770MB to 4GB in a few seconds and the parser never returns. My init > code is as follows: > Hi Andy, I have recently made a lot of changes to try an auto-track and release memory and rewrite stream

[il-antlr-interest: 21676] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Andy Grove
Hi Jim, I have further info on this now. Here's the relevant portion of grammar. The "a1" is optional but is always referenced in the action. This works fine when generating Java code from the grammar (the action gets passed a NULL parameter for "a1"). The generated C code has a NULL check for a1.

[il-antlr-interest: 21677] Re: [antlr-interest] Theading Tree Walkers

2009-02-03 Thread Jim Idle
Gary R. Van Sickle wrote: From: Jim Idle code_d...@nym.hush.com wrote: Hi Jim, Will the v3 antlr C++ module be free threading when its finally released ? Yes, but you can use the C runtime with C++ right now. Jim FWIW, I can confirm this

[il-antlr-interest: 21678] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Jim Idle
Andy Grove wrote: > Hi Jim, > > I have further info on this now. Here's the relevant portion of > grammar. The "a1" is optional but is always referenced in the action. > This works fine when generating Java code from the grammar (the action > gets passed a NULL parameter for "a1"). The generate

[il-antlr-interest: 21679] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Andy Grove
Jim, Thanks. I'll modify the grammar and that will work fine with Java or C. It would be nice if the C generator could init the member variables of the struct so that the generated NULL check doesn't cause a seg fault. Just a nice to have though. Thanks again. Andy. On Tue, Feb 3, 2009 at 10:18

[il-antlr-interest: 21680] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Jim Idle
Andy Grove wrote: > Jim, > > Thanks. I'll modify the grammar and that will work fine with Java or > C. It would be nice if the C generator could init the member variables > of the struct so that the generated NULL check doesn't cause a seg > fault. Just a nice to have though. I can no longer re

[il-antlr-interest: 21682] [antlr-interest] Evaluate the AST tree Twice

2009-02-03 Thread jack zhang
Hi,   I need to walk the resulting ast tree twice with different tree parser. Is it possible ? I tried following code but it give me "NullPointerException".   // Build the tree... QueryParser.start_return r = parser.parse(); // Walk the tree once... CommonTreeNodeStream nodes = new CommonTreeNode

[il-antlr-interest: 21684] [antlr-interest] ActionScript target - new to parsers

2009-02-03 Thread Brian Nelson
Let me start off by saying that my background is not in parsers or compilers. I am trying to parse CSS files. I have found a working grammar and the source works when I pass a string of random CSS I have generated. I now have no clue as to how to hook into those points and get the results

[il-antlr-interest: 21685] Re: [antlr-interest] ActionScript target - new to parsers

2009-02-03 Thread Jim Idle
Brian Nelson wrote: Let me start off by saying that my background is not in parsers or compilers. I am trying to parse CSS files. I have found a working grammar and the source works when I pass a string of random CSS I have generated. I now have no clue as to how to hook into those po

[il-antlr-interest: 21683] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Jim Idle
Gavin Lambert wrote: > At 07:46 4/02/2009, Jim Idle wrote: > >I can no longer remember why it does not do this. I will look > >in to it, but I think that the issue is you can return anything > >you like in the structure and so if it is not something that > >can be initialized to NULL, it breaks th

[il-antlr-interest: 21681] Re: [antlr-interest] Error in generated C code (struct referenced without being initialized)

2009-02-03 Thread Gavin Lambert
At 07:46 4/02/2009, Jim Idle wrote: >I can no longer remember why it does not do this. I will look >in to it, but I think that the issue is you can return anything >you like in the structure and so if it is not something that >can be initialized to NULL, it breaks the code generation. You cou

[il-antlr-interest: 21686] Re: [antlr-interest] Error: TokenStreamException while reading Grammer

2009-02-03 Thread Chal Chale apne Ghar
Hi Gavin, Thanks for quick Response. It was really helpful to me. After trying with the antlr v3 , I am getting different error in console. D:\Actuate\Samplelexer-parser\ConversionTool>java org.antlr.Tool D:\Actuate\VB\v b_org.g ANTLR Parser Generator Version 3.1.1 error(100): D:\Actuate\VB\vb_o

[il-antlr-interest: 21687] [antlr-interest] Fwd: Error: TokenStreamException while reading Grammer

2009-02-03 Thread Chal Chale apne Ghar
Hi Gavin, Thanks for quick Response. It was really helpful to me. After trying with the antlr v3 , I am getting different error in console. D:\Actuate\Samplelexer-parser\ConversionTool>java org.antlr.Tool D:\Actuate\VB\v b_org.g ANTLR Parser Generator Version 3.1.1 error(100): D:\Actuate\VB\vb_o

[il-antlr-interest: 21688] Re: [antlr-interest] Error: T okenStreamException while reading Grammer

2009-02-03 Thread Johannes Luber
Chal Chale apne Ghar schrieb: > > > Hi Gavin, > Thanks for quick Response. > It was really helpful to me. > After trying with the antlr v3 , I am getting different error in console. You are using the syntax for ANTLR 2.7.7 which is mostly incompatible with the one used by ANTLR 3. The general f

[il-antlr-interest: 21689] Re: [antlr-interest] Error: TokenStreamException while reading Grammer

2009-02-03 Thread Chal Chale apne Ghar
HI Johannes, Thanks for your reply. As you said the given grammer syntax is fro Antlr 2.7.7. Is there any previous version of AnltrWorks compatible with this grammer? regards, Gunjan On Wed, Feb 4, 2009 at 12:20 PM, Johannes Luber wrote: > Chal Chale apne Ghar schrieb: > > > > > > Hi Gavin,

[il-antlr-interest: 21690] Re: [antlr-interest] Error: TokenStreamException while reading Grammer

2009-02-03 Thread Chal Chale apne Ghar
Hi Johannes, One more thinig i woudl like to say that in my very first mail, i had tested this Grammer with Antlr version 2.7.5. Then alos it was throwing me Token StreamException as below mentioned: D:\Actuate\Samplelexer-parser\ConversionTool>java antlr.Tool > vb_org.txt > ANTLR

[il-antlr-interest: 21691] Re: [antlr-interest] Error: TokenStreamException while reading Grammer

2009-02-03 Thread Johannes Luber
Chal Chale apne Ghar schrieb: > Hi Johannes, > One more thinig i woudl like to say that in my very first mail, i had > tested this Grammer with Antlr version 2.7.5. Then alos it was throwing > me Token StreamException as below mentioned: > > D:\Actuate\Samplelexer-parser\ConversionTool>java antl