|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfr.ove.openmath.jome.ctrl.linear.LinearParser
A bean which parses, more precisely tokenizes, what we can call the linear form of an expression.
For each specific token encountered, an event (@see LinearParserEvent) is fired to all the listeners
(@see LinearParserListener) of the instance.
The event fired is made of 2 parts :
LinearParserEvent.ADDITION)LinearParserEvent.INTEGER value, and the token value is represented by the @see String "2")LinearParserEvent.START_EXPRESSION is
fired.
Similarly, when the parsing ends (the end of the linear form has been reached), an event whith the identifier
set to LinearParserEvent.END_EXPRESSION is fired.
| Constructor Summary | |
LinearParser()
The constructor. |
|
| Method Summary | |
void |
addLinearParserListener(LinearParserListener linearParserListener)
Registers another listener of the instance. |
void |
fireLinearParserEvent(LinearParserEvent linearParserEvent)
Fires a LinearParserEvent event to registered listeners. |
static void |
main(java.lang.String[] args)
|
void |
parse(java.lang.String expression)
Parses the specified linear form of the formula. |
void |
removeLinearParserListener(LinearParserListener linearParserListener)
Removes a listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LinearParser()
| Method Detail |
public void addLinearParserListener(LinearParserListener linearParserListener)
linearParserListener - the listener to add.public void removeLinearParserListener(LinearParserListener linearParserListener)
linearParserListener - the listener to remove.public void fireLinearParserEvent(LinearParserEvent linearParserEvent)
linearParserEvent - event encapsulating relevant information.public void parse(java.lang.String expression)
expression - the linear form of the formula.public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||