Le 28 avr. 09 à 20:55, Danny Backx a écrit :
On Tue, 2009-04-28 at 14:46 -0400, Joel E. Denny wrote:
On Tue, 28 Apr 2009, Danny Backx wrote:
I didn't recognize the significance of this earlier. If the token
STACKSIZE is conflicting with a system header in MacOS, perhaps a
better
fix is to
On 15 Apr 2009, at 14:41, Philip Herron wrote:
So my problems is i have a program which it would be nice to have 2
completely separate lexers only one of them needs a yacc grammar file.
It seems you have not gotten a reply.
Set the name-space prefix by 'bison --name-prefix=' and 'flex -
P',
Hans Aberg wrote:
> On 15 Apr 2009, at 14:41, Philip Herron wrote:
>
>> So my problems is i have a program which it would be nice to have 2
>> completely separate lexers only one of them needs a yacc grammar file.
>
> It seems you have not gotten a reply.
>
> Set the name-space prefix by 'bison --n
Hello everybody,
I would like to receive an hint about reading parser stack.
Suppose my (fantasy) bison grammar is this:
%start A
A : B C D | B E D
B: ID
C: '*'
D: IDENTIFIER
E: '-'
where IDENTIFIER has been defined like [a-zA-Z0-9]+ using flex.
How can I print "the identifier was: %s" when
Thank you for you fast answer. I've already tried this way but it doesn't
work fine. I'm newbie, so I think I don't know something useful.
If I use a rule like that you wrote, Bison shows this message
"The identifier was: (null)".
I've red something about yylval, so if I type in Lex file:
yylval=
Thats because you've not set up $2 properly..
Normally - you'd have something like :
%type C
in the top section of your .y file.
along with something like :
%union {
char str[2000];
}
Now - you may be using 'int's etc - so you can add more types for
Something like :
A: B C D {
printf("The identifier was: %s", $2);
}
| B E D {
printf("It wasn't an identifier...");
}
;
2009/4/29 Mark Redd
> Hello everybody,
> I would like to receive an hint about reading parser stack.
>
> Suppose my (fantasy) bison grammar is this:
>
> %sta
Mike Aubury wrote:
> Thats because you've not set up $2 properly..
>
> Normally - you'd have something like :
>
> %type C
>
> in the top section of your .y file.
> along with something like :
>
> %union {
> char str[2000];
> }
>
> Now - you may be using 'int's et