jfun.jaskell.ast
Class Operators

java.lang.Object
  extended byjfun.jaskell.ast.Operators

public final class Operators
extends java.lang.Object

The factory to create Operator object.

Zephyr Business Solutions Corp.

Author:
Ben Yu

Constructor Summary
Operators()
           
 
Method Summary
static Operator buildAnd(java.lang.String name)
          Build the binary and operator.
static Operator buildApply(java.lang.String name)
          Build the binary $ operator to change precedence.
static Operator buildAss(java.lang.String name)
          Build the := operator.
static Operator buildAt(java.lang.String name)
          Build the unary @ operator to get the value corresponding a key or index.
static Operator buildConcat(java.lang.String name)
          Build the binary ++ operator to concatenate two lists.
static Operator buildCons(java.lang.String name)
          Build the binary : operator to add an element to a list.
static Operator buildCount(java.lang.String name)
          Build the unary # operator to get the size of a container or a tuple.
static Operator buildDeduce(java.lang.String name)
          Build the => operator.
static Operator buildDiv(java.lang.String name)
          Build the binary / operator.
static Operator buildEq(java.lang.String name)
          Build the binary == operator.
static Operator buildGe(java.lang.String name)
          Build the binary >= operator.
static Operator buildGt(java.lang.String name)
          Build the binary > operator.
static Operator buildInverseCall(java.lang.String name)
          Build the binary -> operator to allow function call in the argument first order.
static Operator buildLcomp(java.lang.String name)
          Build the binary << operator to compose two functions.
static Operator buildLe(java.lang.String name)
          Build the binary <= operator.
static Operator buildLt(java.lang.String name)
          Build the binary < operator.
static Operator buildMinus(java.lang.String name)
          Build the binary - operator.
static Operator buildMod(java.lang.String name)
          Build the binary % operator.
static Operator buildMul(java.lang.String name)
          Build the binary * operator.
static Operator buildNe(java.lang.String name)
          Build the binary != operator.
static Operator buildNegate(java.lang.String name, java.lang.String alias)
          Build the unary - operator.
static Operator buildNot(java.lang.String name)
          Build the unary (!) operator.
static Operator buildOr(java.lang.String name)
          Build the binary or operator.
static Operator buildPlus(java.lang.String name)
          Build the binary + operator.
static Operator buildSeq(java.lang.String name)
          Build the binary >> operator to specify sequencing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operators

public Operators()
Method Detail

buildPlus

public static Operator buildPlus(java.lang.String name)
Build the binary + operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildMinus

public static Operator buildMinus(java.lang.String name)
Build the binary - operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildMul

public static Operator buildMul(java.lang.String name)
Build the binary * operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildDiv

public static Operator buildDiv(java.lang.String name)
Build the binary / operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildMod

public static Operator buildMod(java.lang.String name)
Build the binary % operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildEq

public static Operator buildEq(java.lang.String name)
Build the binary == operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildNe

public static Operator buildNe(java.lang.String name)
Build the binary != operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildGt

public static Operator buildGt(java.lang.String name)
Build the binary > operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildGe

public static Operator buildGe(java.lang.String name)
Build the binary >= operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildLt

public static Operator buildLt(java.lang.String name)
Build the binary < operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildLe

public static Operator buildLe(java.lang.String name)
Build the binary <= operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildNot

public static Operator buildNot(java.lang.String name)
Build the unary (!) operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildAnd

public static Operator buildAnd(java.lang.String name)
Build the binary and operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildOr

public static Operator buildOr(java.lang.String name)
Build the binary or operator.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildLcomp

public static Operator buildLcomp(java.lang.String name)
Build the binary << operator to compose two functions.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildSeq

public static Operator buildSeq(java.lang.String name)
Build the binary >> operator to specify sequencing.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildApply

public static Operator buildApply(java.lang.String name)
Build the binary $ operator to change precedence.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildInverseCall

public static Operator buildInverseCall(java.lang.String name)
Build the binary -> operator to allow function call in the argument first order.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildCons

public static Operator buildCons(java.lang.String name)
Build the binary : operator to add an element to a list.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildConcat

public static Operator buildConcat(java.lang.String name)
Build the binary ++ operator to concatenate two lists.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildCount

public static Operator buildCount(java.lang.String name)
Build the unary # operator to get the size of a container or a tuple.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildAt

public static Operator buildAt(java.lang.String name)
Build the unary @ operator to get the value corresponding a key or index.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildNegate

public static Operator buildNegate(java.lang.String name,
                                   java.lang.String alias)
Build the unary - operator. String representation of negate operator may be different than its name.

Parameters:
name - the name of this operator.
alias - the string representation of the operator.
Returns:
the Operator.

buildDeduce

public static Operator buildDeduce(java.lang.String name)
Build the => operator. This operator has no pre-defined meaning.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.

buildAss

public static Operator buildAss(java.lang.String name)
Build the := operator. This operator has no pre-defined meaning.

Parameters:
name - the string representation of this operator.
Returns:
the Operator.