|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.base.parser.ConstantDimenParser
public final class ConstantDimenParser
This class implements a parser for a dimen value.
| Constructor Summary | |
|---|---|
ConstantDimenParser()
Creates a new object. |
|
| Method Summary | |
|---|---|
Dimen |
parse(Context context,
TokenSource source,
Typesetter typesetter)
Parse a value of the given type |
Dimen |
parseDimen(Context context,
TokenSource source,
Typesetter typesetter)
Acquire a length value and return it in multiples of scaled points. |
static Dimen |
scan(Context context,
TokenSource source,
Typesetter typesetter)
Creates a new object from a token stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantDimenParser()
| Method Detail |
|---|
public static Dimen scan(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
〈dimen〉
→ 〈float〉 〈dimen unit〉
| 〈float〉 true 〈dimen unit〉
| 〈dimen variable〉
〈float〉
→ [+-]? [0-9]+
| [+-]? [0-9]+[.][0-9]*
| [+-]? [.][0-9]+
〈dimen unit〉
→ pt
| in
| sp
| mm
| cm
| dm
| km
| dd
| cc
| bp
context - the interpreter contextsource - the source for next tokenstypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
public Dimen parse(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
parse in interface Parser<Dimen>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 Dimen parseDimen(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
parseDimen in interface DimenParsercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterDimenParser.parseDimen(
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 | |||||||||