Browse Source

added a reference to the precedence climbing algorithm used here

pull/21/head
Wesley Kerfoot 12 years ago
parent
commit
3cafc6b06f
  1. 5
      parse.js

5
parse.js

@ -298,7 +298,10 @@ function computeApp(tokens) {
} }
} }
//Parses infix expressions by precedence climbing /*Parses infix expressions by precedence climbing
See this for more info and an implementation in python
http://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing/
*/
function parseInfix(tokens, minPrec, lhs) { function parseInfix(tokens, minPrec, lhs) {
if (!lhs) { if (!lhs) {
var lhs = parse(tokens); var lhs = parse(tokens);

Loading…
Cancel
Save