Package com.ibm.icu.message2
Class MFParser
- java.lang.Object
-
- com.ibm.icu.message2.MFParser
-
@Deprecated public class MFParser extends java.lang.Object
Deprecated.This API is for technology preview only.This class parses aMessageFormat 2
syntax into a data modelMFDataModel.Message
.It is used by
MessageFormatter
, but it might be handy for various tools.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
MFParser.MatchDeclaration
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description private static int
EOF
Deprecated.private InputSource
input
Deprecated.private static java.util.regex.Pattern
RE_NUMBER_LITERAL
Deprecated.
-
Constructor Summary
Constructors Constructor Description MFParser(java.lang.String text)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private void
checkCondition(boolean condition, java.lang.String message)
Deprecated.private void
error(java.lang.String message)
Deprecated.private MFDataModel.Annotation
getAnnotation()
Deprecated.private MFDataModel.Expression
getAnnotationExpression()
Deprecated.private MFDataModel.Attribute
getAttribute()
Deprecated.private java.util.List<MFDataModel.Attribute>
getAttributes()
Deprecated.private MFDataModel.Message
getComplexMessage()
Deprecated.private MFDataModel.Declaration
getDeclaration()
Deprecated.private java.lang.String
getIdentifier()
Deprecated.private MFDataModel.LiteralOrCatchallKey
getKey(boolean requireSpaces)
Deprecated.private MFDataModel.Literal
getLiteral()
Deprecated.private MFDataModel.Expression
getLiteralExpression()
Deprecated.private MFDataModel.LiteralOrVariableRef
getLiteralOrVariableRef()
Deprecated.private MFDataModel.Markup
getMarkup()
Deprecated.private MFDataModel.Annotation
getMarkupAnnotation()
Deprecated.private MFDataModel.SelectMessage
getMatch(java.util.List<MFDataModel.Declaration> declarations)
Deprecated.private java.lang.String
getName()
Deprecated.private MFDataModel.Literal
getNumberLiteral()
Deprecated.private MFDataModel.Option
getOption()
Deprecated.private java.util.Map<java.lang.String,MFDataModel.Option>
getOptions()
Deprecated.private MFDataModel.Pattern
getPattern()
Deprecated.private MFDataModel.PatternPart
getPatternPart()
Deprecated.private MFDataModel.Expression
getPlaceholder()
Deprecated.private MFDataModel.Literal
getQuotedLiteral()
Deprecated.private MFDataModel.Pattern
getQuotedPattern()
Deprecated.private java.lang.String
getReservedBody()
Deprecated.private java.lang.String
getText()
Deprecated.private MFDataModel.Literal
getUnQuotedLiteral()
Deprecated.private MFDataModel.VariableExpression
getVariableExpression()
Deprecated.private MFDataModel.VariableRef
getVariableRef()
Deprecated.private MFDataModel.Variant
getVariant()
Deprecated.static MFDataModel.Message
parse(java.lang.String input)
Deprecated.This API is for technology preview only.private MFDataModel.Message
parseImpl()
Deprecated.private java.lang.String
peekWithRegExp(java.util.regex.Pattern pattern)
Deprecated.private void
skipMandatoryWhitespaces()
Deprecated.private void
skipOptionalWhitespaces()
Deprecated.private int
skipWhitespaces()
Deprecated.
-
-
-
Field Detail
-
EOF
private static final int EOF
Deprecated.- See Also:
- Constant Field Values
-
input
private final InputSource input
Deprecated.
-
RE_NUMBER_LITERAL
private static final java.util.regex.Pattern RE_NUMBER_LITERAL
Deprecated.
-
-
Method Detail
-
parse
@Deprecated public static MFDataModel.Message parse(java.lang.String input) throws MFParseException
Deprecated.This API is for technology preview only.Parses aMessageFormat 2
syntax into aMFDataModel.Message
.It is used by
MessageFormatter
, but it might be handy for various tools.- Parameters:
input
- the text to parse- Returns:
- the parsed
MFDataModel.Message
- Throws:
MFParseException
- if errors are detected
-
parseImpl
private MFDataModel.Message parseImpl() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getPattern
private MFDataModel.Pattern getPattern() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getPatternPart
private MFDataModel.PatternPart getPatternPart() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getText
private java.lang.String getText()
Deprecated.
-
getPlaceholder
private MFDataModel.Expression getPlaceholder() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getAnnotation
private MFDataModel.Annotation getAnnotation() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getMarkupAnnotation
private MFDataModel.Annotation getMarkupAnnotation() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getLiteralExpression
private MFDataModel.Expression getLiteralExpression() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getVariableExpression
private MFDataModel.VariableExpression getVariableExpression() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getAnnotationExpression
private MFDataModel.Expression getAnnotationExpression() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getMarkup
private MFDataModel.Markup getMarkup() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getAttributes
private java.util.List<MFDataModel.Attribute> getAttributes() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getAttribute
private MFDataModel.Attribute getAttribute() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getReservedBody
private java.lang.String getReservedBody() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getIdentifier
private java.lang.String getIdentifier() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getOptions
private java.util.Map<java.lang.String,MFDataModel.Option> getOptions() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getOption
private MFDataModel.Option getOption() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getLiteralOrVariableRef
private MFDataModel.LiteralOrVariableRef getLiteralOrVariableRef() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getLiteral
private MFDataModel.Literal getLiteral() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getVariableRef
private MFDataModel.VariableRef getVariableRef() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getQuotedLiteral
private MFDataModel.Literal getQuotedLiteral() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getUnQuotedLiteral
private MFDataModel.Literal getUnQuotedLiteral() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getNumberLiteral
private MFDataModel.Literal getNumberLiteral()
Deprecated.
-
skipMandatoryWhitespaces
private void skipMandatoryWhitespaces() throws MFParseException
Deprecated.- Throws:
MFParseException
-
skipOptionalWhitespaces
private void skipOptionalWhitespaces()
Deprecated.
-
skipWhitespaces
private int skipWhitespaces()
Deprecated.
-
getComplexMessage
private MFDataModel.Message getComplexMessage() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getMatch
private MFDataModel.SelectMessage getMatch(java.util.List<MFDataModel.Declaration> declarations) throws MFParseException
Deprecated.- Throws:
MFParseException
-
getVariant
private MFDataModel.Variant getVariant() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getKey
private MFDataModel.LiteralOrCatchallKey getKey(boolean requireSpaces) throws MFParseException
Deprecated.- Throws:
MFParseException
-
getDeclaration
private MFDataModel.Declaration getDeclaration() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getQuotedPattern
private MFDataModel.Pattern getQuotedPattern() throws MFParseException
Deprecated.- Throws:
MFParseException
-
getName
private java.lang.String getName() throws MFParseException
Deprecated.- Throws:
MFParseException
-
checkCondition
private void checkCondition(boolean condition, java.lang.String message) throws MFParseException
Deprecated.- Throws:
MFParseException
-
error
private void error(java.lang.String message) throws MFParseException
Deprecated.- Throws:
MFParseException
-
peekWithRegExp
private java.lang.String peekWithRegExp(java.util.regex.Pattern pattern)
Deprecated.
-
-