diff options
| author | student <student@192.168.1.186> | 2017-03-24 11:51:10 -0400 |
|---|---|---|
| committer | student <student@192.168.1.186> | 2017-03-24 11:51:10 -0400 |
| commit | b168fd38be0bb344d268bfd11d14df36bb9fd4f2 (patch) | |
| tree | eed830c512ffa54b7afc4972cba67c2c818b8740 /BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java | |
| parent | 33918524d7faab0146a0a92c13eaaef46cdbea8a (diff) | |
Update Pratt parser
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java index 5844c49..82ec843 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/LeftCommands.java @@ -40,7 +40,7 @@ public class LeftCommands { @Override public ITree<Token<K, V>> leftDenote(ITree<Token<K, V>> operand, Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { - ITree<Token<K, V>> opr = ctx.parse.parseExpression(rightBinding(), ctx.tokens, ctx.state); + ITree<Token<K, V>> opr = ctx.parse.parseExpression(rightBinding(), ctx.tokens, ctx.state, false); return new Tree<>(operator, operand, opr); } @@ -101,7 +101,7 @@ public class LeftCommands { @Override public ITree<Token<K, V>> leftDenote(ITree<Token<K, V>> operand, Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { - ITree<Token<K, V>> inside = ctx.parse.parseExpression(insidePrec, ctx.tokens, ctx.state); + ITree<Token<K, V>> inside = ctx.parse.parseExpression(insidePrec, ctx.tokens, ctx.state, false); ctx.tokens.expect(term); @@ -142,11 +142,11 @@ public class LeftCommands { @Override public ITree<Token<K, V>> leftDenote(ITree<Token<K, V>> operand, Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { - ITree<Token<K, V>> inner = ctx.parse.parseExpression(innerExp, ctx.tokens, ctx.state); + ITree<Token<K, V>> inner = ctx.parse.parseExpression(innerExp, ctx.tokens, ctx.state, false); ctx.tokens.expect(term); - ITree<Token<K, V>> outer = ctx.parse.parseExpression(1 + leftBinding(), ctx.tokens, ctx.state); + ITree<Token<K, V>> outer = ctx.parse.parseExpression(1 + leftBinding(), ctx.tokens, ctx.state, false); return new Tree<>(mark, inner, operand, outer); } @@ -176,7 +176,7 @@ public class LeftCommands { @Override public ITree<Token<K, V>> leftDenote(ITree<Token<K, V>> operand, Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException { - ITree<Token<K, V>> tree = ctx.parse.parseExpression(1 + leftBinding(), ctx.tokens, ctx.state); + ITree<Token<K, V>> tree = ctx.parse.parseExpression(1 + leftBinding(), ctx.tokens, ctx.state, false); ITree<Token<K, V>> res = new Tree<>(operator, operand, tree); |
