org.extex.base.parser
Class ScaledNumberParser

java.lang.Object
  extended by org.extex.base.parser.ScaledNumberParser

public class ScaledNumberParser
extends java.lang.Object

This class provides a fixed point number.

Version:
$Revision: 6191 $
Author:
Gerd Neugebauer

Method Summary
static long parse(Context context, TokenSource source, Typesetter typesetter)
          Evaluate an expression.
static long scanFloat(Context context, TokenSource source, Typesetter typesetter, Token start)
          Parses a token stream for a float and returns it as fixed point number.
static ScaledNumber scanScaledNumber(Context context, TokenSource source, Typesetter typesetter)
          Parses a token stream for a float and returns it as fixed point number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static long parse(Context context,
                         TokenSource source,
                         Typesetter typesetter)
                  throws HelpingException,
                         TypesetterException
Evaluate an expression.

Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Returns:
the result
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter

scanFloat

public static long scanFloat(Context context,
                             TokenSource source,
                             Typesetter typesetter,
                             Token start)
                      throws HelpingException,
                             TypesetterException
Parses a token stream for a float and returns it as fixed point number.

Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
start - the initial token to start with
Returns:
the fixed point representation of the floating number in units of 2-16.
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter

scanScaledNumber

public static ScaledNumber scanScaledNumber(Context context,
                                            TokenSource source,
                                            Typesetter typesetter)
                                     throws HelpingException,
                                            TypesetterException
Parses a token stream for a float and returns it as fixed point number.

Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
Returns:
the fixed point representation of the floating point number
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter