|
Re: Using a custom OCLAnalyzer [message #53547 is a reply to message #53520] |
Fri, 04 April 2008 12:00 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Stefan,
The refactoring in the 1.2 release of the (formerly internal) OCLParser into
the current structure of AbstractOCLParser, OCLParser, AbstractOCLAnalyzer,
and OCLAnalyzer was contributed by the GMT UMLX project specifically in
order to support the construction of QVT parsers. As you probably know,
the QVT languages extend the syntax and semantics of OCL, so the
implementation in UMLX is probably a good example of what you can
accomplish by extending the OCLAnalyzer.
I would expect that you can achieve what you need by extending the
OCLAnalyzer, but I couldn't really answer definitively without more detail
of your case. You can also have a look at the QVTo component in the M2M
project, which implements the Operational QVT language as an extension to
MDT OCL, with evaluation of (among other things) custom operations and
QVT "queries."
HTH,
Christian
Stefan Schulze wrote:
> Hi,
>
> is it possible to use a custom OCLAnalyzer for parsing an expression?
> I'd need it to trigger parsing (and possibly inlining) of my own
> operations when the analyzer matches the corresponding OperationCallExp.
>
> Bye,
> Stefan
|
|
|
Re: Using a custom OCLAnalyzer [message #53728 is a reply to message #53547] |
Mon, 07 April 2008 22:26 |
Stefan Schulze Messages: 70 Registered: July 2009 |
Member |
|
|
Hi Christian,
I had a look at the QvtOperationalParser, but it looks like I have to
rewrite wide parts of org.eclipse.ocl.internal.helper.HelperUtil to utilize
my own OCLAnalyzer. I hoped I could do something like
setAnalyzer(myOclAnalyzer) or something to inject my own OCLAnalyzer into
the process of analyzing and parsing.
Stefan
"Christian W. Damus" <cdamus@ca.ibm.com> schrieb im Newsbeitrag
news:ft558h$nf3$1@build.eclipse.org...
> Hi, Stefan,
>
> The refactoring in the 1.2 release of the (formerly internal) OCLParser
> into
> the current structure of AbstractOCLParser, OCLParser,
> AbstractOCLAnalyzer,
> and OCLAnalyzer was contributed by the GMT UMLX project specifically in
> order to support the construction of QVT parsers. As you probably know,
> the QVT languages extend the syntax and semantics of OCL, so the
> implementation in UMLX is probably a good example of what you can
> accomplish by extending the OCLAnalyzer.
>
> I would expect that you can achieve what you need by extending the
> OCLAnalyzer, but I couldn't really answer definitively without more detail
> of your case. You can also have a look at the QVTo component in the M2M
> project, which implements the Operational QVT language as an extension to
> MDT OCL, with evaluation of (among other things) custom operations and
> QVT "queries."
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03134 seconds