Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
fr.ove.openmath.jome.ctrl.linear.events.LinearParserEvent Class Reference

The event sent during the parsing of a linear form of an expression. More...

Inheritance diagram for fr.ove.openmath.jome.ctrl.linear.events.LinearParserEvent:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.openmath.jome.ctrl.linear.events.LinearParserEvent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LinearParserEvent (Object src)
 The constructor.
void setToken (int identifier, String value)
 Sets the identifier of the token and its value, if needed.
int getIdentifier ()
 Returns the identifier of the token wrapped into the event.
String getIdentifierAsString ()
 Returns the identifier of the token wrapped into the event, as a string.
String getValue ()
 Returns the value of the identifier.
String toString ()
 Returns a.

Static Public Member Functions

static int getStringIdentifierAsInt (String identifier)
 Returns the int value of the specified identifier string representation .

Static Public Attributes

static final int SPACE = 0
 The different command tokens.
static final int VARIABLE = 1
static final int INTEGER = 2
static final int FLOAT = 3
static final int ADDITION = 4
static final int SUBSTRACTION = 5
static final int MULTIPLICATION = 6
static final int DIVISION = 7
static final int POWER = 8
static final int EQUAL = 9
static final int UNEQUAL = 10
static final int LESS = 11
static final int LESSEQUAL = 12
static final int GREATER = 13
static final int GREATEREQUAL = 14
static final int FUNCTION = 15
static final int SEPARATOR = 16
static final int OPEN_PAREN = 17
static final int CLOSE_PAREN = 18
static final int OPEN_BRACKET = 19
static final int CLOSE_BRACKET = 20
static final int OPEN_CURLY = 21
static final int CLOSE_CURLY = 22
static final int RESERVED = 23
static final int UNDERSCRIPT = 24
static final int SPECIALIZED = 25
static final int START_EXPRESSION = 26
static final int END_EXPRESSION = 27

Private Attributes

int identifier
 The token identifier.
String value
 The token value.

Detailed Description

The event sent during the parsing of a linear form of an expression.


Each event sent corresponds to token in the expression parsed. The tokens are the following :

There exists other token identifiers :

Finally, 2 other token identifiers dealing with the parsing itself.

Author:
1999 DIRAT Laurent
Version:
1.0 27/09/1999

Definition at line 80 of file LinearParserEvent.java.


Constructor & Destructor Documentation

The constructor.

Parameters:
srcthe object which produces this event.

Definition at line 95 of file LinearParserEvent.java.

                                         {
        super(src);
    }

Member Function Documentation

Returns the identifier of the token wrapped into the event.

Definition at line 112 of file LinearParserEvent.java.

                               {
        return identifier;
    }

Returns the identifier of the token wrapped into the event, as a string.

Definition at line 119 of file LinearParserEvent.java.

                                          {
        String str = "";

        switch (identifier) {
            case SPACE : str += "SPACE"; break;
            case VARIABLE : str += "VARIABLE"; break;
            case INTEGER  : str += "INTEGER"; break;
            case FLOAT    : str += "FLOAT"; break;
            case ADDITION : str += "ADDITION"; break;
            case SUBSTRACTION : str += "SUBSTRACTION"; break;
            case MULTIPLICATION: str += "MULTIPLICATION"; break;
            case DIVISION : str += "DIVISION"; break;
            case POWER    : str += "POWER"; break;
            case EQUAL    : str += "EQUAL"; break;
            case UNEQUAL  : str += "UNEQUAL"; break;
            case LESS     : str += "LESS"; break;
            case LESSEQUAL  : str += "LESSEQUAL"; break;
            case GREATER  : str += "GREATER"; break;
            case GREATEREQUAL : str += "GREATEREQUAL"; break;
            case FUNCTION : str += "FUNCTION"; break;
            case SEPARATOR : str += "SEPARATOR"; break;
            case OPEN_PAREN : str += "OPEN_PAREN"; break;
            case CLOSE_PAREN : str += "CLOSE_PAREN"; break;
            case OPEN_BRACKET : str += "OPEN_BRACKET"; break;
            case CLOSE_BRACKET : str += "CLOSE_BRACKET"; break;
            case OPEN_CURLY : str += "OPEN_CURLY"; break;
            case CLOSE_CURLY : str += "CLOSE_CURLY"; break;
            case UNDERSCRIPT : str += "UNDERSCRIPT"; break;
            case RESERVED : str += "RESERVED"; break;
            case SPECIALIZED : str += "SPECIALIZED"; break;
            case START_EXPRESSION : str += "START_EXPRESSION"; break;
            case END_EXPRESSION : str += "END_EXPRESSION"; break;
        }

        return str;
    }

Here is the caller graph for this function:

Returns the int value of the specified identifier string representation .

Definition at line 159 of file LinearParserEvent.java.

                                                                  {
        int value = 0;

        if (identifier.equals("SPACE")) 
            value = 0;
        if (identifier.equals("VARIABLE")) 
            value = 1;
        else if (identifier.equals("INTEGER"))
            value = 2;
        else if (identifier.equals("FLOAT"))
            value = 3;
        else if (identifier.equals("ADDITION"))
            value = 4;
        else if (identifier.equals("SUBSTRACTION"))
            value = 5;
        else if (identifier.equals("MULTIPLICATION"))
            value = 6;
        else if (identifier.equals("DIVISION"))
            value = 7;
        else if (identifier.equals("POWER"))
            value = 8;
        else if (identifier.equals("EQUAL"))
            value = 9;
        else if (identifier.equals("UNEQUAL"))
            value = 10;
        else if (identifier.equals("LESS"))
            value = 11;
        else if (identifier.equals("LESSEQUAL"))
            value = 12;
        else if (identifier.equals("GREATER"))
            value = 13;
        else if (identifier.equals("GREATEREQUAL"))
            value = 14;
        else if (identifier.equals("FUNCTION"))
            value = 15;
        else if (identifier.equals("SEPARATOR"))
            value = 16;
        else if (identifier.equals("OPEN_PAREN"))
            value = 17;
        else if (identifier.equals("CLOSE_PAREN"))
            value = 18;
        else if (identifier.equals("OPEN_BRACKET"))
            value = 19;
        else if (identifier.equals("CLOSE_BRACKET"))
            value = 20;
        else if (identifier.equals("OPEN_CURLY"))
            value = 21;
        else if (identifier.equals("CLOSE_CURLY"))
            value = 22;
        else if (identifier.equals("RESERVED"))
            value = 23;
        else if (identifier.equals("UNDERSCRIPT"))
            value = 24;
        else if (identifier.equals("SPECIALIZED"))
            value = 25;
        else if (identifier.equals("START_EXPRESSION"))
            value = 26;
        else if (identifier.equals("END_EXPRESSION"))
            value = 27;

        return value;
    }

Returns the value of the identifier.

Definition at line 225 of file LinearParserEvent.java.

                             {
        return value;
    }
void fr.ove.openmath.jome.ctrl.linear.events.LinearParserEvent.setToken ( int  identifier,
String  value 
) [inline]

Sets the identifier of the token and its value, if needed.

Parameters:
identifierthe token identifier.
valuethe token value.

Definition at line 104 of file LinearParserEvent.java.

                                                       {
        this.identifier = identifier;
        this.value = value;
    }

Returns a.

See also:
String representation of the instance.
Mainly for debugg.

Definition at line 233 of file LinearParserEvent.java.

                             {
        return getIdentifierAsString() + "\t" + value;
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 248 of file LinearParserEvent.java.

Definition at line 270 of file LinearParserEvent.java.

Definition at line 272 of file LinearParserEvent.java.

Definition at line 268 of file LinearParserEvent.java.

Definition at line 251 of file LinearParserEvent.java.

Definition at line 283 of file LinearParserEvent.java.

Definition at line 255 of file LinearParserEvent.java.

Definition at line 245 of file LinearParserEvent.java.

Definition at line 263 of file LinearParserEvent.java.

Definition at line 259 of file LinearParserEvent.java.

Definition at line 260 of file LinearParserEvent.java.

The token identifier.

Definition at line 84 of file LinearParserEvent.java.

Definition at line 244 of file LinearParserEvent.java.

Definition at line 257 of file LinearParserEvent.java.

Definition at line 258 of file LinearParserEvent.java.

Definition at line 250 of file LinearParserEvent.java.

Definition at line 269 of file LinearParserEvent.java.

Definition at line 271 of file LinearParserEvent.java.

Definition at line 267 of file LinearParserEvent.java.

Definition at line 252 of file LinearParserEvent.java.

Definition at line 275 of file LinearParserEvent.java.

Definition at line 264 of file LinearParserEvent.java.

The different command tokens.

Definition at line 242 of file LinearParserEvent.java.

Definition at line 279 of file LinearParserEvent.java.

Definition at line 282 of file LinearParserEvent.java.

Definition at line 249 of file LinearParserEvent.java.

Definition at line 278 of file LinearParserEvent.java.

Definition at line 256 of file LinearParserEvent.java.

The token value.

Definition at line 89 of file LinearParserEvent.java.

Definition at line 243 of file LinearParserEvent.java.


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