It seems currently the precedences in infix_expression need to be > 0; when you use 0 for an operator, it fails to parse it correctly. As far as I can tell this is caused by the default value of current_prec = 1 in https://github.com/kschiess/parslet/blob/master/lib/parslet/atoms/infix.rb#L51. This could be set to 0, or even -Float::INFINITY, to support even negative precedences (which can come in handy when you want to add a low precedence operator and don't want to adjust all the existing precedences).
It seems currently the precedences in
infix_expression
need to be > 0; when you use 0 for an operator, it fails to parse it correctly. As far as I can tell this is caused by the default value ofcurrent_prec = 1
in https://github.com/kschiess/parslet/blob/master/lib/parslet/atoms/infix.rb#L51. This could be set to0
, or even-Float::INFINITY
, to support even negative precedences (which can come in handy when you want to add a low precedence operator and don't want to adjust all the existing precedences).