4-2-1t

Óïðîùåííûé èíòåðïðåòàòîð: íåò ïðèîðèòåòîâ îïåðàöèé

 

Fact {
    0  = 1;
    sN = <Int sN'*'Fact(sN'-'1)>;
}

Int {
    sN        = sN;
    tX '+' eY = <ADD (<Int tX>) <Int eY>>;
    tX '-' eY = <SUB (<Int tX>) <Int eY>>;
    tX '*' eY = <MUL (<Int tX>) <Int eY>>;
    (eX)      = <Int eX>;
    sF (eX)   = <Apply sF <Int eX>>;
}

Apply {
    Fact eN = <Fact eN>;
}