|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.base.parser.ConstantCountParser
public final class ConstantCountParser
This class represents a long integer value. It is used for instance as count register.
| Constructor Summary | |
|---|---|
ConstantCountParser()
Creates a new object. |
|
| Method Summary | |
|---|---|
Count |
parse(Context context,
TokenSource source,
Typesetter typesetter)
Parse a value of the given type |
long |
parseInteger(Context context,
TokenSource source,
Typesetter typesetter)
Parse an integer. |
long |
parseNumber(Context context,
TokenSource source,
Typesetter typesetter)
Parse a non-negative number. |
static long |
scanInteger(Context context,
TokenSource source,
Typesetter typesetter)
Scan the input stream for tokens making up an integer, this is a number optionally preceded by a sign (+ or -). |
static long |
scanNumber(Context context,
TokenSource source,
Typesetter typesetter)
Scan the input stream for tokens making up a number. |
static long |
scanNumber(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
Scan the input stream for tokens making up a number, this is a sequence of digits with category code OTHER. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantCountParser()
| Method Detail |
|---|
public static long scanInteger(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
This method parses the following syntactic entity:
〈number〉
A number consists of a non-empty sequence of digits with category code
OTHER. The number is
optionally preceded by white space and a sign + or
-.
Tokens are expanded while gathering the requested values.
context - the processor contextsource - the source for new tokenstypesetter - the typesetter to use for conversion
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
public static long scanNumber(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
This method implements the generalization of several syntactic
definitions from
〈number〉
A number consists of a non-empty sequence of digits with category code
OTHER.
context - the processor contextsource - the source for new tokenstypesetter - the typesetter
HelpingException - in case that no number is found or the end of
file has been reached before an integer could be acquired
TypesetterException - in case of an error in the typesetter
public static long scanNumber(Context context,
TokenSource source,
Typesetter typesetter,
Token token)
throws HelpingException,
TypesetterException
context - the processor contextsource - the source for new tokenstypesetter - the typesettertoken - the first token
HelpingException - in case that no number is found or the end of
file has been reached before an integer could be acquired
TypesetterException - in case of an error in the typesetter
public Count parse(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
parse in interface Parser<Count>context - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterParser.parse(org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public long parseInteger(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
parseInteger in interface CountParsercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterCountParser.parseInteger(org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public long parseNumber(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
parseNumber in interface CountParsercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterCountParser.parseNumber(org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||