[antlr-interest] FW: C example error

Jim Idle jimi at temporal-wave.com
Sat Apr 3 08:24:26 PDT 2010


I think you might need to update the header files to be honest. Your  
abort isnit because of the warning.

On Apr 2, 2010, at 21:37, "Brian Catlin" <BrianC at sannas.org> wrote:

> I'm sorry to aggravate you, I didn't know if anyone even saw the  
> email, and
> I didn't know about markmail.  Also, it is not just a warning,  
> because the
> program dies with an access violation from dereferencing a null  
> pointer.
>
> -Brian
>
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Jim Idle
> Sent: Friday, April 02, 2010 05:20
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] FW: C example error
>
> 1) Because I am very busy;
> 2) Because it is a warning not an error and is not stopping you doing
> anything;
> 3) Because it isn't specific to the C target as 10 seconds of  
> investigation
> would have shown you;
> 4) Because you can use antlr.markmail.org and find the question  
> answered a
> number of times;
> 5) Because you aren't paying me;
> 6) If you posted it 3 times and I did not answer, perhaps this tells  
> you
> something about the question;
>
> Does that answer your question?
>
> Jim
>
>> -----Original Message-----
>> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
>> bounces at antlr.org] On Behalf Of Brian Catlin
>> Sent: Friday, April 02, 2010 1:02 AM
>> To: antlr-interest at antlr.org
>> Subject: [antlr-interest] FW: C example error
>>
>> Is there any particular reason why the maintainers of the C port
>> aren't interested in this question?  This is the third time in the
>> last 4 weeks I've posted this, and I haven't received a single
>> response
>>
>>
>>
>> -Brian
>>
>>
>>
>> From: Brian Catlin [mailto:BrianC at sannas.org]
>> Sent: Monday, March 29, 2010 21:24
>> To: antlr-interest at antlr.org
>> Subject: C example error
>>
>>
>>
>> I tried to build the PolyDiff example from Examples-v3, using
>> ANTLR-3.1-2009-06-28 and libantlr3c-3.2 in Visual Studio 2008.  The
>> output from the build:
>>
>>
>>
>> 1>------ Rebuild All started: Project: polydiff, Configuration: Debug
>> Win32
>> ------
>>
>> 1>Deleting intermediate and output files for project 'polydiff',
>> configuration 'Debug|Win32'
>>
>> 1>Translating to parser/lexer combination
>>
>> 1>Translating to parser/lexer combination
>>
>> 1>Translating to parser/lexer combination
>>
>> 1>Translating to parser/lexer combination
>>
>> 1>.\PolyDifferentiator.g(0,0) : warning 138 : grammar
>> PolyDifferentiator: no
>> start rule (no rule can obviously be followed by EOF)
>>
>> 1>Compiling...
>>
>> 1>Simplifier.c
>>
>> 1>PolyPrinter.c
>>
>> 1>PolyParser.c
>>
>> 1>PolyLexer.c
>>
>> 1>PolyDifferentiator.c
>>
>> 1>main.c
>>
>> 1>Generating Code...
>>
>> 1>Compiling manifest to resources...
>>
>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
>>
>> 1>Copyright (C) Microsoft Corporation.  All rights reserved.
>>
>> 1>Linking...
>>
>> 1>LINK : C:\MIMOS\ANTLR\examples-v3\C\Debug\polydiff.exe not found or
>> not
>> built by the last incremental link; performing full link
>>
>> 1>   Creating library C:\MIMOS\ANTLR\examples-v3\C\Debug\polydiff.lib
>> and
>> object C:\MIMOS\ANTLR\examples-v3\C\Debug\polydiff.exp
>>
>> 1>Embedding manifest...
>>
>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
>>
>> 1>Copyright (C) Microsoft Corporation.  All rights reserved.
>>
>> 1>Build log was saved at
>> "file://c:\MIMOS\ANTLR\examples-v3\C\polydiff\Debug\BuildLog.htm
>> <file:///c:\MIMOS\ANTLR\examples-v3\C\polydiff\Debug\BuildLog.htm> "
>>
>> 1>polydiff - 0 error(s), 1 warning(s)
>>
>> ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
>>
>>
>>
>> As you can see, there is a warning generating PolyDifferentiator.g
>>
>>
>>
>> When I run the resulting program, I get an access violation in
>> addChild
>> (antlr3basetree.c) at the ->, because child has not been initialized
>>
>>
>>
>> void
>>
>> addChild (pANTLR3_BASE_TREE tree, pANTLR3_BASE_TREE child)
>>
>> {
>>
>>      ANTLR3_UINT32   n;
>>
>>      ANTLR3_UINT32   i;
>>
>>
>>
>>      if    (child == NULL)
>>
>>      {
>>
>>            return;
>>
>>      }
>>
>>
>>
>> ->  if    (child->isNilNode(child) == ANTLR3_TRUE)
>>
>>      {
>>
>>            if  (child->children != NULL && child->children ==
>> tree->children)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/ 
>> your-
>> email-address
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list