Compiler with operator precedence parsing
grammar ABC::Grammar is HLL::Grammar { rule TOP { <EXPR> } token term:sym<value> { <integer> } token circumfix:sym<( )> { '(' <.ws> <EXPR> ')' } token prefix:sym<-> { '-' <O(':prec<3>, :assoc<unary>, :pirop<neg>')> } token infix:sym<*> { '*' <O(':prec<2>, :pirop<mul>')> } token infix:sym</> { '/' <O(':prec<2>, :pirop<div>')> } token infix:sym<+> { '+' <O(':prec<1>, :pirop<add>')> } token infix:sym<-> { '-' <O(':prec<1>, :pirop<sub>')> } }