]> git.saurik.com Git - cycript.git/blobdiff - Cycript.y
Docuemented some precedence rules (going to target a more normalized parser).
[cycript.git] / Cycript.y
index b1d2230ee4013a9bd7c0d15b8fa1c5ea8c797dce..4b90f427802f69ddf8233eeb2a0796e4fac80b15 100644 (file)
--- a/Cycript.y
+++ b/Cycript.y
@@ -326,6 +326,19 @@ int cylex(YYSTYPE *lvalp, cy::location *llocp, void *scanner);
 %type <argument_> SelectorList
 %type <argument_> VariadicCall
 
+%left "*" "/" "%"
+%left "+" "-"
+%left "<<" ">>" ">>>"
+%left "<" ">" "<=" ">=" "instanceof" "in"
+%left "==" "!=" "===" "!=="
+%left "&"
+%left "^"
+%left "|"
+%left "&&"
+%left "||"
+
+%right "=" "*=" "/=" "%=" "+=" "-=" "<<=" ">>=" ">>>=" "&=" "^=" "|="
+
 %nonassoc "if"
 %nonassoc "else"