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-09 14:25

>>20

Shut up Geoff.

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