Using other Parser/AST than LPG [message #24297] |
Tue, 30 September 2008 11:31  |
Eclipse User |
|
|
|
Hello
The IMP Documentation states that the interfaces found in
org.eclipse.imp.parser must be implemented in order to get IMP to work
with another parser than LPG.
However, some of these interfaces contain references to LPG classes. For
example, IParser refers to lpg.runtime.PrsStream.
Could it be that only a subset of the interfaces declared in this package
need to be implemented?
And is it possible to get a picture about which interfaces enable which
services?
Thanks
Marc
|
|
|
|
Re: Using other Parser/AST than LPG [message #24380 is a reply to message #24297] |
Tue, 07 October 2008 12:15   |
Eclipse User |
|
|
|
Mark,
Very glad to hear about your experience. Unfortunately, we haven't had
the bandwidth to follow through on the exercise of building an IMP IDE
on a parser other than LPG and documenting the results. We should try
to find the time to do that.
As you've noted, we do still have some compilation dependencies on
lpg.runtime. We're still working to eliminate these. However, as I
guess you have seen, some of these dependencies may only be compilation
dependencies and you may be able to use a non-LPG parser so long as
lpg.runtime is in your classpath.
We're very interested in hearing about your experience as you go
forward, both your successes and problems. Especially please let us
know about the problems, either here or through bugzilla, and we'll try
to get those fixed.
Regards,
Stan
Marc Ollier wrote:
> Hello
>
> The IMP Documentation states that the interfaces found in
> org.eclipse.imp.parser must be implemented in order to get IMP to work
> with another parser than LPG.
>
> However, some of these interfaces contain references to LPG classes. For
> example, IParser refers to lpg.runtime.PrsStream. Could it be that only
> a subset of the interfaces declared in this package need to be implemented?
>
> And is it possible to get a picture about which interfaces enable which
> services?
>
> Thanks
> Marc
>
|
|
|
Re: Using other Parser/AST than LPG [message #24419 is a reply to message #24297] |
Fri, 10 October 2008 14:49  |
Eclipse User |
|
|
|
Hi,
Marc Ollier wrote:
> Hello
>
> The IMP Documentation states that the interfaces found in
> org.eclipse.imp.parser must be implemented in order to get IMP to work
> with another parser than LPG.
The documentation needs to be more specific. As you observed, there
are several classes (e.g. IParser and ILexer) that are LPG-specific
and therefore aren't part of the required IMP interfaces.
[In fact, at some point in the not-too-distant future, these will be
moved out of the IMP runtime plugin and into an IMP-and-LPG-specific
runtime plugin, if for no other reason than to emphasize that IMP
doesn't treat LPG specially.]
The only required interfaces:
- IParseController
- IMessageHandler (used by the IParseController; if you're using
LPG, you can use the MessageHandlerAdapter to adapt from LPG's
IMessageHandler to IMP's)
Optional interfaces:
- ISourcePositionLocator (optional, but used by many services if
available)
- IModelListener (used by the "modelListener" extension point)
> However, some of these interfaces contain references to LPG classes. For
> example, IParser refers to lpg.runtime.PrsStream. Could it be that only
> a subset of the interfaces declared in this package need to be implemented?
>
> And is it possible to get a picture about which interfaces enable which
> services?
We should add documentation on these dependencies to the online
docs. Thanks for pointing this out.
Hope this helps!
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
|
Re: Using other Parser/AST than LPG [message #573405 is a reply to message #24297] |
Tue, 07 October 2008 12:15  |
Eclipse User |
|
|
|
Mark,
Very glad to hear about your experience. Unfortunately, we haven't had
the bandwidth to follow through on the exercise of building an IMP IDE
on a parser other than LPG and documenting the results. We should try
to find the time to do that.
As you've noted, we do still have some compilation dependencies on
lpg.runtime. We're still working to eliminate these. However, as I
guess you have seen, some of these dependencies may only be compilation
dependencies and you may be able to use a non-LPG parser so long as
lpg.runtime is in your classpath.
We're very interested in hearing about your experience as you go
forward, both your successes and problems. Especially please let us
know about the problems, either here or through bugzilla, and we'll try
to get those fixed.
Regards,
Stan
Marc Ollier wrote:
> Hello
>
> The IMP Documentation states that the interfaces found in
> org.eclipse.imp.parser must be implemented in order to get IMP to work
> with another parser than LPG.
>
> However, some of these interfaces contain references to LPG classes. For
> example, IParser refers to lpg.runtime.PrsStream. Could it be that only
> a subset of the interfaces declared in this package need to be implemented?
>
> And is it possible to get a picture about which interfaces enable which
> services?
>
> Thanks
> Marc
>
|
|
|
Re: Using other Parser/AST than LPG [message #573433 is a reply to message #24297] |
Fri, 10 October 2008 14:49  |
Eclipse User |
|
|
|
Hi,
Marc Ollier wrote:
> Hello
>
> The IMP Documentation states that the interfaces found in
> org.eclipse.imp.parser must be implemented in order to get IMP to work
> with another parser than LPG.
The documentation needs to be more specific. As you observed, there
are several classes (e.g. IParser and ILexer) that are LPG-specific
and therefore aren't part of the required IMP interfaces.
[In fact, at some point in the not-too-distant future, these will be
moved out of the IMP runtime plugin and into an IMP-and-LPG-specific
runtime plugin, if for no other reason than to emphasize that IMP
doesn't treat LPG specially.]
The only required interfaces:
- IParseController
- IMessageHandler (used by the IParseController; if you're using
LPG, you can use the MessageHandlerAdapter to adapt from LPG's
IMessageHandler to IMP's)
Optional interfaces:
- ISourcePositionLocator (optional, but used by many services if
available)
- IModelListener (used by the "modelListener" extension point)
> However, some of these interfaces contain references to LPG classes. For
> example, IParser refers to lpg.runtime.PrsStream. Could it be that only
> a subset of the interfaces declared in this package need to be implemented?
>
> And is it possible to get a picture about which interfaces enable which
> services?
We should add documentation on these dependencies to the online
docs. Thanks for pointing this out.
Hope this helps!
--
Cheers,
-- Bob
--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center
IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
|
|
|
Powered by
FUDForum. Page generated in 0.04584 seconds