Permalink
Browse files

Additional Math

  • Loading branch information...
1 parent dd689f8 commit 1252cebeb92eb3cbe843966c8306f0d84c0b5cf3 Brian Gernhardt committed Jan 23, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 cish/src/cish/Grammar.pm
View
@@ -47,12 +47,16 @@ token quote:sym<"> { <?["]> <quote_EXPR: ':qq'> }
## Operators
INIT {
- cish::Grammar.O(':prec<u>, :assoc<left>', '%multiplicative');
- cish::Grammar.O(':prec<t>, :assoc<left>', '%additive');
+ cish::Grammar.O(':prec<v>, :assoc<unary>', '%unary');
+ cish::Grammar.O(':prec<u>, :assoc<left>', '%multiplicative');
+ cish::Grammar.O(':prec<t>, :assoc<left>', '%additive');
}
token circumfix:sym<( )> { '(' <.ws> <EXPR> ')' }
+token prefix:sym<-> { <sym> <O('%unary, :pirop<neg>')> }
+
+token infix:sym<%> { <sym> <O('%multiplicative, :pirop<mod>')> }
token infix:sym<*> { <sym> <O('%multiplicative, :pirop<mul>')> }
token infix:sym</> { <sym> <O('%multiplicative, :pirop<div>')> }

0 comments on commit 1252ceb

Please sign in to comment.