Skip to content

forfirstctrl & forfirstblock ambiguity compiling bug #3

@PaulSnow

Description

@PaulSnow

forfirstctl ::= FOR FIRST OF array_expr:a WHERE bexpr:test

       {: RESULT = "dup { "+test+" } "+a+" forfirst "; :} 
       |
       FOR FIRST OF array_expr:a AND ITS eexpr:e1 WHERE bexpr:test 
       {: RESULT = "{ "+e1+" entitypush dup execute entitypop } { "+e1+" entitypush "+test+" entitypop } "+a+" forfirst "; :} 
       |
       FOR FIRST IN array_expr:a WHERE bexpr:test 
       {: RESULT = "dup { "+test+" } "+a+" forfirst "; :} ;

firstblock ::= FOR FIRST OF array_expr:a WHERE bexpr:test THEN block:body1 ELSEIFNONEAREFOUND block:body2

       {: RESULT = "{ "+body1+" } { "+body2+" } { "+test+" } "+a+" forfirstelse "; :} 
       |
       FOR FIRST OF array_expr:a AND ITS eexpr:e1 WHERE bexpr:test THEN block:body1 ELSEIFNONEAREFOUND block:body2
       {: RESULT = "{ "+e1+" entitypush "+body1+"entitypop } { "+body2+" } { "+e1+" entitypush "+test+"entitypop } "+a+" forfirstelse "; :} 
       |
       forfirstctl:ctl THEN block:body
       {: RESULT = "{ "+body+" } "+ctl+ "pop "; :} 
       ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions