Allen Wirfs-Brock wrote:
So, from that perspective, why didn't you make it:
ArrLit:
'[' AssExpList ']'
| '[' Exp FOR ID OF Exp IF Exp ']'
Because that is ambiguous, with a reduce/reduce conflict on lookahead ',':
state 6
3 AssExpList: AssExp .
5 Exp: AssExp .
FOR reduce using rule 5 (Exp)
',' reduce using rule 3 (AssExpList)
',' [reduce using rule 5 (Exp)]
$default reduce using rule 3 (AssExpList)
You can spot it by inspection given
AssExpList:
AssExp
| AssExpList ',' AssExp
;
and
Exp:
AssExp
| Exp ',' AssExp
;
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss