Package com.sun.msv.reader
Class RunAwayExpressionChecker
- java.lang.Object
-
- com.sun.msv.reader.RunAwayExpressionChecker
-
- All Implemented Interfaces:
ExpressionVisitorVoid
public class RunAwayExpressionChecker extends Object implements ExpressionVisitorVoid
makes sure that the expression does not run away. "run-away" expressions are expressions like this. <hedgeRule label="foo" /> <hedgeRef label="foo" /> </hedgeRule> Apparently, those expressions cannot be expressed in string regular expression. Therefore run-away expressions are prohibited in both RELAX and TREX.- Author:
- Kohsuke KAWAGUCHI
-
-
Field Summary
Fields Modifier and Type Field Description protected static RuntimeException
eureka
this exception is thrown to abort check when a error is found.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RunAwayExpressionChecker(GrammarReader reader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
binaryVisit(BinaryExp exp)
static void
check(GrammarReader reader, Expression exp)
void
onAnyString()
void
onAttribute(AttributeExp exp)
void
onChoice(ChoiceExp exp)
void
onConcur(ConcurExp exp)
void
onData(DataExp exp)
void
onElement(ElementExp exp)
void
onEpsilon()
void
onInterleave(InterleaveExp exp)
void
onList(ListExp exp)
void
onMixed(MixedExp exp)
void
onNullSet()
void
onOneOrMore(OneOrMoreExp exp)
void
onOther(OtherExp exp)
void
onRef(ReferenceExp exp)
void
onSequence(SequenceExp exp)
void
onValue(ValueExp exp)
protected void
unaryVisit(UnaryExp exp)
-
-
-
Field Detail
-
eureka
protected static final RuntimeException eureka
this exception is thrown to abort check when a error is found.
-
-
Constructor Detail
-
RunAwayExpressionChecker
protected RunAwayExpressionChecker(GrammarReader reader)
-
-
Method Detail
-
check
public static void check(GrammarReader reader, Expression exp)
-
onAttribute
public void onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interfaceExpressionVisitorVoid
-
onConcur
public void onConcur(ConcurExp exp)
- Specified by:
onConcur
in interfaceExpressionVisitorVoid
-
onInterleave
public void onInterleave(InterleaveExp exp)
- Specified by:
onInterleave
in interfaceExpressionVisitorVoid
-
onSequence
public void onSequence(SequenceExp exp)
- Specified by:
onSequence
in interfaceExpressionVisitorVoid
-
onChoice
public void onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interfaceExpressionVisitorVoid
-
onOneOrMore
public void onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interfaceExpressionVisitorVoid
-
onMixed
public void onMixed(MixedExp exp)
- Specified by:
onMixed
in interfaceExpressionVisitorVoid
-
onList
public void onList(ListExp exp)
- Specified by:
onList
in interfaceExpressionVisitorVoid
-
onEpsilon
public void onEpsilon()
- Specified by:
onEpsilon
in interfaceExpressionVisitorVoid
-
onNullSet
public void onNullSet()
- Specified by:
onNullSet
in interfaceExpressionVisitorVoid
-
onAnyString
public void onAnyString()
- Specified by:
onAnyString
in interfaceExpressionVisitorVoid
-
onData
public void onData(DataExp exp)
- Specified by:
onData
in interfaceExpressionVisitorVoid
-
onValue
public void onValue(ValueExp exp)
- Specified by:
onValue
in interfaceExpressionVisitorVoid
-
binaryVisit
protected final void binaryVisit(BinaryExp exp)
-
unaryVisit
protected final void unaryVisit(UnaryExp exp)
-
onRef
public void onRef(ReferenceExp exp)
- Specified by:
onRef
in interfaceExpressionVisitorVoid
-
onOther
public void onOther(OtherExp exp)
- Specified by:
onOther
in interfaceExpressionVisitorVoid
-
onElement
public void onElement(ElementExp exp)
- Specified by:
onElement
in interfaceExpressionVisitorVoid
-
-