[antlr-interest] Re: SQL2 and AST

lgcraymer lgc at mail1.jpl.nasa.gov
Mon Mar 8 20:37:52 PST 2004


This is probably the AST factory initialization crash.  Take a look at
the "Using Custom AST Types" in the C++ runtime section of the ANTLR
manual.

--Loring


--- In antlr-interest at yahoogroups.com, "kristoff_tempelaere"
<kristoff_tempelaere at y...> wrote:
> Hello,
> 
> I'm a student, new to ANTLR and need it to create a SQL-parser, so I 
> used Lubos Vnuk's grammar (nice one!, only the DML-subset) and 
> generate C++ code with Visual Studio 6. I use the latest version 
> (20040225) of Ric Klaren...
> 
> With buildAst=false it works fine, also with buildAst=true I can 
> compile and build it, but when I run it, I get an "access violation"-
> error. So there must be some (memory-allocating?)-error in the AST-
> code.  
> 
> Someone who knows how to fix this?  Or did someone got it work with 
> another compiler?  Maybe it can help if I give you the call stack 
> when the error occurs, so you find it below... 
> 
> It would help me a lot, cos I really need the AST :-(
> Kristoff Tempelaere
> 
> 
> 
> -------------------------- Call Stack -------------
> std::vector<std::pair<char const *,antlr::ASTRefCount<antlr::AST>  
> (__cdecl*)(void)> *,std::allocator<std::pair<char const 
> *,antlr::ASTRefCount<antlr::AST>  (__cdecl*)(void)> *> >::begin() 
> line 93 + 32 bytes
> 
> std::vector<std::pair<char const *,antlr::ASTRefCount<antlr::AST>  
> (__cdecl*)(void)> *,std::allocator<std::pair<char const 
> *,antlr::ASTRefCount<antlr::AST>  (__cdecl*)(void)> *> >::operator[]
> (unsigned int 232) line 132 + 37 bytes
> 
> antlr::ASTFactory::create(antlr::RefCount<antlr::Token> {...}) line 
> 155 + 49 bytes
> DmlSQL2Parser::query_spec() line 4991 + 50 bytes
> DmlSQL2Parser::simple_table() line 4924
> DmlSQL2Parser::query_primary() line 4898
> DmlSQL2Parser::query_term() line 4786
> DmlSQL2Parser::query_exp() line 579
> DmlSQL2Parser::select_stmt() line 210
> DmlSQL2Parser::sql_data_stmt() line 163
> DmlSQL2Parser::sql_stmt() line 100



 
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