[antlr-interest] Problem with "C" code generation on tree parser

Harmon Nine hnine at isis.vanderbilt.edu
Thu Dec 13 07:17:57 PST 2007


A very important point that I forgot to mention:

I'm using the "C" code generation on a tree-grammar.  The "C" code
generation works fine for the parser-grammar.

Are you using the "C" code generation for a tree-grammar?

Thanks.
-- Harmon

> -----Original Message-----
> From: Ramon Verbruggen [mailto:Ramon.Verbruggen at quintiq.com]
> Sent: Thursday, December 13, 2007 3:09 AM
> To: antlr-interest at antlr.org
> Cc: Harmon Nine
> Subject: Re: Problem with "C" code generation on tree parser
> 
> Harmon,
> 
> I'm happily using ANTLR 3.0.1 with the C runtime and Visual Studio
> 2005, the options in my grammar look like this:
> 
> options
> {
> 	output=AST;
> 
> 	//For debugging with ANTLRWorks, comment out the following two
> lines:
> 	language=C;
> 	ASTLabelType=pANTLR3_BASE_TREE; // <==== I think this is your
> problem
> }
> 
> My grammar is not a tree grammar though if I understand the
terminology
> correctly: it just takes text as input and produces an AST as output.
If
> I am not mistaken a tree grammar in ANTLR is a grammar that operates
on
> a tree, i.e. takes a tree as input.
> 
> > Since C++ code generation is not available for 3.0.1, I'm trying to
> > interface to the "C"-generated code.
> >
> >
> > The options in the ".g" file are:
> >
> >options {
> >
> >  language=C;
> >
> >  output=AST;
> >
> >  tokenVocab=MatLab;
> >
> >  ASTLabelType=CommonTree;
> >
> >}
> >
> I hope this helps,
> 
> Ramon
> 
> 
> 
> This message contains information that may be privileged or
confidential
> and is the property of Quintiq. It is only intended for the person to
> whom it is addressed. If you are not the intended recipient, you are
not
> authorized to read, print, retain, copy, disseminate, distribute or
use
> this message or any part thereof. If you have received this message in
> error, please notify the sender immediately and delete all copies of
> this message. Please note that e-mails are susceptible to change,
> therefore they are not binding.


More information about the antlr-interest mailing list