org.extex.interpreter.parser
Interface CountParser

All Known Subinterfaces:
Interpreter, TokenSource
All Known Implementing Classes:
ConstantCountParser, Max, Moritz, StringSource

public interface CountParser

This interface describes a parser for integers and non-negative numbers.

Version:
$Revision: 6276 $
Author:
Gerd Neugebauer

Method Summary
 long parseInteger(Context context, TokenSource source, Typesetter typesetter)
          Parse an integer.
 long parseNumber(Context context, TokenSource source, Typesetter typesetter)
          Parse a non-negative number.
 

Method Detail

parseNumber

long parseNumber(Context context,
                 TokenSource source,
                 Typesetter typesetter)
                 throws HelpingException,
                        TypesetterException
Parse a non-negative number.

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

parseInteger

long parseInteger(Context context,
                  TokenSource source,
                  Typesetter typesetter)
                  throws HelpingException,
                         TypesetterException
Parse an integer. This number can either be positive or negative.

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