[antlr-interest] Dev-C++?

clocKwize clocKwize at blueyonder.co.uk
Mon Jun 7 07:49:42 PDT 2004


Ah. Thanks very much :) works now, just got to get to grips with this now
and I can start making something.

-----Original Message-----
From: Ric Klaren [mailto:klaren at cs.utwente.nl] 
Sent: 07 June 2004 15:14
To: antlr-interest at yahoogroups.com
Subject: Re: [antlr-interest] Dev-C++?

On Mon, Jun 07, 2004 at 01:54:51PM -0000, clockwize_2oo4 wrote:
> i'm trying to use dev c++ to compile, i've used one of the c++ 
> things from the getting started section, i made a new static library 
> project, compiled antlr.a, no errors, no warnings, great, i created a 
> console project, using calc.g from this example, i used java 
> antlr.Tool calc.g, worked, added the files to my project, pasted the 
> c++ from the example on the website, compiles fine, i run it and then 
> enter 1+1, press return and it crashes. anyone have any idea why?

If it's a calc example that builds and AST and there's not a snip like this
in it:

ASTFactory ast_factory;
parser.initializeASTFactory(ast_factory);
parser.setASTFactory(&ast_factory);

Then you're using an pre 2.7.2 example. Have a look at the calc example
from examples/cpp/calc/ those should build as well according to those
instructions.

2.7.2 had some changes with respect to heterogeneous ast handling that
require the ASTfactory to be initialized explicitly.

In the case your example has the above code, then try adding one of these
options to antlr when generating the C++ files:
  -traceLexer        have lexer rules call traceIn/traceOut.
  -traceParser       have parser rules call traceIn/traceOut.
  -traceTreeParser   have tree parser rules call traceIn/traceOut.

That should give you and idea where it crashes.
  
Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++----
---
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++----
---
  Quidquid latine dictum sit, altum viditur.
                 (Whatever is said in Latin sounds profound.)


 
Yahoo! Groups Links



 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list