[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
%union with STL
From: |
Paritosh Aggarwal |
Subject: |
%union with STL |
Date: |
Fri, 22 May 2009 23:41:46 +0530 |
/*JIT PARSER BISON FILE*/
%{
#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
I want to include a pointer to an STL map entry, and
map<parameters>::iterator gives a similar error. Is there any way to
accomplish this.
BTW - removing the "const" before string removes this error, but iterator is
pointer to a pair<const string, int> type.
- %union with STL,
Paritosh Aggarwal <=
- Fwd: %union with STL, Paritosh Aggarwal, 2009/05/22
- Re: %union with STL, Tommy Nordgren, 2009/05/24
- Re: %union with STL, Luca, 2009/05/24
- Re: %union with STL, Tommy Nordgren, 2009/05/24
- Re: %union with STL, Hans Aberg, 2009/05/24
- Re: %union with STL, Luca, 2009/05/25
- Re: %union with STL, Hans Aberg, 2009/05/25
- Re: %union with STL, Luca, 2009/05/26
- Re: %union with STL, Hans Aberg, 2009/05/26
- Re: %union with STL, Vincent Zweije, 2009/05/27