[antlr-interest] Some C target issues

Jim Idle jimi at temporal-wave.com
Tue Apr 1 12:11:04 PDT 2008


1) Set it to anything, but pANTLR3_BASE_TREE is probably best;

2) In tree grammars, you just use @includes or @headers or @members etc;

3) This is protected in the current 3.1 source;

4) I'll look at that one, but where were you using the @declarations? I have a number of parsers that rely on this, but I will check that it is still working for tree parsers. Can you post an example to save time?

 

Jim

 

From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Chris Snyder
Sent: Tuesday, April 01, 2008 11:03 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Some C target issues

 

Hello,

 

1) Is there a default ASTLabelType=[?] to get rid of this warning? 

warning(152): tree grammar MScriptToBlock has no ASTLabelType option

 

2) Following the guidelines here: http://www.antlr.org/api/C/index.html, in my Tree grammar I tried changing 

 

@header {

#include <string.h>

#include <string.h>

#include <iostream.h>

}

 

To this

 

@parser::includes {

#include <string.h>

#include <iostream.h>

}

 

And I get this error:

error(143): unknown or invalid action scope for tree grammar: parser

 

@parser::header also failed with the same error

 

3) The last version of code I have from 3/13/2008 still had this warning

y:\t_vec_cots\include\antlr3\antlr3defs.h(75) : warning C4005: '_CRT_SECURE_NO_DEPRECATE' : macro redefinition

 

4) I tried using the @declarations section in my tree grammar and although no warnings were generated none of the code in the @declarations section was added to either the generated C or h files.

 

 

Thanks,

Chris

 

T-VEC Technologies, Inc.

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080401/c8d2cf05/attachment.html 


More information about the antlr-interest mailing list