de.dante.extex.interpreter.expression.term
Class TDoubleParser

java.lang.Object
  extended byde.dante.extex.interpreter.expression.term.TDoubleParser
All Implemented Interfaces:
ETypeParser

public final class TDoubleParser
extends java.lang.Object
implements ETypeParser

This class implements the supporting functions for the date type TDouble for the expression evaluator.

Version:
$Revision: 1.1 $
Author:
Gerd Neugebauer

Constructor Summary
TDoubleParser()
          Creates a new object.
 
Method Summary
 EType convert(Code code, Context context, TokenSource source, Typesetter typesetter)
          Try to convert some code into a proper data type.
 EType parse(Context context, TokenSource source, Typesetter typesetter)
          Try to parse a proper value from the token source.
 void registered(Evaluator evaluator)
          Inform the parser that it has been registered in an evaluator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TDoubleParser

public TDoubleParser()
Creates a new object.

Method Detail

convert

public EType convert(Code code,
                     Context context,
                     TokenSource source,
                     Typesetter typesetter)
Description copied from interface: ETypeParser
Try to convert some code into a proper data type.

Specified by:
convert in interface ETypeParser
Parameters:
code - the code to convert
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Returns:
the converted value or null if the conversion could not be performed
See Also:
ETypeParser.convert( de.dante.extex.interpreter.type.Code, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

parse

public EType parse(Context context,
                   TokenSource source,
                   Typesetter typesetter)
            throws InterpreterException
Description copied from interface: ETypeParser
Try to parse a proper value from the token source.

Specified by:
parse in interface ETypeParser
Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Returns:
the element inquired or null if none could be parsed
Throws:
InterpreterException - in case of an error
See Also:
de.dante.extex.interpreter.expression.TerminalParser#parse( de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)

registered

public void registered(Evaluator evaluator)
Description copied from interface: ETypeParser
Inform the parser that it has been registered in an evaluator. In this case the parser can register some functions in the evaluator.

Specified by:
registered in interface ETypeParser
Parameters:
evaluator - the evaluator where the parser has been registered
See Also:
de.dante.extex.interpreter.expression.TerminalParser#registered( de.dante.extex.interpreter.expression.Evaluator)