org.eclipse.ocl.parser
Class AbstractOCLParser
java.lang.Object
org.eclipse.ocl.lpg.AbstractParser
org.eclipse.ocl.parser.AbstractOCLParser
- Direct Known Subclasses:
- OCLBacktrackingParser, OCLParser
public abstract class AbstractOCLParser
- extends AbstractParser
Field Summary |
protected java.util.Set<java.lang.String> |
iteratorNames
|
Method Summary |
protected OperationCallExpCS |
createArrowOperationCallExpCS(OCLExpressionCS oclExpressionCS,
SimpleNameCS simpleNameCS,
IsMarkedPreCS isMarkedPreCS,
arguments)
|
protected BooleanLiteralExpCS |
createBooleanLiteralExpCS(java.lang.String string)
|
protected ClassifierContextDeclCS |
createClassifierContextDeclCS(SimpleNameCS simpleNameCS,
PathNameCS pathNameCS,
constraints)
Creates a classifier context declaration. |
protected CollectionLiteralExpCS |
createCollectionLiteralExpCS(CollectionTypeCS typeCS,
collectionLiteralParts)
|
protected CollectionLiteralPartCS |
createCollectionLiteralPartCS(OCLExpressionCS oclExpressionCS)
|
protected CollectionRangeCS |
createCollectionRangeCS(OCLExpressionCS oclExpressionCS,
OCLExpressionCS lastOCLExpressionCS)
|
protected CollectionTypeCS |
createCollectionTypeCS(CollectionTypeIdentifierEnum collectionType,
java.lang.String value)
|
protected SimpleNameCS |
createConceptualOperationNameCS(IToken token)
|
protected DefCS |
createDefCS(boolean isStatic,
SimpleNameCS simpleNameCS,
DefExpressionCS defExpressionCS)
Creates a definition constraint. |
protected DefExpressionCS |
createDefExpressionCS(VariableCS variableCS,
OperationCS operationCS,
OCLExpressionCS oclExpressionCS)
|
protected DerValueCS |
createDerValueCS(OCLExpressionCS oclExpressionCS)
|
protected OperationCallExpCS |
createDotOperationCallExpCS(OCLExpressionCS oclExpressionCS,
PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
IsMarkedPreCS isMarkedPreCS,
arguments)
|
protected FeatureCallExpCS |
createFeatureCallExpCS(OCLExpressionCS source,
PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
arguments,
IsMarkedPreCS isMarkedPreCS)
|
protected IfExpCS |
createIfExpCS(OCLExpressionCS condition,
OCLExpressionCS thenExpression,
OCLExpressionCS elseExpression)
|
protected InitValueCS |
createInitValueCS(OCLExpressionCS oclExpressionCS)
|
protected IntegerLiteralExpCS |
createIntegerLiteralExpCS(java.lang.String string)
|
protected InvalidLiteralExpCS |
createInvalidLiteralExpCS(java.lang.String string)
|
protected InvCS |
createInvCS(SimpleNameCS simpleNameCS,
OCLExpressionCS oclExpressionCS)
Creates an invariant constraint. |
protected IsMarkedPreCS |
createIsMarkedPreCS()
|
protected IterateExpCS |
createIterateExpCS(OCLExpressionCS source,
SimpleNameCS simpleNameCS,
VariableCS variable1,
VariableCS variable2,
OCLExpressionCS oclExpressionCS)
|
protected IteratorExpCS |
createIteratorExpCS(OCLExpressionCS source,
SimpleNameCS simpleNameCS,
VariableCS variable1,
VariableCS variable2,
OCLExpressionCS oclExpressionCS)
|
protected java.util.Set<java.lang.String> |
createIteratorNames()
|
protected LetExpCS |
createLetExpCS( variables,
OCLExpressionCS oclExpressionCS)
|
protected MessageExpCS |
createMessageExpCS(OCLExpressionCS target,
boolean hasSent,
SimpleNameCS simpleNameCS,
oclMessageArgs)
|
protected NullLiteralExpCS |
createNullLiteralExpCS(java.lang.String string)
|
protected OCLDocumentCS |
createOCLDocumentCS(PackageDeclarationCS packageDecl)
Creates an OCL document CS from a chain of package context declarations. |
protected OCLMessageArgCS |
createOCLMessageArgCS(TypeCS typeCS,
OCLExpressionCS oclExpressionCS)
|
protected OperationCallExpCS |
createOperationCallExpCS(OCLExpressionCS oclExpressionCS,
SimpleNameCS simpleNameCS,
arguments)
|
protected OperationContextDeclCS |
createOperationContextDeclCS(OperationCS operationCS,
prePostOrBodyDecls)
|
protected OperationCS |
createOperationCS(IToken simpleName,
list,
TypeCS typeCS)
|
protected OperationCS |
createOperationCS(PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
list,
TypeCS typeCS)
|
protected PackageDeclarationCS |
createPackageDeclarationCS(PathNameCS pathNameCS,
contextDecls)
|
protected PathNameCS |
createPathNameCS()
|
protected PathNameCS |
createPathNameCS(SimpleNameCS name)
|
protected PathNameCS |
createPathNamePrefixCS(PathNameCS pathNameCS)
|
protected PrePostOrBodyDeclCS |
createPrePostOrBodyDeclCS(PrePostOrBodyEnum kind,
SimpleNameCS simpleNameCS,
OCLExpressionCS oclExpressionCS)
|
protected PrimitiveTypeCS |
createPrimitiveTypeCS(SimpleTypeEnum type,
java.lang.String value)
|
protected PropertyContextCS |
createPropertyContextCS(PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
TypeCS typeCS,
constraints)
|
protected SimpleNameCS |
createQuotedSimpleNameCS(SimpleTypeEnum type,
IToken token)
|
protected RealLiteralExpCS |
createRealLiteralExpCS(java.lang.String string)
|
protected SimpleNameCS |
createSimpleNameCS(SimpleTypeEnum type,
IToken token)
|
protected StringLiteralExpCS |
createStringLiteralExpCS(IToken token)
|
protected TupleLiteralExpCS |
createTupleLiteralExpCS( variables)
|
protected TupleTypeCS |
createTupleTypeCS( variables)
|
protected UnlimitedNaturalLiteralExpCS |
createUnlimitedNaturalLiteralExpCS(java.lang.String string)
|
protected VariableCS |
createVariableCS(SimpleNameCS varName,
TypeCS typeCS,
OCLExpressionCS oclExpressionCS)
|
protected VariableExpCS |
createVariableExpCS(SimpleNameCS simpleNameCS,
arguments,
IsMarkedPreCS isMarkedPreCS)
|
protected PathNameCS |
extendPathNameCS(PathNameCS path,
SimpleNameCS name)
|
protected SimpleNameCS |
extendQuotedSimpleNameCS(SimpleNameCS simpleName,
IToken token)
|
protected StringLiteralExpCS |
extendStringLiteralExpCS(StringLiteralExpCS string,
IToken token)
|
protected SimpleNameCS |
getPathNameSuffixCS(PathNameCS pathNameCS)
|
protected boolean |
isAtPre(IsMarkedPreCS atPreCS)
Queries whether the specified @pre construct was
actually present in the text. |
protected boolean |
isIterator(java.lang.String name)
|
protected boolean |
isNonStdSQSupported()
To be overridden in parsers which prohibit non-std SQL-like single quote
escaping (" '' "). |
protected java.lang.String |
unescape(IToken stringLiteral)
Deprecated. Use decodeString. |
Methods inherited from class org.eclipse.ocl.lpg.AbstractParser |
computeInputString, decodeEscapeSequence, decodeHexCharacter, decodeOctalCharacter, decodeString, getDefaultRepairCount, getEnvironment, getIPrsStream, getLeftIToken, getLeftSpan, getLexer, getParseTable, getRhsErrorIToken, getRhsErrorTokenIndex, getRhsFirstIToken, getRhsFirstTokenIndex, getRhsIToken, getRhsLastIToken, getRhsLastTokenIndex, getRhsSym, getRhsTokenIndex, getRightIToken, getRightSpan, numTokenKinds, orderedTerminalSymbols, parser, parser, parser, parseTokensToCST, reset, resetLexStream, setDefaultRepairCount, setLexStream, setOffsets, setOffsets, setOffsets, setResult, unDoubleQuote, unquote, unSingleQuote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
iteratorNames
protected java.util.Set<java.lang.String> iteratorNames
- Since:
- 3.0
AbstractOCLParser
public AbstractOCLParser(BasicEnvironment environment)
AbstractOCLParser
public AbstractOCLParser(AbstractLexer lexer)
createPackageDeclarationCS
protected PackageDeclarationCS createPackageDeclarationCS(PathNameCS pathNameCS,
contextDecls)
createPropertyContextCS
protected PropertyContextCS createPropertyContextCS(PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
TypeCS typeCS,
constraints)
- Since:
- 3.0
createDerValueCS
protected DerValueCS createDerValueCS(OCLExpressionCS oclExpressionCS)
- Since:
- 3.0
createInitValueCS
protected InitValueCS createInitValueCS(OCLExpressionCS oclExpressionCS)
- Since:
- 3.0
createClassifierContextDeclCS
protected ClassifierContextDeclCS createClassifierContextDeclCS(SimpleNameCS simpleNameCS,
PathNameCS pathNameCS,
constraints)
- Creates a classifier context declaration.
- Parameters:
pathNameCS
- the concrete syntax of the classifier's qualified nameconstraints
- the concrete syntax of the invariant and/or definition
constraints in the classifier context
- Returns:
- the classifier context declaration
- Since:
- 3.0
createInvCS
protected InvCS createInvCS(SimpleNameCS simpleNameCS,
OCLExpressionCS oclExpressionCS)
- Creates an invariant constraint.
- Parameters:
simpleNameCS
- the concrete syntax of the constraint name, or
null
if noneoclExpressionCS
- the concrete syntax of the constraint expression
- Returns:
- the concrete syntax of the invariant constraint
- Since:
- 1.3
createDefCS
protected DefCS createDefCS(boolean isStatic,
SimpleNameCS simpleNameCS,
DefExpressionCS defExpressionCS)
- Creates a definition constraint.
- Parameters:
isStatic
- true for a static constraintsimpleNameCS
- the concrete syntax of the constraint nameoclExpressionCS
- the concrete syntax of the constraint expression
- Returns:
- the concrete syntax of the definition constraint
- Since:
- 3.0
createDefExpressionCS
protected DefExpressionCS createDefExpressionCS(VariableCS variableCS,
OperationCS operationCS,
OCLExpressionCS oclExpressionCS)
createOperationContextDeclCS
protected OperationContextDeclCS createOperationContextDeclCS(OperationCS operationCS,
prePostOrBodyDecls)
createPrePostOrBodyDeclCS
protected PrePostOrBodyDeclCS createPrePostOrBodyDeclCS(PrePostOrBodyEnum kind,
SimpleNameCS simpleNameCS,
OCLExpressionCS oclExpressionCS)
createOperationCS
protected OperationCS createOperationCS(PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
list,
TypeCS typeCS)
createOperationCS
protected OperationCS createOperationCS(IToken simpleName,
list,
TypeCS typeCS)
- Since:
- 3.0
isAtPre
protected boolean isAtPre(IsMarkedPreCS atPreCS)
- Queries whether the specified @pre construct was
actually present in the text. This method is safe with null inputs.
- Parameters:
atPreCS
- an "at pre" construct or null
- Returns:
true
if the atPreCS is present;
false
, otherwise- Since:
- 1.3
createOperationCallExpCS
protected OperationCallExpCS createOperationCallExpCS(OCLExpressionCS oclExpressionCS,
SimpleNameCS simpleNameCS,
arguments)
- Since:
- 3.0
createArrowOperationCallExpCS
protected OperationCallExpCS createArrowOperationCallExpCS(OCLExpressionCS oclExpressionCS,
SimpleNameCS simpleNameCS,
IsMarkedPreCS isMarkedPreCS,
arguments)
- Since:
- 3.0
createDotOperationCallExpCS
protected OperationCallExpCS createDotOperationCallExpCS(OCLExpressionCS oclExpressionCS,
PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
IsMarkedPreCS isMarkedPreCS,
arguments)
- Since:
- 3.0
createVariableExpCS
protected VariableExpCS createVariableExpCS(SimpleNameCS simpleNameCS,
arguments,
IsMarkedPreCS isMarkedPreCS)
createConceptualOperationNameCS
protected SimpleNameCS createConceptualOperationNameCS(IToken token)
- Since:
- 3.0
createSimpleNameCS
protected SimpleNameCS createSimpleNameCS(SimpleTypeEnum type,
IToken token)
- Since:
- 3.0
createQuotedSimpleNameCS
protected SimpleNameCS createQuotedSimpleNameCS(SimpleTypeEnum type,
IToken token)
- Since:
- 3.0
createPrimitiveTypeCS
protected PrimitiveTypeCS createPrimitiveTypeCS(SimpleTypeEnum type,
java.lang.String value)
createPathNameCS
protected PathNameCS createPathNameCS(SimpleNameCS name)
- Since:
- 3.0
extendPathNameCS
protected PathNameCS extendPathNameCS(PathNameCS path,
SimpleNameCS name)
- Since:
- 3.0
createPathNameCS
protected PathNameCS createPathNameCS()
createPathNamePrefixCS
protected PathNameCS createPathNamePrefixCS(PathNameCS pathNameCS)
- Since:
- 3.0
getPathNameSuffixCS
protected SimpleNameCS getPathNameSuffixCS(PathNameCS pathNameCS)
- Since:
- 3.0
createCollectionLiteralExpCS
protected CollectionLiteralExpCS createCollectionLiteralExpCS(CollectionTypeCS typeCS,
collectionLiteralParts)
- Since:
- 3.0
createCollectionLiteralPartCS
protected CollectionLiteralPartCS createCollectionLiteralPartCS(OCLExpressionCS oclExpressionCS)
createCollectionRangeCS
protected CollectionRangeCS createCollectionRangeCS(OCLExpressionCS oclExpressionCS,
OCLExpressionCS lastOCLExpressionCS)
createTupleLiteralExpCS
protected TupleLiteralExpCS createTupleLiteralExpCS( variables)
createIntegerLiteralExpCS
protected IntegerLiteralExpCS createIntegerLiteralExpCS(java.lang.String string)
createUnlimitedNaturalLiteralExpCS
protected UnlimitedNaturalLiteralExpCS createUnlimitedNaturalLiteralExpCS(java.lang.String string)
createRealLiteralExpCS
protected RealLiteralExpCS createRealLiteralExpCS(java.lang.String string)
createStringLiteralExpCS
protected StringLiteralExpCS createStringLiteralExpCS(IToken token)
- Since:
- 3.0
extendQuotedSimpleNameCS
protected SimpleNameCS extendQuotedSimpleNameCS(SimpleNameCS simpleName,
IToken token)
- Since:
- 3.0
extendStringLiteralExpCS
protected StringLiteralExpCS extendStringLiteralExpCS(StringLiteralExpCS string,
IToken token)
- Since:
- 3.0
createBooleanLiteralExpCS
protected BooleanLiteralExpCS createBooleanLiteralExpCS(java.lang.String string)
createNullLiteralExpCS
protected NullLiteralExpCS createNullLiteralExpCS(java.lang.String string)
createInvalidLiteralExpCS
protected InvalidLiteralExpCS createInvalidLiteralExpCS(java.lang.String string)
createIteratorExpCS
protected IteratorExpCS createIteratorExpCS(OCLExpressionCS source,
SimpleNameCS simpleNameCS,
VariableCS variable1,
VariableCS variable2,
OCLExpressionCS oclExpressionCS)
- Since:
- 3.0
createIterateExpCS
protected IterateExpCS createIterateExpCS(OCLExpressionCS source,
SimpleNameCS simpleNameCS,
VariableCS variable1,
VariableCS variable2,
OCLExpressionCS oclExpressionCS)
- Since:
- 3.0
createVariableCS
protected VariableCS createVariableCS(SimpleNameCS varName,
TypeCS typeCS,
OCLExpressionCS oclExpressionCS)
- Since:
- 3.0
createCollectionTypeCS
protected CollectionTypeCS createCollectionTypeCS(CollectionTypeIdentifierEnum collectionType,
java.lang.String value)
- Since:
- 3.0
createTupleTypeCS
protected TupleTypeCS createTupleTypeCS( variables)
createFeatureCallExpCS
protected FeatureCallExpCS createFeatureCallExpCS(OCLExpressionCS source,
PathNameCS pathNameCS,
SimpleNameCS simpleNameCS,
arguments,
IsMarkedPreCS isMarkedPreCS)
- Since:
- 3.0
createIsMarkedPreCS
protected IsMarkedPreCS createIsMarkedPreCS()
- Since:
- 3.0
createLetExpCS
protected LetExpCS createLetExpCS( variables,
OCLExpressionCS oclExpressionCS)
createIfExpCS
protected IfExpCS createIfExpCS(OCLExpressionCS condition,
OCLExpressionCS thenExpression,
OCLExpressionCS elseExpression)
createMessageExpCS
protected MessageExpCS createMessageExpCS(OCLExpressionCS target,
boolean hasSent,
SimpleNameCS simpleNameCS,
oclMessageArgs)
- Since:
- 3.0
createOCLMessageArgCS
protected OCLMessageArgCS createOCLMessageArgCS(TypeCS typeCS,
OCLExpressionCS oclExpressionCS)
createOCLDocumentCS
protected OCLDocumentCS createOCLDocumentCS(PackageDeclarationCS packageDecl)
- Creates an OCL document CS from a chain of package context declarations.
- Parameters:
packageDecl
- a chain of package context declarations
- Returns:
- the document CS
- Since:
- 1.3
createIteratorNames
protected java.util.Set<java.lang.String> createIteratorNames()
- Since:
- 3.0
isIterator
protected boolean isIterator(java.lang.String name)
- Since:
- 3.0
unescape
@Deprecated
protected java.lang.String unescape(IToken stringLiteral)
- Deprecated. Use decodeString.
Escaping support based on the QVT specification (8.4.3).
- Parameters:
stringLiteral
- a string literal token with escape notation
- Returns:
- the unescaped string
- Since:
- 1.3
isNonStdSQSupported
protected boolean isNonStdSQSupported()
- To be overridden in parsers which prohibit non-std SQL-like single quote
escaping (" '' ").
- Returns:
- true if such escaping is supported, false otherwise
- Since:
- 1.3