com.sun.msv.verifier.regexp
Class AttributePicker
java.lang.Object
|
+--com.sun.msv.verifier.regexp.AttributePicker
- All Implemented Interfaces:
- ExpressionVisitorExpression
- public class AttributePicker
- extends Object
- implements ExpressionVisitorExpression
removes all unnecessary expressions and
creates an expression that consists of required attributes and choices only.
For example,
will be converted to
because no attribute is required. But
will remain the same because one or the other is required.
this method also removes SequenceExp.
will be converted to
This function object is used only for error recovery.
Resulting expressions always consist only of s and s.
- Author:
- Kohsuke KAWAGUCHI
AttributePicker
public AttributePicker(ExpressionPool pool)
onElement
public Expression onElement(ElementExp exp)
- Specified by:
onElement
in interface ExpressionVisitorExpression
onMixed
public Expression onMixed(MixedExp exp)
- Specified by:
onMixed
in interface ExpressionVisitorExpression
onAnyString
public Expression onAnyString()
- Specified by:
onAnyString
in interface ExpressionVisitorExpression
onEpsilon
public Expression onEpsilon()
- Specified by:
onEpsilon
in interface ExpressionVisitorExpression
onNullSet
public Expression onNullSet()
- Specified by:
onNullSet
in interface ExpressionVisitorExpression
onRef
public Expression onRef(ReferenceExp exp)
- Specified by:
onRef
in interface ExpressionVisitorExpression
onOther
public Expression onOther(OtherExp exp)
- Specified by:
onOther
in interface ExpressionVisitorExpression
onTypedString
public Expression onTypedString(TypedStringExp exp)
- Specified by:
onTypedString
in interface ExpressionVisitorExpression
onList
public Expression onList(ListExp exp)
- Specified by:
onList
in interface ExpressionVisitorExpression
onKey
public Expression onKey(KeyExp exp)
- Specified by:
onKey
in interface ExpressionVisitorExpression
onAttribute
public Expression onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interface ExpressionVisitorExpression
onOneOrMore
public Expression onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interface ExpressionVisitorExpression
onSequence
public Expression onSequence(SequenceExp exp)
- Specified by:
onSequence
in interface ExpressionVisitorExpression
onInterleave
public Expression onInterleave(InterleaveExp exp)
- Specified by:
onInterleave
in interface ExpressionVisitorExpression
onConcur
public Expression onConcur(ConcurExp exp)
- Specified by:
onConcur
in interface ExpressionVisitorExpression
onChoice
public Expression onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interface ExpressionVisitorExpression