Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dangling Else Ambiguity

Name: OMG LEFT RECURSION111!! 2007-12-09 11:36

Halp /prog/, I want to solve the Dangling Else Ambiguity here but I keep screwing it up.

void IfStmt() : {}
{
        <IF> Expr() <THEN> Stmt()
    |    <IF> Expr() <THEN> Stmt() <ELSE> Stmt()
}

void Stmt() : {}
{
        Assignment()
    |    IfStmt()
    |    WhileStmt()
    |    CaseStmt()
    |    Function()
    |    IOStmt()
    |    Block()
    |    Return()
}

Name: Anonymous 2007-12-10 11:12

>>29 is an enterprise suit that can't have fun with programming;
>>30 is a guy who kones Haskell, Lisp and C (because Haskell and Lisp will never get me a job);
>>31 is a toy language smug weenine that will never have a job

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List