Posted By:
Marc_Fiammante
Posted On:
Thursday, November 15, 2001 01:01 AM
I am trying to use Custom AST but I am getting an invalid memory access I am compiling with Visual C++ 6.0 under Windows 2000. Thank you for helping debug. To try I tested using the provided CommonAST by adding the following to exprAST.g (example in doc does not work) header ""post_include_hpp"" { #include ""antlr/CommonAST.hpp"" } ..... options { ... buildAST=true; ASTLabelType = ""antlr::RefCommonAST""; // change default of ""AST"" } In the Main I have parser.setASTNodeFactory(&CommonAST::factory); parser.expr(); // fail
More>>
I am trying to use Custom AST but I am getting an invalid memory access
I am compiling with Visual C++ 6.0 under Windows 2000. Thank you for helping debug.
To try I tested using the provided CommonAST by adding the following to exprAST.g (example in doc does not work)
header ""post_include_hpp"" {
#include ""antlr/CommonAST.hpp""
}
.....
options {
...
buildAST=true;
ASTLabelType = ""antlr::RefCommonAST""; // change default of ""AST""
}
In the Main I have
parser.setASTNodeFactory(&CommonAST::factory);
parser.expr(); // fails here with test.in in TokenBuffer
....
void TokenBuffer::fill(int amount)
{
RefToken t;
syncConsume();
// Fill the buffer sufficiently to hold needed tokens
while (queue.entries()
< amount + markerOffset) {
// Append the next token
t=input.nextToken(); // Fails here
Any clues welcome.
<<Less