On Sun, May 24, 2009 at 06:36:28PM +0200, Hans Aberg wrote: || On 22 May 2009, at 20:11, Paritosh Aggarwal wrote:
|| > %{ || > #include<map> || > #include "heading.h" || > || > using namespace std; || > || > int yyerror(char *s); || > int yylex(void); || > %} || > || > %union || > { || > pair<const string,int>* it; || > int val; || > } || > compiling this gives the following error: jitparser.y:15: error: ISO || > C++ || > forbids declaration of ‘pair’ with no type || > jitparser.y:15: error: expected ‘;’ before ‘<’ token This message is typical from g++ if you forgot to declare a template type. || In the above, make sure the header for std::pair is included - || impossible to see from your example. std::pair is declared in <utility>, so be sure to include that header. Ciao. Vincent. -- WCC - Smart Search & Match NL +31 30 7503222 vzwe...@wcc-group.com www.wcc-group.com
signature.asc
Description: Digital signature
_______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison