[antlr-interest] Jim Idle: C-Runtime and C++Builder, E2342 Type mismatch in parameter

Udo Weik WeikEngOff at aol.com
Sat Oct 1 00:21:51 PDT 2011


Hello Jim,

I'm getting some
   E2342 Type mismatch in parameter 'freeptr' (wanted 'void (*)(void *)', got 'int')
errors in code lines like
   FOLLOWPUSH(FOLLOW_subtype_indication_in_access_type_definition730) );
Any hint?


And in the following functions an analog problem
   E2342 Type mismatch in parameter 'state' (wanted 'ANTLR3_RECOGNIZER_SHARED_STATE_struct *', got 'int')I
I just declared state and initialized it with NULL:

ANTLR3_API pXYZLexer XYZLexerNew( pANTLR3_INPUT_STREAM instream )
{
   pANTLR3_RECOGNIZER_SHARED_STATE state ; // UW
   state = NULL ; // UW

   // See if we can create a new lexer with the standard constructor
   //
   // UW  return XYZLexerNewSSD(instream, NULL);
   return XYZLexerNewSSD(instream, state); // UW
}

Same problem with
ANTLR3_API pXYZParser XYZParserNew( pANTLR3_COMMON_TOKEN_STREAM instream )
{
   pANTLR3_RECOGNIZER_SHARED_STATE state ; // UW
   state = NULL ; // UW

   // See if we can create a new parser with the standard constructor
   //
// UW  return XYZParserNewSSD(instream, NULL);
   return XYZParserNewSSD(instream, state); // UW
}


Is it in any way possible to avoid tabs in the generated code?
I would prefer two spaces for one tab.


Many thanks and greetings
Udo


More information about the antlr-interest mailing list