public abstract class BinaryExprParser extends Object implements Parser<Node>
ARG1 OP ARG2
.Modifier | Constructor and Description |
---|---|
protected |
BinaryExprParser(Parser<? extends Node> lowerLevel,
boolean leftAssociative,
Op... ops)
Primary constructor.
|
protected |
BinaryExprParser(Parser<? extends Node> lowerLevel,
Op... ops)
Convenience constructor for left-associative operators.
|
Modifier and Type | Method and Description |
---|---|
protected Node |
createNode(Op op,
Node lhs,
Node rhs) |
Node |
parse(ParseSession session,
ParseContext ctx,
boolean complete)
Parse text from the given parse context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyIdentifierScope
protected BinaryExprParser(Parser<? extends Node> lowerLevel, boolean leftAssociative, Op... ops)
lowerLevel
- next lower parse levelleftAssociative
- true for left-to-right association, false for right-to-leftops
- operations, with operations that have other operations as prefixes listed firstpublic Node parse(ParseSession session, ParseContext ctx, boolean complete)
Parser
Generally speaking, this method may assume that any whitespace allowed before the item being parsed has already been skipped over (that's a matter for the containing parser).
Copyright © 2022. All rights reserved.