com.sun.msv.grammar.util
Class ExpressionPrinter
java.lang.Object
|
+--com.sun.msv.grammar.util.ExpressionPrinter
- All Implemented Interfaces:
- ExpressionVisitor
- public class ExpressionPrinter
- extends Object
- implements ExpressionVisitor
creates a string representation of the expression.
useful for debug and dump.
- Author:
- Kohsuke KAWAGUCHI
FRAGMENT
public static final int FRAGMENT
- in this mode, reference to other expression is
one of the terminal symbol of stringnization.
Suitable to dump the entire grammar
CONTENTMODEL
public static final int CONTENTMODEL
- in this mode, element declaration is
one of the terminal symbol of stringnization.
Suitable to dump the content model of element declarations.
fragmentInstance
public static ExpressionPrinter fragmentInstance
contentModelInstance
public static ExpressionPrinter contentModelInstance
smallestInstance
public static ExpressionPrinter smallestInstance
printFragment
public static String printFragment(Expression exp)
printContentModel
public static String printContentModel(Expression exp)
printSmallest
public static String printSmallest(Expression exp)
printRefContainer
public String printRefContainer(ReferenceContainer cont)
- dumps all the contents of ReferenceContainer.
this method is a useful piece to dump the entire grammar.
onAttribute
public Object onAttribute(AttributeExp exp)
- Specified by:
onAttribute in interface ExpressionVisitor
onChoice
public Object onChoice(ChoiceExp exp)
- Specified by:
onChoice in interface ExpressionVisitor
onConcur
public Object onConcur(ConcurExp exp)
- Specified by:
onConcur in interface ExpressionVisitor
onInterleave
public Object onInterleave(InterleaveExp exp)
- Specified by:
onInterleave in interface ExpressionVisitor
onElement
public Object onElement(ElementExp exp)
- Specified by:
onElement in interface ExpressionVisitor
onOneOrMore
public Object onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore in interface ExpressionVisitor
onMixed
public Object onMixed(MixedExp exp)
- Specified by:
onMixed in interface ExpressionVisitor
onList
public Object onList(ListExp exp)
- Specified by:
onList in interface ExpressionVisitor
onKey
public Object onKey(KeyExp exp)
- Specified by:
onKey in interface ExpressionVisitor
onEpsilon
public Object onEpsilon()
- Specified by:
onEpsilon in interface ExpressionVisitor
onNullSet
public Object onNullSet()
- Specified by:
onNullSet in interface ExpressionVisitor
onAnyString
public Object onAnyString()
- Specified by:
onAnyString in interface ExpressionVisitor
onSequence
public Object onSequence(SequenceExp exp)
- Specified by:
onSequence in interface ExpressionVisitor
onTypedString
public Object onTypedString(TypedStringExp exp)
- Specified by:
onTypedString in interface ExpressionVisitor
onOther
public Object onOther(OtherExp exp)
- Specified by:
onOther in interface ExpressionVisitor
onRef
public Object onRef(ReferenceExp exp)
- Specified by:
onRef in interface ExpressionVisitor