corrected typo in yacc

This commit is contained in:
Raphaël LACROIX 2023-05-12 16:03:28 +02:00
parent 1f8fa678bc
commit 019a8c506e

4
yacc.y
View file

@ -112,7 +112,7 @@ Operation: tADD | tMUL | tSUB | tDIV;
*/
IfStatement1 : %empty {
int ligne =getCurrentLineNumber(); addLine("JMPF"); $<nbInt>$ = ligne ;
int ligne =getCurrentLineNumber(); addLine("JMF"); $<nbInt>$ = ligne ;
};
IfStatement : tIF Condition IfStatement1 InnerBlock tELSE {
@ -128,7 +128,7 @@ WhileStatement : tWHILE {
$1 = getCurrentLineNumber();
} Condition {
int current = getCurrentLineNumber();
addLine("JMPF");
addLine("JMF");
setConditionAddr(current,$3);
whileJumpAddr = current;
suppressCONDElements();