> Le 7 oct. 2020 à 23:52, Chris verBurg a écrit :
>
>
> I don’t know if this is helpful, but is there a problem with ambiguity
> between these parses:
>
> (IF 1=1 THEN PRINT “3” ) : PRINT “4”
>
> and
>
> IF 1=1 THEN (PRINT “3” : PRINT “4”)
>
> ? Because if the shift/reduce conflict reso
I don’t know if this is helpful, but is there a problem with ambiguity between
these parses:
(IF 1=1 THEN PRINT “3” ) : PRINT “4”
and
IF 1=1 THEN (PRINT “3” : PRINT “4”)
? Because if the shift/reduce conflict resolved toward the first one, then $4
really only has one statement anyway.
-Ch
Noob Q here. I have these rules in my BASIC.y:
statements:
statement
{
$$ = g_list_prepend(NULL, $1);
}
|
statement ':' statements
{
$$ = g_list_prepend($3, $1);
}
;
statement:
(among others...)
IF expres