org.extex.base.parser
Class ConstantMudimenParser
java.lang.Object
org.extex.base.parser.ConstantMudimenParser
- All Implemented Interfaces:
- Parser<Mudimen>
public class ConstantMudimenParser
- extends java.lang.Object
- implements Parser<Mudimen>
This class provides a parser for math units (mu).
- Version:
- $Revision:4399 $
- Author:
- Gerd Neugebauer
|
Field Summary |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for
serialization. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
protected static final long serialVersionUID
- The constant serialVersionUID contains the id for
serialization.
- See Also:
- Constant Field Values
ConstantMudimenParser
public ConstantMudimenParser()
scanMu
protected static long scanMu(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
- Scan a math unit.
- Parameters:
context - the processor contextsource - the source for new tokenstypesetter - the typesetter
- Returns:
- the number of scaled points for the mu
- Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
parse
public Mudimen parse(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
- Creates a new object and fills it from a token stream.
This method parses the following
syntactic entity:
〈mudimen〉
→ 〈float〉 mu
| 〈mudimen variable〉
The value of 〈mudimen〉 is either a floating point number
followed by the unit mu or a variable value resulting in a
mudimen value.
- Specified by:
parse in interface Parser<Mudimen>
- Parameters:
context - the processor contextsource - the source for new tokenstypesetter - the typesetter
- Returns:
- the new object
- Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
in case of an error in the typesetter- See Also:
Parser.parse(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)