Package eu.bandm.tools.d2d2.base
Class Navigate.CharSetCalc
java.lang.Object
eu.bandm.tools.d2d2.model.MATCH_ONLY_00
eu.bandm.tools.d2d2.model.SinglePhase
eu.bandm.tools.d2d2.base.Navigate.CharSetCalc
- Enclosing class:
Navigate
Expand all character set expressions from the d2d definition language to
an extensional representation as
CharSet.
Cache the results locally.
Under a CharBinary operator, all refs and defs and operators MUST be of character type. Otherwise (esp. under a star or plus operator) the top expression MAY be of character set type, which is indicated by a result!=null.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<Expression, CharSet> Cache for all results calculated so far.protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> Evidentprotected CharSetTemporary visitor register.protected booleanWhether the visited focus is argument to a binary character expression.Fields inherited from class eu.bandm.tools.d2d2.model.MATCH_ONLY_00
_visitor_debug_stream, partial -
Constructor Summary
ConstructorsConstructorDescriptionEvident -
Method Summary
Modifier and TypeMethodDescriptionvoidEvaluate the arguments of the binary expression and construct the result.voidEvaluate the arguments of the binary expression and construct the result.voidEvaluate the arguments of the binary expression and construct the result.voidEvaluate the arguments of the binary expression and construct the result.voidA character set constant directly evaluates to itself.voidVisit the defined expressions.voidaction(Definition x) All definitions which are not CharsRegExp are NOT a character set.voidaction(Expression x) All other expressions are not character expressions.voidVisit the expression defined by the inserted reference.voidAny parse particle is NOT a character set.voidOnly considered to be a character set when under a character set operator.voidA string constant of length==1 is treated as a character set constant.find(Expression exp) Evaluate the expression: Either return the cache or invoke visiting.protected booleanlookUp(Expression exp) Copy the cached value to theresultregister.makeRange(CharSet from, CharSet to, CharBinary rangeExpr) Construct the range between two singleton sets.protected voidmemorize(Expression exp) Put to cache.protected voidoperation(CharBinary x, char code) Evaluate the arguments of the binary expression and construct the result.protected voidrangeerror(Expression exp, String pos) Range operator between non-singleton sets.protected booleanreportError(CharBinary x, String pos) Report the case that a char set binary operator is wrongly applied.protected voidxerror(Location<XMLDocumentIdentifier> loc, String txt) Emit an error message.Methods inherited from class eu.bandm.tools.d2d2.model.SinglePhase
action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, follow_definitions, follow_defInstances, follow_docu, follow_firsts, follow_globalSubsts, follow_imports, follow_itemDocu, follow_localdefs, follow_localSubsts, follow_modules, follow_namespaces, follow_obligates, follow_on, follow_rawModules, follow_text, follow_weakfirsts, follow_xattributesMethods inherited from class eu.bandm.tools.d2d2.model.MATCH_ONLY_00
_visitor_trace, action, action, action, action, action, compile, followAll_definitions, followAll_defInstances, followAll_docu, followAll_firsts, followAll_globalSubsts, followAll_imports, followAll_itemDocu, followAll_localdefs, followAll_localSubsts, followAll_modules, followAll_namespaces, followAll_obligates, followAll_on, followAll_rawModules, followAll_text, followAll_weakfirsts, followAll_xattributes, foreignObject, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, nomatch
-
Field Details
-
charsets
Cache for all results calculated so far. -
msg
Evident -
result
Temporary visitor register. -
underExpr
protected boolean underExprWhether the visited focus is argument to a binary character expression.
-
-
Constructor Details
-
CharSetCalc
Evident
-
-
Method Details
-
memorize
Put to cache. -
lookUp
Copy the cached value to theresultregister.- Returns:
- whether the cache contains a value.
-
find
Evaluate the expression: Either return the cache or invoke visiting. -
xerror
Emit an error message. -
action
Only considered to be a character set when under a character set operator.- Overrides:
actionin classSinglePhase
-
action
All definitions which are not CharsRegExp are NOT a character set.- Overrides:
actionin classSinglePhase
-
action
Any parse particle is NOT a character set.- Overrides:
actionin classSinglePhase
-
action
Visit the defined expressions.- Overrides:
actionin classSinglePhase
-
action
Visit the expression defined by the inserted reference.- Overrides:
actionin classSinglePhase
-
action
A character set constant directly evaluates to itself.- Overrides:
actionin classSinglePhase
-
action
A string constant of length==1 is treated as a character set constant.- Overrides:
actionin classSinglePhase
-
rangeerror
Range operator between non-singleton sets. -
makeRange
Construct the range between two singleton sets. -
reportError
Report the case that a char set binary operator is wrongly applied. -
operation
Evaluate the arguments of the binary expression and construct the result. -
action
Evaluate the arguments of the binary expression and construct the result.- Overrides:
actionin classSinglePhase
-
action
Evaluate the arguments of the binary expression and construct the result.- Overrides:
actionin classSinglePhase
-
action
Evaluate the arguments of the binary expression and construct the result.- Overrides:
actionin classSinglePhase
-
action
Evaluate the arguments of the binary expression and construct the result.- Overrides:
actionin classSinglePhase
-
action
All other expressions are not character expressions.- Overrides:
actionin classSinglePhase
-