Back to index

wims  3.65+svn20090927
Public Member Functions | Package Functions | Package Attributes | Static Package Attributes
org.javia.arity.Token Class Reference

List of all members.

Public Member Functions

String toString ()
String toString ()

Package Functions

 Token (int id, int priority, int assoc, int vmop)
Token setPos (int pos)
Token setValue (double value)
Token setAlpha (String alpha)
 Token (int id, int priority, int assoc, int vmop)
Token setPos (int pos)
Token setValue (double value)
Token setAlpha (String alpha)

Package Attributes

final int priority
final int assoc
final int id
final byte vmop
double value = 0
String name = null
int arity
int position

Static Package Attributes

static final int PREFIX = 1
static final int LEFT = 2
static final int RIGHT = 3
static final int SUFIX = 4

Detailed Description

Definition at line 19 of file Token.java.


Constructor & Destructor Documentation

org.javia.arity.Token.Token ( int  id,
int  priority,
int  assoc,
int  vmop 
) [inline, package]

Definition at line 37 of file Token.java.

                                                     {
        this.id = id;
        this.priority = priority;
        this.assoc = assoc;
        this.vmop = (byte)vmop;
        arity = id == Lexer.CALL ? 1 : Symbol.CONST_ARITY;
    }
org.javia.arity.Token.Token ( int  id,
int  priority,
int  assoc,
int  vmop 
) [inline, package]

Definition at line 37 of file Token.java.

                                                     {
        this.id = id;
        this.priority = priority;
        this.assoc = assoc;
        this.vmop = (byte)vmop;
        arity = id == Lexer.CALL ? 1 : Symbol.CONST_ARITY;
    }

Member Function Documentation

Token org.javia.arity.Token.setAlpha ( String  alpha) [inline, package]

Definition at line 55 of file Token.java.

                                 {
        name = alpha;
        return this;
    }

Here is the caller graph for this function:

Token org.javia.arity.Token.setAlpha ( String  alpha) [inline, package]

Definition at line 55 of file Token.java.

                                 {
        name = alpha;
        return this;
    }
Token org.javia.arity.Token.setPos ( int  pos) [inline, package]

Definition at line 45 of file Token.java.

                          {
        this.position = pos;
        return this;
    }
Token org.javia.arity.Token.setPos ( int  pos) [inline, package]

Definition at line 45 of file Token.java.

                          {
        this.position = pos;
        return this;
    }
Token org.javia.arity.Token.setValue ( double  value) [inline, package]

Definition at line 50 of file Token.java.

                                 {
        this.value = value;
        return this;
    }

Here is the caller graph for this function:

Token org.javia.arity.Token.setValue ( double  value) [inline, package]

Definition at line 50 of file Token.java.

                                 {
        this.value = value;
        return this;
    }
String org.javia.arity.Token.toString ( ) [inline]

Definition at line 60 of file Token.java.

                             {
        switch (id) {
        case Lexer.NUMBER:
            return "" + value;
        case Lexer.CALL:
            return name + '(' + arity + ')';
        case Lexer.CONST:
            return name;
        }
        return "" + id;
    }
String org.javia.arity.Token.toString ( ) [inline]

Definition at line 60 of file Token.java.

                             {
        switch (id) {
        case Lexer.NUMBER:
            return "" + value;
        case Lexer.CALL:
            return name + '(' + arity + ')';
        case Lexer.CONST:
            return name;
        }
        return "" + id;
    }

Member Data Documentation

Definition at line 34 of file Token.java.

final int org.javia.arity.Token.assoc [package]

Definition at line 28 of file Token.java.

final int org.javia.arity.Token.id [package]

Definition at line 29 of file Token.java.

static final int org.javia.arity.Token.LEFT = 2 [static, package]

Definition at line 23 of file Token.java.

String org.javia.arity.Token.name = null [package]

Definition at line 33 of file Token.java.

Definition at line 35 of file Token.java.

static final int org.javia.arity.Token.PREFIX = 1 [static, package]

Definition at line 22 of file Token.java.

final int org.javia.arity.Token.priority [package]

Definition at line 27 of file Token.java.

static final int org.javia.arity.Token.RIGHT = 3 [static, package]

Definition at line 24 of file Token.java.

static final int org.javia.arity.Token.SUFIX = 4 [static, package]

Definition at line 25 of file Token.java.

double org.javia.arity.Token.value = 0 [package]

Definition at line 32 of file Token.java.

final byte org.javia.arity.Token.vmop [package]

Definition at line 30 of file Token.java.


The documentation for this class was generated from the following files: