com.threerings.expr
Class ExpressionParser.Operator

java.lang.Object
  extended by com.threerings.expr.ExpressionParser.Identifier
      extended by com.threerings.expr.ExpressionParser.Operator
Enclosing class:
ExpressionParser<T>

protected static class ExpressionParser.Operator
extends ExpressionParser.Identifier

An operator identifier.


Field Summary
 int arity
          The arity of the operator.
 int precedence
          The precedence of the operator.
 boolean rightAssociative
          Whether or not the operator is right, as opposed to left, associative.
 
Fields inherited from class com.threerings.expr.ExpressionParser.Identifier
name
 
Constructor Summary
ExpressionParser.Operator(String name, boolean rightAssociative, int precedence, int arity)
          Creates a new operator.
 
Method Summary
<T> T
handle(ExpressionParser<T> parser)
          Calls the appropriate form of the handle method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rightAssociative

public final boolean rightAssociative
Whether or not the operator is right, as opposed to left, associative.


precedence

public final int precedence
The precedence of the operator.


arity

public final int arity
The arity of the operator.

Constructor Detail

ExpressionParser.Operator

public ExpressionParser.Operator(String name,
                                 boolean rightAssociative,
                                 int precedence,
                                 int arity)
Creates a new operator.

Method Detail

handle

public <T> T handle(ExpressionParser<T> parser)
         throws Exception
Description copied from class: ExpressionParser.Identifier
Calls the appropriate form of the handle method.

Overrides:
handle in class ExpressionParser.Identifier
Throws:
Exception