Package org.apache.calcite.util
Class PrecedenceClimbingParser
java.lang.Object
org.apache.calcite.util.PrecedenceClimbingParser
Parser that takes a collection of tokens (atoms and operators)
 and groups them together according to the operators' precedence
 and associativity.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classFluent helper to build a parser containing a list of tokens.static classA token that is a call to an operator with arguments.static classAn operator token.static classstatic interfaceCallback defining the behavior of a special function.static classAn token corresponding to a special operator.static classA token: either an atom, a call to an operator with arguments, or an unmatched operator.static enumToken type.
- 
Method SummaryModifier and TypeMethodDescriptionall()Returns a list of all tokens.call(PrecedenceClimbingParser.Op op, com.google.common.collect.ImmutableList<PrecedenceClimbingParser.Token> args) copy(int start, Predicate<PrecedenceClimbingParser.Token> predicate) @Nullable PrecedenceClimbingParser.Tokenparse()voidspecial(Object o, int leftPrec, int rightPrec, PrecedenceClimbingParser.Special special) toString()
- 
Method Details- 
atom
- 
callpublic PrecedenceClimbingParser.Call call(PrecedenceClimbingParser.Op op, com.google.common.collect.ImmutableList<PrecedenceClimbingParser.Token> args) 
- 
infix
- 
prefix
- 
postfix
- 
specialpublic PrecedenceClimbingParser.SpecialOp special(Object o, int leftPrec, int rightPrec, PrecedenceClimbingParser.Special special) 
- 
parse
- 
partialParsepublic void partialParse()
- 
toString
- 
allReturns a list of all tokens.
- 
print
- 
copypublic PrecedenceClimbingParser copy(int start, Predicate<PrecedenceClimbingParser.Token> predicate) 
 
-