|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.lpg.AbstractAnalyzer
org.eclipse.ocl.parser.AbstractOCLAnalyzer<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
org.eclipse.ocl.parser.OCLAnalyzer<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
public class OCLAnalyzer<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
The OCLAnalyzer performs semantic analysis on a CST produced by
an OCLParser to create the OCL AST. It is necessary that syntactic
parsing and semantic analysis are performed in two steps
because LPG is a bottom up parser and cannot provide enough contextual
information to create the AST on the first pass.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.ocl.parser.AbstractOCLAnalyzer |
|---|
environmentFactory, oclFactory, uml |
| Constructor Summary | |
|---|---|
OCLAnalyzer(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment)
Construct an OCL semantic analyzer with default syntactic and lexical parsers all operating within a given environment. |
|
OCLAnalyzer(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment,
String text)
Construct an OCL semantic analyzer with default syntactic and lexical parsers all operating within a given environment. |
|
OCLAnalyzer(OCLParser parser)
Construct an OCL semantic analyzer that will use a given parser to perform syntactic and lexical analysis. |
|
| Method Summary | |
|---|---|
OCLParser |
getParser()
|
OCLExpression<C> |
parseAST(OCLExpressionCS cst,
ConstraintKind constraintType)
Parses the specified concrete syntax model to an abstract syntax model. |
CSTNode |
parseConcreteSyntax()
Performs a concrete-syntax parser and throws ParserException
if any parse errors are encountered. |
CT |
parseInitOrDerValueCS()
Parses the input as an InitOrDerValueCS. |
CT |
parseInvOrDefCS()
Parses the input as an InvOrDefCS. |
List<CT> |
parsePackageDeclarationCS(List<CT> constraints)
Parses the input as a PackageDeclarationCS. |
CT |
parsePrePostOrBodyDeclCS()
Parses the input as a PrePostOrBodyDeclCS. |
Variable<C,PM> |
parseVariableDeclarationCS(boolean addToEnvironment)
Parses the input as a VariableDeclarationCS. |
| Methods inherited from class org.eclipse.ocl.lpg.AbstractAnalyzer |
|---|
computeInputString, dumpTokens, ERROR, ERROR, ERROR, formatClass, formatEClassName, formatName, formatPath, formatPath, formatQualifiedName, formatString, formatType, getCharOffset, getEnvironment, getFormatter, getLexer, getTraceFlag, initialize, initialize, initPropertyPositions, initStartEndPositions, initTypePositions, makeName, makeString, setCharacterOffset, setFileName, setTab, setTraceFlag, TRACE, TRACE |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OCLAnalyzer(OCLParser parser)
parser - the syntactic (and lexical) parserpublic OCLAnalyzer(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment)
environment - the symbolic and problem handling environment
public OCLAnalyzer(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment,
String text)
environment - the symbolic and problem handling environmenttext - the source text for analysis| Method Detail |
|---|
public OCLParser getParser()
getParser in class AbstractOCLAnalyzer<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>public CSTNode parseConcreteSyntax()
ParserException
if any parse errors are encountered.
null if it could not be parsed
public OCLExpression<C> parseAST(OCLExpressionCS cst,
ConstraintKind constraintType)
cst - the OCL concrete syntax modelconstraintType - the kind of constraint to parse
public List<CT> parsePackageDeclarationCS(List<CT> constraints)
constraints -
public CT parseInvOrDefCS()
null if it
could not be parsedpublic CT parsePrePostOrBodyDeclCS()
null if it
could not be parsedpublic CT parseInitOrDerValueCS()
null if it
could not be parsedpublic Variable<C,PM> parseVariableDeclarationCS(boolean addToEnvironment)
addToEnvironment - boolean whether or not to add the
the parsed variable to the environment
null if it
could not be parsed
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||