[antlr-interest] Problem when trying to run John Merrell's tutorial	(from antlr.org Getting Started page)
    Jorn Ronnow 
    jorn.news at gmail.com
       
    Sun Dec  3 04:21:59 PST 2006
    
    
  
I'm trying to work my way through John Merrell's ANTLR tutorial
(http://www.merrells.com/blog/work/archives/2002/01/accent_vol_2_no.html,
linked from http://www.antlr.org/doc/getting-started.html).
I've generated the lexer and parser files, and compiled them and Merrell's
main.cpp.
When I try to run the example, I get an access violation ("Access violation
reading location 0x00000014") following a call to parser.expr().
This is what happens in main():
    CalcLexer lexer(cin);
    CalcParser parser(lexer);
    parser.expr();
Tracing the call to CalcParser::expr(), I see that this function tries to
call astFactory->create(LT(1)), but astFactory is NULL, which makes the
program crash.
Clues, anyone?
(Compiler: MS VC++ 2005. ANTLR 2.7.7 lib built with static RTL, Merrell's
sample prog built with static RTL.)
(This message may be duplicated. I had problems posting it, so I've made a
few retries.)
--
/Jörn
    
    
More information about the antlr-interest
mailing list