|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfun.parsec.OperatorTable<E>
public final class OperatorTable<E>
This class is used to describe operator information. Operators have precedences. the higher the precedence number, the higher the precedence. For the same precedence, prefix > postfix > left infix > right infix > non-associative infix.
Constructor Summary | |
---|---|
OperatorTable()
|
Method Summary | |
---|---|
OperatorTable<E> |
infixl(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix left-associative binary operator. |
OperatorTable<E> |
infixn(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix non-associative binary operator. |
OperatorTable<E> |
infixr(Parser<? extends Map2<? super E,? super E,? extends E>> p,
int precedence)
Adds a infix right-associative binary operator. |
OperatorTable<E> |
postfix(Parser<? extends Map<? super E,? extends E>> p,
int precedence)
Adds a postfix unary operator. |
OperatorTable<E> |
prefix(Parser<? extends Map<? super E,? extends E>> p,
int precedence)
Adds a prefix unary operator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OperatorTable()
Method Detail |
---|
public OperatorTable<E> prefix(Parser<? extends Map<? super E,? extends E>> p, int precedence)
p
- the parser for the operator.precedence
- the precedence number.
public OperatorTable<E> postfix(Parser<? extends Map<? super E,? extends E>> p, int precedence)
p
- the parser for the operator.precedence
- the precedence number.
public OperatorTable<E> infixl(Parser<? extends Map2<? super E,? super E,? extends E>> p, int precedence)
p
- the parser for the operator.precedence
- the precedence number.
public OperatorTable<E> infixr(Parser<? extends Map2<? super E,? super E,? extends E>> p, int precedence)
p
- the parser for the operator.precedence
- the precedence number.
public OperatorTable<E> infixn(Parser<? extends Map2<? super E,? super E,? extends E>> p, int precedence)
p
- the parser for the operator.precedence
- the precedence number.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |