|
From: | Matthew Tedder |
Subject: | Why is this a Reduce/Shift Conflict? |
Date: | Sun, 17 Feb 2002 03:06:11 -0500 |
The bexpr AND bexpr line is giving Reduce/Shift conflicts. Why? The AND terminal token is only used there and it works if I change the AND token to '+', for example. All the other lines work appropriately. This doesn't seem right to me.. The whole project is attached. Execute the "comp" script to compile.. bexpr: BOOLIT { $$ = $1; } | nexpr EQ nexpr { if($1 == $3) { $$ = 1; } else { $$ = 0; } } | nexpr NE nexpr { if($1 != $3) { $$ = 1; } else { $$ = 0; } } | nexpr GT nexpr { if($1 > $3) { $$ = 1; } else { $$ = 0; } } | nexpr GE nexpr { if($1 >= $3) { $$ = 1; } else { $$ = 0; } } | nexpr LT nexpr { if($1 < $3) { $$ = 1; } else { $$ = 0; } } | nexpr LE nexpr { if($1 <= $3) { $$ = 1; } else { $$ = 0; } } | bexpr AND bexpr { if($1 && $3) { $$ = 1; } else { $$ = 0; } } ;
y.tab.h
Description: Text Data
mbasic.tab.c
Description: Text Data
mbasic.y
Description: Text Data
lex.yy.c
Description: Text Data
mbasic.h
Description: Text Data
sample.bas
Description: Text document
mbasic.l
Description: Text Data
mbasic.c
Description: Text document
comp
Description: application/shellscript
[Prev in Thread] | Current Thread | [Next in Thread] |