APL Parrot Target Practice #13

APL grammar - expressions

token expression { 
    | <target> ← <expression>
    | <monadic_identifier> <expression>
    | <subexpression> [ <dyadic_identifier> <expression> ]?
}

token dyadic_identifier  { <[|⍟*⌈⌊○!+−×÷~∧∨⍲⍱<≤=≥>≠⍳⊖↑↓⍴⍕]> }

token monadic_identifier {
    ⎕← |
    <[|⍟*⌈⌊○!+−×÷~⍳⌽↑⍴⍕]>
}
Copyright © 2006 Will Coleda & Patrick Michaud