Re: Debugging "$4"

2020-10-07 Thread Akim Demaille
> 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

Re: Debugging "$4"

2020-10-07 Thread Chris verBurg
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

Debugging "$4"

2020-10-07 Thread Maury Markowitz
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