Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Regarding the IMP project!
Regarding the IMP project! [message #9937] Tue, 16 October 2007 11:14 Go to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Hi All,

I'm new to the news group as well as with the IMP project. I have gone
through the steps given in
http://eclipse-imp.sourceforge.net/documentation/users_guide .html but still
few things aren't clear as:

1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
Services" -> "LPG Grammar and Parser for UIDE"
instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
"New LPG Grammar with Parser Wrapper".
Are these options the same thing?
2)When I proceed further using the option "New LPG Grammar with Parser
Wrapper", the package of AST remains empty (no classes/interfaces are
generated in it) and due to this I get errors in other packages...

Finally, I want to know in more clear terms how to test it after successful
completion of all the steps? (I did not understand the same in user guide)

Thanks for your co-operation!

Hitesh...
Answers to questions on the IMP project [message #9984 is a reply to message #9937] Tue, 16 October 2007 19:55 Go to previous messageGo to next message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hitesh Nembhwani wrote:
> Hi All,
>
> I'm new to the news group as well as with the IMP project. I have gone
> through the steps given in
> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but still
> few things aren't clear as:
>
> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
> Services" -> "LPG Grammar and Parser for UIDE"
> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
> "New LPG Grammar with Parser Wrapper".
> Are these options the same thing?

Yes, these are the same thing. This is a case where the documentation
is lagging behind our recent changes to other parts of the system.
Thanks for pointing this out.

> 2)When I proceed further using the option "New LPG Grammar with Parser
> Wrapper", the package of AST remains empty (no classes/interfaces are
> generated in it) and due to this I get errors in other packages...

I can't say about this without more information. The LPG builder should
run automatically when you generate the grammar files using this wizard
(or later modify one of these files).

Are you running in a level 1 workspace? Is the LPG Runtime feature
installed? (This feature contains the LPG builder. Current version is
2.0.6, I believe.) Is the LPG builder running at all? Are there new
Java classes generated in the parser package? (E.g., for a language
"Lang", there should be "LangLexer.java", "LangParser.java", and other
lexer- and parser-related classes). Do you see any exception traces in
the console window or get any error messages in the Error Log view?

> Finally, I want to know in more clear terms how to test it after successful
> completion of all the steps? (I did not understand the same in user guide)

This is a good question--we need some documentation about this. You can
run through all of the steps (or a subset of them) and get a working IDE
for our example language without doing any other work. This is what we
do when we give an IMP demo.

The grammar templates that are generated by the "New LPG Grammar with
Parser Wrapper" contain grammar rules for an example language, "LEG" (or
"leg")--anyway, that's what we call it (for "Little Expression
Grammar"), although you can name it anything.

The skeleton implementations that are generated for the other services
all contain working example implementations that are based on the
example grammar. Each time you add a language service you should be
able to restart the IDE being developed and see that service working on
programs in the example language.

To run your new IDE, you need to run a level 2 workspace, that is, a
runtime workbench starting from the development workspace in which you
are building the IDE. The IDE should function automatically within the
level 2 workspace when you are working on programs in your new language
(just as the JDT operates automatically on Java programs).

We recommend creating a Java project for developing programs in your new
language and seeing how your new IDE works. In the "src" folder of the
Java project, create a file in the new language. (I'll post an example
separately in this newsgroup.) In order to be recognized by the new
IDE, source programs in the new language must be given the filename
extension that was specified in the "Programming language descriptor"
wizard (we use "leg" for our example LEG-language extension). When you
open a file with the appropriate filename extension, it should appear
automatically in the editor of the new IDE. Depending on what other
services have been instantiated in the IDE, you may see an outline view,
syntax highlighting, source folding, and so on.

You don't have to follow the whole IDE development process to the end.
You can rerun the IDE each time you add a new service. The IDE actually
becomes operational as soon as the parser is defined. If you run the
IDE then, you should see little more than a basic Eclipse text editor,
but it should already have integrated parsing--in other words, you
should see annotations for syntax errors. When we give the IMP demo, we
then usually add syntax highlighting (token coloring), outlining, and
source text viewing, and rerun the IDE after that.

This all works with the example LEG language and the example
implementations for the various services. We think this grammar and
these service implementations are fairly typical, but each language and
IDE will be different. You may be able to start developing your own
language and IDE by adapting the IMP LEG examples, or you may want to
remove all of our example code and write your own grammar and servie
implementations from scratch.

> Thanks for your co-operation!
>
> Hitesh...
>
>

Thanks for the good questions!

Stan Sutton
Re: Answers to questions on the IMP project [message #12251 is a reply to message #9984] Wed, 17 October 2007 18:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Hi Stanley,

Yes, LPG Runtime feature is installed, version 2.0.8.

I created a plug-in project named "Sample". When I used the option "New LPG
Grammar with Parser Wrapper", two packages,
(1) sample.imp.parser
(2) sample.imp.parser.AST are created.
Package 1 has following files:
SampleASTNodeLocator.java
SampleParseController.java
SampleParser.java
SampleKWLexer.gi
SampleLexer.gi
SampleLexer.l
SampleParser.g
SampleParser.l

But package 2 is completely empty... (no classe/interfaces in it) and
because of this I get errors in SampleASTNodeLocator & SampleParseController
files saying "ASTNode cannot be resolved to a type".
The SampleASTNodeLocator & SampleParseController files use "import
sample.imp.parser.Ast.ASTNode"...

Also, how do I check if LPG builder is running or not?

Thanks,
Hitesh...

"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff34v5$ind$1@build.eclipse.org...
> Hitesh Nembhwani wrote:
>> Hi All,
>>
>> I'm new to the news group as well as with the IMP project. I have gone
>> through the steps given in
>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>> still few things aren't clear as:
>>
>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>> Services" -> "LPG Grammar and Parser for UIDE"
>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>> "New LPG Grammar with Parser Wrapper".
>> Are these options the same thing?
>
> Yes, these are the same thing. This is a case where the documentation is
> lagging behind our recent changes to other parts of the system. Thanks for
> pointing this out.
>
>> 2)When I proceed further using the option "New LPG Grammar with Parser
>> Wrapper", the package of AST remains empty (no classes/interfaces are
>> generated in it) and due to this I get errors in other packages...
>
> I can't say about this without more information. The LPG builder should
> run automatically when you generate the grammar files using this wizard
> (or later modify one of these files).
>
> Are you running in a level 1 workspace? Is the LPG Runtime feature
> installed? (This feature contains the LPG builder. Current version is
> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
> classes generated in the parser package? (E.g., for a language "Lang",
> there should be "LangLexer.java", "LangParser.java", and other lexer- and
> parser-related classes). Do you see any exception traces in the console
> window or get any error messages in the Error Log view?
>
>> Finally, I want to know in more clear terms how to test it after
>> successful completion of all the steps? (I did not understand the same in
>> user guide)
>
> This is a good question--we need some documentation about this. You can
> run through all of the steps (or a subset of them) and get a working IDE
> for our example language without doing any other work. This is what we do
> when we give an IMP demo.
>
> The grammar templates that are generated by the "New LPG Grammar with
> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
> although you can name it anything.
>
> The skeleton implementations that are generated for the other services all
> contain working example implementations that are based on the example
> grammar. Each time you add a language service you should be able to
> restart the IDE being developed and see that service working on programs
> in the example language.
>
> To run your new IDE, you need to run a level 2 workspace, that is, a
> runtime workbench starting from the development workspace in which you are
> building the IDE. The IDE should function automatically within the level
> 2 workspace when you are working on programs in your new language (just as
> the JDT operates automatically on Java programs).
>
> We recommend creating a Java project for developing programs in your new
> language and seeing how your new IDE works. In the "src" folder of the
> Java project, create a file in the new language. (I'll post an example
> separately in this newsgroup.) In order to be recognized by the new IDE,
> source programs in the new language must be given the filename extension
> that was specified in the "Programming language descriptor" wizard (we use
> "leg" for our example LEG-language extension). When you open a file with
> the appropriate filename extension, it should appear automatically in the
> editor of the new IDE. Depending on what other services have been
> instantiated in the IDE, you may see an outline view, syntax highlighting,
> source folding, and so on.
>
> You don't have to follow the whole IDE development process to the end. You
> can rerun the IDE each time you add a new service. The IDE actually
> becomes operational as soon as the parser is defined. If you run the IDE
> then, you should see little more than a basic Eclipse text editor, but it
> should already have integrated parsing--in other words, you should see
> annotations for syntax errors. When we give the IMP demo, we then usually
> add syntax highlighting (token coloring), outlining, and source text
> viewing, and rerun the IDE after that.
>
> This all works with the example LEG language and the example
> implementations for the various services. We think this grammar and these
> service implementations are fairly typical, but each language and IDE will
> be different. You may be able to start developing your own language and
> IDE by adapting the IMP LEG examples, or you may want to remove all of our
> example code and write your own grammar and servie implementations from
> scratch.
>
>> Thanks for your co-operation!
>>
>> Hitesh...
>
> Thanks for the good questions!
>
> Stan Sutton
Re: Answers to questions on the IMP project [message #12284 is a reply to message #12251] Thu, 18 October 2007 14:32 Go to previous messageGo to next message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hello Hitesh,

If the LPG Runtime feature is installed, then the LPG builder should be
available through that. If it were running successfully, there should
be another 8 or 9 Java classes in sample.imp.parser, and you should have
a set of AST classes in the *.AST package (and a few other classes). If
it were running unsuccessfully then you might see an exception stack
trace or error message on the console or you might get an error message
in the Error Log view. Do you see either of these things?

Another thing to look at: If LPG is installed properly, and you right
click on the project Sample (or any other one, for that matter), you
should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
installed properly, you should see some other "Enable *** Builder"
items, as well, such as "Enable X10 Builder.") If LPG is properly
installed then you should see the corresponding menu item. If you don't
then that's a problem.

Of course, if the LPG builder is properly installed, it should be
running automatically and you should see the additional classes that I
mentioned above. I just tried this with the current IMP release on SF
and using your names of "Sample" and "sample" for the project and
language, and it worked for me. If you don't see the additional classes
but you do have the "Enable LPG Builder" menu item, then you could try
selecting that so as to manually enable the builder. That shouldn't be
necessary, but see if it has some effect.

Regards,

Stan Sutton


Hitesh Nembhwani wrote:
> Hi Stanley,
>
> Yes, LPG Runtime feature is installed, version 2.0.8.
>
> I created a plug-in project named "Sample". When I used the option "New LPG
> Grammar with Parser Wrapper", two packages,
> (1) sample.imp.parser
> (2) sample.imp.parser.AST are created.
> Package 1 has following files:
> SampleASTNodeLocator.java
> SampleParseController.java
> SampleParser.java
> SampleKWLexer.gi
> SampleLexer.gi
> SampleLexer.l
> SampleParser.g
> SampleParser.l
>
> But package 2 is completely empty... (no classe/interfaces in it) and
> because of this I get errors in SampleASTNodeLocator & SampleParseController
> files saying "ASTNode cannot be resolved to a type".
> The SampleASTNodeLocator & SampleParseController files use "import
> sample.imp.parser.Ast.ASTNode"...
>
> Also, how do I check if LPG builder is running or not?
>
> Thanks,
> Hitesh...
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff34v5$ind$1@build.eclipse.org...
>> Hitesh Nembhwani wrote:
>>> Hi All,
>>>
>>> I'm new to the news group as well as with the IMP project. I have gone
>>> through the steps given in
>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>> still few things aren't clear as:
>>>
>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>> Services" -> "LPG Grammar and Parser for UIDE"
>>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>>> "New LPG Grammar with Parser Wrapper".
>>> Are these options the same thing?
>> Yes, these are the same thing. This is a case where the documentation is
>> lagging behind our recent changes to other parts of the system. Thanks for
>> pointing this out.
>>
>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>> generated in it) and due to this I get errors in other packages...
>> I can't say about this without more information. The LPG builder should
>> run automatically when you generate the grammar files using this wizard
>> (or later modify one of these files).
>>
>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>> installed? (This feature contains the LPG builder. Current version is
>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
>> classes generated in the parser package? (E.g., for a language "Lang",
>> there should be "LangLexer.java", "LangParser.java", and other lexer- and
>> parser-related classes). Do you see any exception traces in the console
>> window or get any error messages in the Error Log view?
>>
>>> Finally, I want to know in more clear terms how to test it after
>>> successful completion of all the steps? (I did not understand the same in
>>> user guide)
>> This is a good question--we need some documentation about this. You can
>> run through all of the steps (or a subset of them) and get a working IDE
>> for our example language without doing any other work. This is what we do
>> when we give an IMP demo.
>>
>> The grammar templates that are generated by the "New LPG Grammar with
>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
>> although you can name it anything.
>>
>> The skeleton implementations that are generated for the other services all
>> contain working example implementations that are based on the example
>> grammar. Each time you add a language service you should be able to
>> restart the IDE being developed and see that service working on programs
>> in the example language.
>>
>> To run your new IDE, you need to run a level 2 workspace, that is, a
>> runtime workbench starting from the development workspace in which you are
>> building the IDE. The IDE should function automatically within the level
>> 2 workspace when you are working on programs in your new language (just as
>> the JDT operates automatically on Java programs).
>>
>> We recommend creating a Java project for developing programs in your new
>> language and seeing how your new IDE works. In the "src" folder of the
>> Java project, create a file in the new language. (I'll post an example
>> separately in this newsgroup.) In order to be recognized by the new IDE,
>> source programs in the new language must be given the filename extension
>> that was specified in the "Programming language descriptor" wizard (we use
>> "leg" for our example LEG-language extension). When you open a file with
>> the appropriate filename extension, it should appear automatically in the
>> editor of the new IDE. Depending on what other services have been
>> instantiated in the IDE, you may see an outline view, syntax highlighting,
>> source folding, and so on.
>>
>> You don't have to follow the whole IDE development process to the end. You
>> can rerun the IDE each time you add a new service. The IDE actually
>> becomes operational as soon as the parser is defined. If you run the IDE
>> then, you should see little more than a basic Eclipse text editor, but it
>> should already have integrated parsing--in other words, you should see
>> annotations for syntax errors. When we give the IMP demo, we then usually
>> add syntax highlighting (token coloring), outlining, and source text
>> viewing, and rerun the IDE after that.
>>
>> This all works with the example LEG language and the example
>> implementations for the various services. We think this grammar and these
>> service implementations are fairly typical, but each language and IDE will
>> be different. You may be able to start developing your own language and
>> IDE by adapting the IMP LEG examples, or you may want to remove all of our
>> example code and write your own grammar and servie implementations from
>> scratch.
>>
>>> Thanks for your co-operation!
>>>
>>> Hitesh...
>> Thanks for the good questions!
>>
>> Stan Sutton
>
>
Re: Answers to questions on the IMP project [message #12306 is a reply to message #12284] Fri, 19 October 2007 12:18 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hello!

> Hitesh Nembhwani wrote:
> > I created a plug-in project named "Sample". When I used the option "New
LPG
> > Grammar with Parser Wrapper", two packages,
> > (1) sample.imp.parser
> > (2) sample.imp.parser.AST are created.
> > Package 1 has following files:
> > SampleASTNodeLocator.java
> > SampleParseController.java
> > SampleParser.java
> > SampleKWLexer.gi
> > SampleLexer.gi
> > SampleLexer.l
> > SampleParser.g
> > SampleParser.l
> >
> > But package 2 is completely empty... (no classe/interfaces in it) and
> > because of this I get errors in SampleASTNodeLocator &
SampleParseController
> > files saying "ASTNode cannot be resolved to a type".
> > The SampleASTNodeLocator & SampleParseController files use "import
> > sample.imp.parser.Ast.ASTNode"...

I have the same problem. It may be of help to notice that sometimes the
exception below appears in the console. In the wizard, the fields at the
bottom are disabled and there's a message "can't create wizard page".

best regards,
Vlad


!ENTRY org.eclipse.imp.runtime 4 0 2007-10-19 14:06:13.687
!MESSAGE Could not create wizard page
!STACK 0
java.lang.NullPointerException
at
org.eclipse.imp.wizards.ExtensionPointEnabler.loadImpExtensi onsModel(Extensi
onPointEnabler.java:506)
at
org.eclipse.imp.wizards.IMPWizardPage.discoverProjectLanguag e(IMPWizardPage.
java:240)
at
org.eclipse.imp.wizards.ExtensionPointWizardPage.createContr ol(ExtensionPoin
tWizardPage.java:407)
at
org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:180)
at
org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:6
14)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:502)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at
org.eclipse.ui.internal.actions.NewWizardShortcutAction.run( NewWizardShortcu
tAction.java:102)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
tionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(
EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAp
pLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: Answers to questions on the IMP project [message #12317 is a reply to message #12306] Fri, 19 October 2007 12:25 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Oh, I see now that all IMP features have been installed outside of the main
Eclipse installation (I have some external product extension locations) and
maybe that's what makes it blow... (that path has spaces in it)

I'll be back with details.

regards,
Vlad

"Vlad D." <vladdu55@gmail.com> wrote in message
news:ffa7ad$nl5$1@build.eclipse.org...
> Hello!
>
> > Hitesh Nembhwani wrote:
> > > I created a plug-in project named "Sample". When I used the option
"New
> LPG
> > > Grammar with Parser Wrapper", two packages,
> > > (1) sample.imp.parser
> > > (2) sample.imp.parser.AST are created.
> > > Package 1 has following files:
> > > SampleASTNodeLocator.java
> > > SampleParseController.java
> > > SampleParser.java
> > > SampleKWLexer.gi
> > > SampleLexer.gi
> > > SampleLexer.l
> > > SampleParser.g
> > > SampleParser.l
> > >
> > > But package 2 is completely empty... (no classe/interfaces in it) and
> > > because of this I get errors in SampleASTNodeLocator &
> SampleParseController
> > > files saying "ASTNode cannot be resolved to a type".
> > > The SampleASTNodeLocator & SampleParseController files use "import
> > > sample.imp.parser.Ast.ASTNode"...
>
> I have the same problem. It may be of help to notice that sometimes the
> exception below appears in the console. In the wizard, the fields at the
> bottom are disabled and there's a message "can't create wizard page".
>
> best regards,
> Vlad
>
>
> !ENTRY org.eclipse.imp.runtime 4 0 2007-10-19 14:06:13.687
> !MESSAGE Could not create wizard page
> !STACK 0
> java.lang.NullPointerException
> at
>
org.eclipse.imp.wizards.ExtensionPointEnabler.loadImpExtensi onsModel(Extensi
> onPointEnabler.java:506)
> at
>
org.eclipse.imp.wizards.IMPWizardPage.discoverProjectLanguag e(IMPWizardPage.
> java:240)
> at
>
org.eclipse.imp.wizards.ExtensionPointWizardPage.createContr ol(ExtensionPoin
> tWizardPage.java:407)
> at
> org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:180)
> at
>
org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:6
> 14)
> at
>
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:502)
> at org.eclipse.jface.window.Window.create(Window.java:426)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
> at
>
org.eclipse.ui.internal.actions.NewWizardShortcutAction.run( NewWizardShortcu
> tAction.java:102)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:539)
> at
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:488)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
> tionItem.java:400)
> at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:78)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(
> EclipseAppLauncher.java:92)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAp
> pLauncher.java:68)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
Re: Answers to questions on the IMP project [message #12333 is a reply to message #12284] Fri, 19 October 2007 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

1)Stanley, thanks a lot for the mails and help.
2)No, i don't see any other Java classes other than what I had mentioned
earlier. (*.AST is completely empty) I have attached the snap shot of my
project exlporer, this should show you what files are generated in the
packages. Alao, attached are the error log & problem views...
3)Yup, I can see "Enable LPG builder" menu item along with others...
4)I tried doing by even selecting the "Enable LPG builder" manually but
still dont have any luck going my way :(

Hitesh...


"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff7qpn$tdu$1@build.eclipse.org...
> Hello Hitesh,
>
> If the LPG Runtime feature is installed, then the LPG builder should be
> available through that. If it were running successfully, there should
> be another 8 or 9 Java classes in sample.imp.parser, and you should have
> a set of AST classes in the *.AST package (and a few other classes). If
> it were running unsuccessfully then you might see an exception stack
> trace or error message on the console or you might get an error message
> in the Error Log view. Do you see either of these things?
>
> Another thing to look at: If LPG is installed properly, and you right
> click on the project Sample (or any other one, for that matter), you
> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
> installed properly, you should see some other "Enable *** Builder"
> items, as well, such as "Enable X10 Builder.") If LPG is properly
> installed then you should see the corresponding menu item. If you don't
> then that's a problem.
>
> Of course, if the LPG builder is properly installed, it should be
> running automatically and you should see the additional classes that I
> mentioned above. I just tried this with the current IMP release on SF
> and using your names of "Sample" and "sample" for the project and
> language, and it worked for me. If you don't see the additional classes
> but you do have the "Enable LPG Builder" menu item, then you could try
> selecting that so as to manually enable the builder. That shouldn't be
> necessary, but see if it has some effect.
>
> Regards,
>
> Stan Sutton
>
>
> Hitesh Nembhwani wrote:
>> Hi Stanley,
>>
>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>
>> I created a plug-in project named "Sample". When I used the option "New
>> LPG
>> Grammar with Parser Wrapper", two packages,
>> (1) sample.imp.parser
>> (2) sample.imp.parser.AST are created.
>> Package 1 has following files:
>> SampleASTNodeLocator.java
>> SampleParseController.java
>> SampleParser.java
>> SampleKWLexer.gi
>> SampleLexer.gi
>> SampleLexer.l
>> SampleParser.g
>> SampleParser.l
>>
>> But package 2 is completely empty... (no classe/interfaces in it) and
>> because of this I get errors in SampleASTNodeLocator &
>> SampleParseController
>> files saying "ASTNode cannot be resolved to a type".
>> The SampleASTNodeLocator & SampleParseController files use "import
>> sample.imp.parser.Ast.ASTNode"...
>>
>> Also, how do I check if LPG builder is running or not?
>>
>> Thanks,
>> Hitesh...
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff34v5$ind$1@build.eclipse.org...
>>> Hitesh Nembhwani wrote:
>>>> Hi All,
>>>>
>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>> through the steps given in
>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>> still few things aren't clear as:
>>>>
>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>> "LPG" ->
>>>> "New LPG Grammar with Parser Wrapper".
>>>> Are these options the same thing?
>>> Yes, these are the same thing. This is a case where the documentation
>>> is
>>> lagging behind our recent changes to other parts of the system. Thanks
>>> for
>>> pointing this out.
>>>
>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>> generated in it) and due to this I get errors in other packages...
>>> I can't say about this without more information. The LPG builder should
>>> run automatically when you generate the grammar files using this wizard
>>> (or later modify one of these files).
>>>
>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>> installed? (This feature contains the LPG builder. Current version is
>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>> Java
>>> classes generated in the parser package? (E.g., for a language "Lang",
>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>> and
>>> parser-related classes). Do you see any exception traces in the console
>>> window or get any error messages in the Error Log view?
>>>
>>>> Finally, I want to know in more clear terms how to test it after
>>>> successful completion of all the steps? (I did not understand the same
>>>> in
>>>> user guide)
>>> This is a good question--we need some documentation about this. You can
>>> run through all of the steps (or a subset of them) and get a working IDE
>>> for our example language without doing any other work. This is what we
>>> do
>>> when we give an IMP demo.
>>>
>>> The grammar templates that are generated by the "New LPG Grammar with
>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>> "leg")--anyway, that's what we call it (for "Little Expression
>>> Grammar"),
>>> although you can name it anything.
>>>
>>> The skeleton implementations that are generated for the other services
>>> all
>>> contain working example implementations that are based on the example
>>> grammar. Each time you add a language service you should be able to
>>> restart the IDE being developed and see that service working on programs
>>> in the example language.
>>>
>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>> runtime workbench starting from the development workspace in which you
>>> are
>>> building the IDE. The IDE should function automatically within the
>>> level
>>> 2 workspace when you are working on programs in your new language (just
>>> as
>>> the JDT operates automatically on Java programs).
>>>
>>> We recommend creating a Java project for developing programs in your new
>>> language and seeing how your new IDE works. In the "src" folder of the
>>> Java project, create a file in the new language. (I'll post an example
>>> separately in this newsgroup.) In order to be recognized by the new
>>> IDE,
>>> source programs in the new language must be given the filename extension
>>> that was specified in the "Programming language descriptor" wizard (we
>>> use
>>> "leg" for our example LEG-language extension). When you open a file
>>> with
>>> the appropriate filename extension, it should appear automatically in
>>> the
>>> editor of the new IDE. Depending on what other services have been
>>> instantiated in the IDE, you may see an outline view, syntax
>>> highlighting,
>>> source folding, and so on.
>>>
>>> You don't have to follow the whole IDE development process to the end.
>>> You
>>> can rerun the IDE each time you add a new service. The IDE actually
>>> becomes operational as soon as the parser is defined. If you run the
>>> IDE
>>> then, you should see little more than a basic Eclipse text editor, but
>>> it
>>> should already have integrated parsing--in other words, you should see
>>> annotations for syntax errors. When we give the IMP demo, we then
>>> usually
>>> add syntax highlighting (token coloring), outlining, and source text
>>> viewing, and rerun the IDE after that.
>>>
>>> This all works with the example LEG language and the example
>>> implementations for the various services. We think this grammar and
>>> these
>>> service implementations are fairly typical, but each language and IDE
>>> will
>>> be different. You may be able to start developing your own language and
>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>> our
>>> example code and write your own grammar and servie implementations from
>>> scratch.
>>>
>>>> Thanks for your co-operation!
>>>>
>>>> Hitesh...
>>> Thanks for the good questions!
>>>
>>> Stan Sutton
>>
>>





Re: Answers to questions on the IMP project [message #12344 is a reply to message #12317] Fri, 19 October 2007 12:45 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
"Vlad D." <vladdu55@gmail.com> wrote in message
news:ffa7nj$pga$1@build.eclipse.org...
> Oh, I see now that all IMP features have been installed outside of the
main
> Eclipse installation (I have some external product extension locations)
and
> maybe that's what makes it blow... (that path has spaces in it)

Yes, that was it --- it seems something doesn't stand spaces in path
names...

best regards,
Vlad
Re: Answers to questions on the IMP project [message #12364 is a reply to message #12344] Sun, 21 October 2007 15:29 Go to previous messageGo to next message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Vlad,

Thanks very much for your observations about this. We have known that
there are some problems with spaces in pathnames that occur in relation
to LPG, but it seems that your problems occurred when you were trying to
do something unrelated to LPG, so maybe the problem is more widespread
than we had thought. I will post an advisory message about this problem
and we will be looking into it (although most of the IMP team will be
away this coming week, so it may take a little time).

Regards,

Stan Sutton


Vlad D. wrote:
> "Vlad D." <vladdu55@gmail.com> wrote in message
> news:ffa7nj$pga$1@build.eclipse.org...
>> Oh, I see now that all IMP features have been installed outside of the
> main
>> Eclipse installation (I have some external product extension locations)
> and
>> maybe that's what makes it blow... (that path has spaces in it)
>
> Yes, that was it --- it seems something doesn't stand spaces in path
> names...
>
> best regards,
> Vlad
>
>
Re: Answers to questions on the IMP project [message #12381 is a reply to message #12333] Sun, 21 October 2007 15:52 Go to previous messageGo to next message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hello Hitesh,

From what you sent it does seem that the LPG builder is installed but
that it is not running.

Looking at what I can see in the Error Log image, I would guess that the
NullPointerException at the base of the log is the cause of the problem.
You should expand this item and see where the exception is occurring.

One consideration: In this thread Vlad D has reported a
NullPointerException that is due to the occurrence of a space in the
pathname to his Eclipse installation. He also has a problem where the
wizard page cannot be created (which I see too in your error log).
Maybe you have the same problem? Is there a space in the path name to
your Eclipse installation? (We should be able to handle that, but it
seems we may still have some work to do to get that right.)

You're welcome for the help!

Regards,

Stan


Hitesh Nembhwani wrote:
> 1)Stanley, thanks a lot for the mails and help.
> 2)No, i don't see any other Java classes other than what I had mentioned
> earlier. (*.AST is completely empty) I have attached the snap shot of my
> project exlporer, this should show you what files are generated in the
> packages. Alao, attached are the error log & problem views...
> 3)Yup, I can see "Enable LPG builder" menu item along with others...
> 4)I tried doing by even selecting the "Enable LPG builder" manually but
> still dont have any luck going my way :(
>
> Hitesh...
>
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff7qpn$tdu$1@build.eclipse.org...
>> Hello Hitesh,
>>
>> If the LPG Runtime feature is installed, then the LPG builder should be
>> available through that. If it were running successfully, there should
>> be another 8 or 9 Java classes in sample.imp.parser, and you should have
>> a set of AST classes in the *.AST package (and a few other classes). If
>> it were running unsuccessfully then you might see an exception stack
>> trace or error message on the console or you might get an error message
>> in the Error Log view. Do you see either of these things?
>>
>> Another thing to look at: If LPG is installed properly, and you right
>> click on the project Sample (or any other one, for that matter), you
>> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
>> installed properly, you should see some other "Enable *** Builder"
>> items, as well, such as "Enable X10 Builder.") If LPG is properly
>> installed then you should see the corresponding menu item. If you don't
>> then that's a problem.
>>
>> Of course, if the LPG builder is properly installed, it should be
>> running automatically and you should see the additional classes that I
>> mentioned above. I just tried this with the current IMP release on SF
>> and using your names of "Sample" and "sample" for the project and
>> language, and it worked for me. If you don't see the additional classes
>> but you do have the "Enable LPG Builder" menu item, then you could try
>> selecting that so as to manually enable the builder. That shouldn't be
>> necessary, but see if it has some effect.
>>
>> Regards,
>>
>> Stan Sutton
>>
>>
>> Hitesh Nembhwani wrote:
>>> Hi Stanley,
>>>
>>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>>
>>> I created a plug-in project named "Sample". When I used the option "New
>>> LPG
>>> Grammar with Parser Wrapper", two packages,
>>> (1) sample.imp.parser
>>> (2) sample.imp.parser.AST are created.
>>> Package 1 has following files:
>>> SampleASTNodeLocator.java
>>> SampleParseController.java
>>> SampleParser.java
>>> SampleKWLexer.gi
>>> SampleLexer.gi
>>> SampleLexer.l
>>> SampleParser.g
>>> SampleParser.l
>>>
>>> But package 2 is completely empty... (no classe/interfaces in it) and
>>> because of this I get errors in SampleASTNodeLocator &
>>> SampleParseController
>>> files saying "ASTNode cannot be resolved to a type".
>>> The SampleASTNodeLocator & SampleParseController files use "import
>>> sample.imp.parser.Ast.ASTNode"...
>>>
>>> Also, how do I check if LPG builder is running or not?
>>>
>>> Thanks,
>>> Hitesh...
>>>
>>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>>> news:ff34v5$ind$1@build.eclipse.org...
>>>> Hitesh Nembhwani wrote:
>>>>> Hi All,
>>>>>
>>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>>> through the steps given in
>>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>>> still few things aren't clear as:
>>>>>
>>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>>> "LPG" ->
>>>>> "New LPG Grammar with Parser Wrapper".
>>>>> Are these options the same thing?
>>>> Yes, these are the same thing. This is a case where the documentation
>>>> is
>>>> lagging behind our recent changes to other parts of the system. Thanks
>>>> for
>>>> pointing this out.
>>>>
>>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>>> generated in it) and due to this I get errors in other packages...
>>>> I can't say about this without more information. The LPG builder should
>>>> run automatically when you generate the grammar files using this wizard
>>>> (or later modify one of these files).
>>>>
>>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>>> installed? (This feature contains the LPG builder. Current version is
>>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>>> Java
>>>> classes generated in the parser package? (E.g., for a language "Lang",
>>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>>> and
>>>> parser-related classes). Do you see any exception traces in the console
>>>> window or get any error messages in the Error Log view?
>>>>
>>>>> Finally, I want to know in more clear terms how to test it after
>>>>> successful completion of all the steps? (I did not understand the same
>>>>> in
>>>>> user guide)
>>>> This is a good question--we need some documentation about this. You can
>>>> run through all of the steps (or a subset of them) and get a working IDE
>>>> for our example language without doing any other work. This is what we
>>>> do
>>>> when we give an IMP demo.
>>>>
>>>> The grammar templates that are generated by the "New LPG Grammar with
>>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>>> "leg")--anyway, that's what we call it (for "Little Expression
>>>> Grammar"),
>>>> although you can name it anything.
>>>>
>>>> The skeleton implementations that are generated for the other services
>>>> all
>>>> contain working example implementations that are based on the example
>>>> grammar. Each time you add a language service you should be able to
>>>> restart the IDE being developed and see that service working on programs
>>>> in the example language.
>>>>
>>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>>> runtime workbench starting from the development workspace in which you
>>>> are
>>>> building the IDE. The IDE should function automatically within the
>>>> level
>>>> 2 workspace when you are working on programs in your new language (just
>>>> as
>>>> the JDT operates automatically on Java programs).
>>>>
>>>> We recommend creating a Java project for developing programs in your new
>>>> language and seeing how your new IDE works. In the "src" folder of the
>>>> Java project, create a file in the new language. (I'll post an example
>>>> separately in this newsgroup.) In order to be recognized by the new
>>>> IDE,
>>>> source programs in the new language must be given the filename extension
>>>> that was specified in the "Programming language descriptor" wizard (we
>>>> use
>>>> "leg" for our example LEG-language extension). When you open a file
>>>> with
>>>> the appropriate filename extension, it should appear automatically in
>>>> the
>>>> editor of the new IDE. Depending on what other services have been
>>>> instantiated in the IDE, you may see an outline view, syntax
>>>> highlighting,
>>>> source folding, and so on.
>>>>
>>>> You don't have to follow the whole IDE development process to the end.
>>>> You
>>>> can rerun the IDE each time you add a new service. The IDE actually
>>>> becomes operational as soon as the parser is defined. If you run the
>>>> IDE
>>>> then, you should see little more than a basic Eclipse text editor, but
>>>> it
>>>> should already have integrated parsing--in other words, you should see
>>>> annotations for syntax errors. When we give the IMP demo, we then
>>>> usually
>>>> add syntax highlighting (token coloring), outlining, and source text
>>>> viewing, and rerun the IDE after that.
>>>>
>>>> This all works with the example LEG language and the example
>>>> implementations for the various services. We think this grammar and
>>>> these
>>>> service implementations are fairly typical, but each language and IDE
>>>> will
>>>> be different. You may be able to start developing your own language and
>>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>>> our
>>>> example code and write your own grammar and servie implementations from
>>>> scratch.
>>>>
>>>>> Thanks for your co-operation!
>>>>>
>>>>> Hitesh...
>>>> Thanks for the good questions!
>>>>
>>>> Stan Sutton
>>>
>
>
Re: Answers to questions on the IMP project [message #12409 is a reply to message #12381] Mon, 22 October 2007 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Yes, that was it for me too :)
The spaces in the path name was the problem! Its solved now.. Thanks Stan
and Vlad.

There's one more query. As per the IMP User Guide
( http://eclipse-imp.sourceforge.net/documentation/users_guide .html) for
creating a hyperlinking service, wizard
"File" -> "New" -> "IDE Language Support" -> "Editor Services" -> "Hyperlink
Detector" is to be used

and as per the Cheat sheets, wizard
"File" -> "New" -> "IDE Language Support" -> "Editor Services" -> "Reference
Resolver" is to be used

But we don't have either "Reference Resolver" or "Hyperlink Detector" under
"Editor Services".
Instead, we have "Reference Resolver" under "Core Services". So, what/where
is the substitute for "Hyperlink Detector"?

Hitesh...


"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:fffsk2$uql$1@build.eclipse.org...
> Hello Hitesh,
>
> From what you sent it does seem that the LPG builder is installed but that
> it is not running.
>
> Looking at what I can see in the Error Log image, I would guess that the
> NullPointerException at the base of the log is the cause of the problem.
> You should expand this item and see where the exception is occurring.
>
> One consideration: In this thread Vlad D has reported a
> NullPointerException that is due to the occurrence of a space in the
> pathname to his Eclipse installation. He also has a problem where the
> wizard page cannot be created (which I see too in your error log). Maybe
> you have the same problem? Is there a space in the path name to your
> Eclipse installation? (We should be able to handle that, but it seems we
> may still have some work to do to get that right.)
>
> You're welcome for the help!
>
> Regards,
>
> Stan
>
>
> Hitesh Nembhwani wrote:
>> 1)Stanley, thanks a lot for the mails and help.
>> 2)No, i don't see any other Java classes other than what I had mentioned
>> earlier. (*.AST is completely empty) I have attached the snap shot of my
>> project exlporer, this should show you what files are generated in the
>> packages. Alao, attached are the error log & problem views...
>> 3)Yup, I can see "Enable LPG builder" menu item along with others...
>> 4)I tried doing by even selecting the "Enable LPG builder" manually but
>> still dont have any luck going my way :(
>>
>> Hitesh...
>>
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff7qpn$tdu$1@build.eclipse.org...
>>> Hello Hitesh,
>>>
>>> If the LPG Runtime feature is installed, then the LPG builder should be
>>> available through that. If it were running successfully, there should
>>> be another 8 or 9 Java classes in sample.imp.parser, and you should have
>>> a set of AST classes in the *.AST package (and a few other classes). If
>>> it were running unsuccessfully then you might see an exception stack
>>> trace or error message on the console or you might get an error message
>>> in the Error Log view. Do you see either of these things?
>>>
>>> Another thing to look at: If LPG is installed properly, and you right
>>> click on the project Sample (or any other one, for that matter), you
>>> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
>>> installed properly, you should see some other "Enable *** Builder"
>>> items, as well, such as "Enable X10 Builder.") If LPG is properly
>>> installed then you should see the corresponding menu item. If you don't
>>> then that's a problem.
>>>
>>> Of course, if the LPG builder is properly installed, it should be
>>> running automatically and you should see the additional classes that I
>>> mentioned above. I just tried this with the current IMP release on SF
>>> and using your names of "Sample" and "sample" for the project and
>>> language, and it worked for me. If you don't see the additional classes
>>> but you do have the "Enable LPG Builder" menu item, then you could try
>>> selecting that so as to manually enable the builder. That shouldn't be
>>> necessary, but see if it has some effect.
>>>
>>> Regards,
>>>
>>> Stan Sutton
>>>
>>>
>>> Hitesh Nembhwani wrote:
>>>> Hi Stanley,
>>>>
>>>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>>>
>>>> I created a plug-in project named "Sample". When I used the option
>>>> "New LPG
>>>> Grammar with Parser Wrapper", two packages,
>>>> (1) sample.imp.parser
>>>> (2) sample.imp.parser.AST are created.
>>>> Package 1 has following files:
>>>> SampleASTNodeLocator.java
>>>> SampleParseController.java
>>>> SampleParser.java
>>>> SampleKWLexer.gi
>>>> SampleLexer.gi
>>>> SampleLexer.l
>>>> SampleParser.g
>>>> SampleParser.l
>>>>
>>>> But package 2 is completely empty... (no classe/interfaces in it) and
>>>> because of this I get errors in SampleASTNodeLocator &
>>>> SampleParseController
>>>> files saying "ASTNode cannot be resolved to a type".
>>>> The SampleASTNodeLocator & SampleParseController files use "import
>>>> sample.imp.parser.Ast.ASTNode"...
>>>>
>>>> Also, how do I check if LPG builder is running or not?
>>>>
>>>> Thanks,
>>>> Hitesh...
>>>>
>>>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>>>> news:ff34v5$ind$1@build.eclipse.org...
>>>>> Hitesh Nembhwani wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> I'm new to the news group as well as with the IMP project. I have
>>>>>> gone
>>>>>> through the steps given in
>>>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>>>> still few things aren't clear as:
>>>>>>
>>>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" ->
>>>>>> "Parser
>>>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>>>> "LPG" ->
>>>>>> "New LPG Grammar with Parser Wrapper".
>>>>>> Are these options the same thing?
>>>>> Yes, these are the same thing. This is a case where the documentation
>>>>> is
>>>>> lagging behind our recent changes to other parts of the system. Thanks
>>>>> for
>>>>> pointing this out.
>>>>>
>>>>>> 2)When I proceed further using the option "New LPG Grammar with
>>>>>> Parser
>>>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>>>> generated in it) and due to this I get errors in other packages...
>>>>> I can't say about this without more information. The LPG builder
>>>>> should
>>>>> run automatically when you generate the grammar files using this
>>>>> wizard
>>>>> (or later modify one of these files).
>>>>>
>>>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>>>> installed? (This feature contains the LPG builder. Current version
>>>>> is
>>>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>>>> Java
>>>>> classes generated in the parser package? (E.g., for a language
>>>>> "Lang",
>>>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>>>> and
>>>>> parser-related classes). Do you see any exception traces in the
>>>>> console
>>>>> window or get any error messages in the Error Log view?
>>>>>
>>>>>> Finally, I want to know in more clear terms how to test it after
>>>>>> successful completion of all the steps? (I did not understand the
>>>>>> same in
>>>>>> user guide)
>>>>> This is a good question--we need some documentation about this. You
>>>>> can
>>>>> run through all of the steps (or a subset of them) and get a working
>>>>> IDE
>>>>> for our example language without doing any other work. This is what
>>>>> we do
>>>>> when we give an IMP demo.
>>>>>
>>>>> The grammar templates that are generated by the "New LPG Grammar with
>>>>> Parser Wrapper" contain grammar rules for an example language, "LEG"
>>>>> (or
>>>>> "leg")--anyway, that's what we call it (for "Little Expression
>>>>> Grammar"),
>>>>> although you can name it anything.
>>>>>
>>>>> The skeleton implementations that are generated for the other services
>>>>> all
>>>>> contain working example implementations that are based on the example
>>>>> grammar. Each time you add a language service you should be able to
>>>>> restart the IDE being developed and see that service working on
>>>>> programs
>>>>> in the example language.
>>>>>
>>>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>>>> runtime workbench starting from the development workspace in which you
>>>>> are
>>>>> building the IDE. The IDE should function automatically within the
>>>>> level
>>>>> 2 workspace when you are working on programs in your new language
>>>>> (just as
>>>>> the JDT operates automatically on Java programs).
>>>>>
>>>>> We recommend creating a Java project for developing programs in your
>>>>> new
>>>>> language and seeing how your new IDE works. In the "src" folder of
>>>>> the
>>>>> Java project, create a file in the new language. (I'll post an
>>>>> example
>>>>> separately in this newsgroup.) In order to be recognized by the new
>>>>> IDE,
>>>>> source programs in the new language must be given the filename
>>>>> extension
>>>>> that was specified in the "Programming language descriptor" wizard (we
>>>>> use
>>>>> "leg" for our example LEG-language extension). When you open a file
>>>>> with
>>>>> the appropriate filename extension, it should appear automatically in
>>>>> the
>>>>> editor of the new IDE. Depending on what other services have been
>>>>> instantiated in the IDE, you may see an outline view, syntax
>>>>> highlighting,
>>>>> source folding, and so on.
>>>>>
>>>>> You don't have to follow the whole IDE development process to the end.
>>>>> You
>>>>> can rerun the IDE each time you add a new service. The IDE actually
>>>>> becomes operational as soon as the parser is defined. If you run the
>>>>> IDE
>>>>> then, you should see little more than a basic Eclipse text editor, but
>>>>> it
>>>>> should already have integrated parsing--in other words, you should see
>>>>> annotations for syntax errors. When we give the IMP demo, we then
>>>>> usually
>>>>> add syntax highlighting (token coloring), outlining, and source text
>>>>> viewing, and rerun the IDE after that.
>>>>>
>>>>> This all works with the example LEG language and the example
>>>>> implementations for the various services. We think this grammar and
>>>>> these
>>>>> service implementations are fairly typical, but each language and IDE
>>>>> will
>>>>> be different. You may be able to start developing your own language
>>>>> and
>>>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>>>> our
>>>>> example code and write your own grammar and servie implementations
>>>>> from
>>>>> scratch.
>>>>>
>>>>>> Thanks for your co-operation!
>>>>>>
>>>>>> Hitesh...
>>>>> Thanks for the good questions!
>>>>>
>>>>> Stan Sutton
>>>>
>>
Re: Answers to questions on the IMP project [message #12421 is a reply to message #9984] Mon, 22 October 2007 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Stan.

Just a reminder to post the example which you were supposed to! (demo for
working IDE)
Thanks,
Hitesh..

"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff34v5$ind$1@build.eclipse.org...
> Hitesh Nembhwani wrote:
>> Hi All,
>>
>> I'm new to the news group as well as with the IMP project. I have gone
>> through the steps given in
>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>> still few things aren't clear as:
>>
>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>> Services" -> "LPG Grammar and Parser for UIDE"
>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>> "New LPG Grammar with Parser Wrapper".
>> Are these options the same thing?
>
> Yes, these are the same thing. This is a case where the documentation is
> lagging behind our recent changes to other parts of the system. Thanks for
> pointing this out.
>
>> 2)When I proceed further using the option "New LPG Grammar with Parser
>> Wrapper", the package of AST remains empty (no classes/interfaces are
>> generated in it) and due to this I get errors in other packages...
>
> I can't say about this without more information. The LPG builder should
> run automatically when you generate the grammar files using this wizard
> (or later modify one of these files).
>
> Are you running in a level 1 workspace? Is the LPG Runtime feature
> installed? (This feature contains the LPG builder. Current version is
> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
> classes generated in the parser package? (E.g., for a language "Lang",
> there should be "LangLexer.java", "LangParser.java", and other lexer- and
> parser-related classes). Do you see any exception traces in the console
> window or get any error messages in the Error Log view?
>
>> Finally, I want to know in more clear terms how to test it after
>> successful completion of all the steps? (I did not understand the same in
>> user guide)
>
> This is a good question--we need some documentation about this. You can
> run through all of the steps (or a subset of them) and get a working IDE
> for our example language without doing any other work. This is what we do
> when we give an IMP demo.
>
> The grammar templates that are generated by the "New LPG Grammar with
> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
> although you can name it anything.
>
> The skeleton implementations that are generated for the other services all
> contain working example implementations that are based on the example
> grammar. Each time you add a language service you should be able to
> restart the IDE being developed and see that service working on programs
> in the example language.
>
> To run your new IDE, you need to run a level 2 workspace, that is, a
> runtime workbench starting from the development workspace in which you are
> building the IDE. The IDE should function automatically within the level
> 2 workspace when you are working on programs in your new language (just as
> the JDT operates automatically on Java programs).
>
> We recommend creating a Java project for developing programs in your new
> language and seeing how your new IDE works. In the "src" folder of the
> Java project, create a file in the new language. (I'll post an example
> separately in this newsgroup.) In order to be recognized by the new IDE,
> source programs in the new language must be given the filename extension
> that was specified in the "Programming language descriptor" wizard (we use
> "leg" for our example LEG-language extension). When you open a file with
> the appropriate filename extension, it should appear automatically in the
> editor of the new IDE. Depending on what other services have been
> instantiated in the IDE, you may see an outline view, syntax highlighting,
> source folding, and so on.
>
> You don't have to follow the whole IDE development process to the end. You
> can rerun the IDE each time you add a new service. The IDE actually
> becomes operational as soon as the parser is defined. If you run the IDE
> then, you should see little more than a basic Eclipse text editor, but it
> should already have integrated parsing--in other words, you should see
> annotations for syntax errors. When we give the IMP demo, we then usually
> add syntax highlighting (token coloring), outlining, and source text
> viewing, and rerun the IDE after that.
>
> This all works with the example LEG language and the example
> implementations for the various services. We think this grammar and these
> service implementations are fairly typical, but each language and IDE will
> be different. You may be able to start developing your own language and
> IDE by adapting the IMP LEG examples, or you may want to remove all of our
> example code and write your own grammar and servie implementations from
> scratch.
>
>> Thanks for your co-operation!
>>
>> Hitesh...
>
> Thanks for the good questions!
>
> Stan Sutton
Re: Answers to questions on the IMP project [message #12439 is a reply to message #12421] Mon, 22 October 2007 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Please, make it ASAP. I need it urgently...
Many Thanx!
Hitesh...
"Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
news:ffhjio$1op$1@build.eclipse.org...
> Stan.
>
> Just a reminder to post the example which you were supposed to! (demo for
> working IDE)
> Thanks,
> Hitesh..
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff34v5$ind$1@build.eclipse.org...
>> Hitesh Nembhwani wrote:
>>> Hi All,
>>>
>>> I'm new to the news group as well as with the IMP project. I have gone
>>> through the steps given in
>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>> still few things aren't clear as:
>>>
>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>> Services" -> "LPG Grammar and Parser for UIDE"
>>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>>> "New LPG Grammar with Parser Wrapper".
>>> Are these options the same thing?
>>
>> Yes, these are the same thing. This is a case where the documentation is
>> lagging behind our recent changes to other parts of the system. Thanks
>> for pointing this out.
>>
>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>> generated in it) and due to this I get errors in other packages...
>>
>> I can't say about this without more information. The LPG builder should
>> run automatically when you generate the grammar files using this wizard
>> (or later modify one of these files).
>>
>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>> installed? (This feature contains the LPG builder. Current version is
>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>> Java classes generated in the parser package? (E.g., for a language
>> "Lang", there should be "LangLexer.java", "LangParser.java", and other
>> lexer- and parser-related classes). Do you see any exception traces in
>> the console window or get any error messages in the Error Log view?
>>
>>> Finally, I want to know in more clear terms how to test it after
>>> successful completion of all the steps? (I did not understand the same
>>> in user guide)
>>
>> This is a good question--we need some documentation about this. You can
>> run through all of the steps (or a subset of them) and get a working IDE
>> for our example language without doing any other work. This is what we
>> do when we give an IMP demo.
>>
>> The grammar templates that are generated by the "New LPG Grammar with
>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
>> although you can name it anything.
>>
>> The skeleton implementations that are generated for the other services
>> all contain working example implementations that are based on the example
>> grammar. Each time you add a language service you should be able to
>> restart the IDE being developed and see that service working on programs
>> in the example language.
>>
>> To run your new IDE, you need to run a level 2 workspace, that is, a
>> runtime workbench starting from the development workspace in which you
>> are building the IDE. The IDE should function automatically within the
>> level 2 workspace when you are working on programs in your new language
>> (just as the JDT operates automatically on Java programs).
>>
>> We recommend creating a Java project for developing programs in your new
>> language and seeing how your new IDE works. In the "src" folder of the
>> Java project, create a file in the new language. (I'll post an example
>> separately in this newsgroup.) In order to be recognized by the new IDE,
>> source programs in the new language must be given the filename extension
>> that was specified in the "Programming language descriptor" wizard (we
>> use "leg" for our example LEG-language extension). When you open a file
>> with the appropriate filename extension, it should appear automatically
>> in the editor of the new IDE. Depending on what other services have been
>> instantiated in the IDE, you may see an outline view, syntax
>> highlighting, source folding, and so on.
>>
>> You don't have to follow the whole IDE development process to the end.
>> You can rerun the IDE each time you add a new service. The IDE actually
>> becomes operational as soon as the parser is defined. If you run the IDE
>> then, you should see little more than a basic Eclipse text editor, but it
>> should already have integrated parsing--in other words, you should see
>> annotations for syntax errors. When we give the IMP demo, we then
>> usually add syntax highlighting (token coloring), outlining, and source
>> text viewing, and rerun the IDE after that.
>>
>> This all works with the example LEG language and the example
>> implementations for the various services. We think this grammar and
>> these service implementations are fairly typical, but each language and
>> IDE will be different. You may be able to start developing your own
>> language and IDE by adapting the IMP LEG examples, or you may want to
>> remove all of our example code and write your own grammar and servie
>> implementations from scratch.
>>
>>> Thanks for your co-operation!
>>>
>>> Hitesh...
>>
>> Thanks for the good questions!
>>
>> Stan Sutton
>
>
Re: Answers to questions on the IMP project [message #14382 is a reply to message #12439] Mon, 22 October 2007 13:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Finally Done!!! :)
"Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
news:ffi94c$4k1$1@build.eclipse.org...
> Please, make it ASAP. I need it urgently...
> Many Thanx!
> Hitesh...
> "Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
> news:ffhjio$1op$1@build.eclipse.org...
>> Stan.
>>
>> Just a reminder to post the example which you were supposed to! (demo for
>> working IDE)
>> Thanks,
>> Hitesh..
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff34v5$ind$1@build.eclipse.org...
>>> Hitesh Nembhwani wrote:
>>>> Hi All,
>>>>
>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>> through the steps given in
>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>> still few things aren't clear as:
>>>>
>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>> "LPG" -> "New LPG Grammar with Parser Wrapper".
>>>> Are these options the same thing?
>>>
>>> Yes, these are the same thing. This is a case where the documentation
>>> is lagging behind our recent changes to other parts of the system.
>>> Thanks for pointing this out.
>>>
>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>> generated in it) and due to this I get errors in other packages...
>>>
>>> I can't say about this without more information. The LPG builder should
>>> run automatically when you generate the grammar files using this wizard
>>> (or later modify one of these files).
>>>
>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>> installed? (This feature contains the LPG builder. Current version is
>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>> Java classes generated in the parser package? (E.g., for a language
>>> "Lang", there should be "LangLexer.java", "LangParser.java", and other
>>> lexer- and parser-related classes). Do you see any exception traces in
>>> the console window or get any error messages in the Error Log view?
>>>
>>>> Finally, I want to know in more clear terms how to test it after
>>>> successful completion of all the steps? (I did not understand the same
>>>> in user guide)
>>>
>>> This is a good question--we need some documentation about this. You can
>>> run through all of the steps (or a subset of them) and get a working IDE
>>> for our example language without doing any other work. This is what we
>>> do when we give an IMP demo.
>>>
>>> The grammar templates that are generated by the "New LPG Grammar with
>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>> "leg")--anyway, that's what we call it (for "Little Expression
>>> Grammar"), although you can name it anything.
>>>
>>> The skeleton implementations that are generated for the other services
>>> all contain working example implementations that are based on the
>>> example grammar. Each time you add a language service you should be
>>> able to restart the IDE being developed and see that service working on
>>> programs in the example language.
>>>
>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>> runtime workbench starting from the development workspace in which you
>>> are building the IDE. The IDE should function automatically within the
>>> level 2 workspace when you are working on programs in your new language
>>> (just as the JDT operates automatically on Java programs).
>>>
>>> We recommend creating a Java project for developing programs in your new
>>> language and seeing how your new IDE works. In the "src" folder of the
>>> Java project, create a file in the new language. (I'll post an example
>>> separately in this newsgroup.) In order to be recognized by the new
>>> IDE, source programs in the new language must be given the filename
>>> extension that was specified in the "Programming language descriptor"
>>> wizard (we use "leg" for our example LEG-language extension). When you
>>> open a file with the appropriate filename extension, it should appear
>>> automatically in the editor of the new IDE. Depending on what other
>>> services have been instantiated in the IDE, you may see an outline view,
>>> syntax highlighting, source folding, and so on.
>>>
>>> You don't have to follow the whole IDE development process to the end.
>>> You can rerun the IDE each time you add a new service. The IDE actually
>>> becomes operational as soon as the parser is defined. If you run the
>>> IDE then, you should see little more than a basic Eclipse text editor,
>>> but it should already have integrated parsing--in other words, you
>>> should see annotations for syntax errors. When we give the IMP demo, we
>>> then usually add syntax highlighting (token coloring), outlining, and
>>> source text viewing, and rerun the IDE after that.
>>>
>>> This all works with the example LEG language and the example
>>> implementations for the various services. We think this grammar and
>>> these service implementations are fairly typical, but each language and
>>> IDE will be different. You may be able to start developing your own
>>> language and IDE by adapting the IMP LEG examples, or you may want to
>>> remove all of our example code and write your own grammar and servie
>>> implementations from scratch.
>>>
>>>> Thanks for your co-operation!
>>>>
>>>> Hitesh...
>>>
>>> Thanks for the good questions!
>>>
>>> Stan Sutton
>>
>>
>
>
Re: Answers to questions on the IMP project [message #14440 is a reply to message #14382] Tue, 23 October 2007 02:21 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hi Hitesh,

I hope you got things worked out. I have posted a top-level message
with more information about examples. I apologize that it took some
time to get this additional information up, but I'm out of the office
this week with duties unrelated to IMP.

Good luck!

Stan Sutton
Answers to questions on the IMP project [message #567358 is a reply to message #9937] Tue, 16 October 2007 19:55 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hitesh Nembhwani wrote:
> Hi All,
>
> I'm new to the news group as well as with the IMP project. I have gone
> through the steps given in
> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but still
> few things aren't clear as:
>
> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
> Services" -> "LPG Grammar and Parser for UIDE"
> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
> "New LPG Grammar with Parser Wrapper".
> Are these options the same thing?

Yes, these are the same thing. This is a case where the documentation
is lagging behind our recent changes to other parts of the system.
Thanks for pointing this out.

> 2)When I proceed further using the option "New LPG Grammar with Parser
> Wrapper", the package of AST remains empty (no classes/interfaces are
> generated in it) and due to this I get errors in other packages...

I can't say about this without more information. The LPG builder should
run automatically when you generate the grammar files using this wizard
(or later modify one of these files).

Are you running in a level 1 workspace? Is the LPG Runtime feature
installed? (This feature contains the LPG builder. Current version is
2.0.6, I believe.) Is the LPG builder running at all? Are there new
Java classes generated in the parser package? (E.g., for a language
"Lang", there should be "LangLexer.java", "LangParser.java", and other
lexer- and parser-related classes). Do you see any exception traces in
the console window or get any error messages in the Error Log view?

> Finally, I want to know in more clear terms how to test it after successful
> completion of all the steps? (I did not understand the same in user guide)

This is a good question--we need some documentation about this. You can
run through all of the steps (or a subset of them) and get a working IDE
for our example language without doing any other work. This is what we
do when we give an IMP demo.

The grammar templates that are generated by the "New LPG Grammar with
Parser Wrapper" contain grammar rules for an example language, "LEG" (or
"leg")--anyway, that's what we call it (for "Little Expression
Grammar"), although you can name it anything.

The skeleton implementations that are generated for the other services
all contain working example implementations that are based on the
example grammar. Each time you add a language service you should be
able to restart the IDE being developed and see that service working on
programs in the example language.

To run your new IDE, you need to run a level 2 workspace, that is, a
runtime workbench starting from the development workspace in which you
are building the IDE. The IDE should function automatically within the
level 2 workspace when you are working on programs in your new language
(just as the JDT operates automatically on Java programs).

We recommend creating a Java project for developing programs in your new
language and seeing how your new IDE works. In the "src" folder of the
Java project, create a file in the new language. (I'll post an example
separately in this newsgroup.) In order to be recognized by the new
IDE, source programs in the new language must be given the filename
extension that was specified in the "Programming language descriptor"
wizard (we use "leg" for our example LEG-language extension). When you
open a file with the appropriate filename extension, it should appear
automatically in the editor of the new IDE. Depending on what other
services have been instantiated in the IDE, you may see an outline view,
syntax highlighting, source folding, and so on.

You don't have to follow the whole IDE development process to the end.
You can rerun the IDE each time you add a new service. The IDE actually
becomes operational as soon as the parser is defined. If you run the
IDE then, you should see little more than a basic Eclipse text editor,
but it should already have integrated parsing--in other words, you
should see annotations for syntax errors. When we give the IMP demo, we
then usually add syntax highlighting (token coloring), outlining, and
source text viewing, and rerun the IDE after that.

This all works with the example LEG language and the example
implementations for the various services. We think this grammar and
these service implementations are fairly typical, but each language and
IDE will be different. You may be able to start developing your own
language and IDE by adapting the IMP LEG examples, or you may want to
remove all of our example code and write your own grammar and servie
implementations from scratch.

> Thanks for your co-operation!
>
> Hitesh...
>
>

Thanks for the good questions!

Stan Sutton
Re: Answers to questions on the IMP project [message #567609 is a reply to message #9984] Wed, 17 October 2007 18:10 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Hi Stanley,

Yes, LPG Runtime feature is installed, version 2.0.8.

I created a plug-in project named "Sample". When I used the option "New LPG
Grammar with Parser Wrapper", two packages,
(1) sample.imp.parser
(2) sample.imp.parser.AST are created.
Package 1 has following files:
SampleASTNodeLocator.java
SampleParseController.java
SampleParser.java
SampleKWLexer.gi
SampleLexer.gi
SampleLexer.l
SampleParser.g
SampleParser.l

But package 2 is completely empty... (no classe/interfaces in it) and
because of this I get errors in SampleASTNodeLocator & SampleParseController
files saying "ASTNode cannot be resolved to a type".
The SampleASTNodeLocator & SampleParseController files use "import
sample.imp.parser.Ast.ASTNode"...

Also, how do I check if LPG builder is running or not?

Thanks,
Hitesh...

"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff34v5$ind$1@build.eclipse.org...
> Hitesh Nembhwani wrote:
>> Hi All,
>>
>> I'm new to the news group as well as with the IMP project. I have gone
>> through the steps given in
>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>> still few things aren't clear as:
>>
>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>> Services" -> "LPG Grammar and Parser for UIDE"
>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>> "New LPG Grammar with Parser Wrapper".
>> Are these options the same thing?
>
> Yes, these are the same thing. This is a case where the documentation is
> lagging behind our recent changes to other parts of the system. Thanks for
> pointing this out.
>
>> 2)When I proceed further using the option "New LPG Grammar with Parser
>> Wrapper", the package of AST remains empty (no classes/interfaces are
>> generated in it) and due to this I get errors in other packages...
>
> I can't say about this without more information. The LPG builder should
> run automatically when you generate the grammar files using this wizard
> (or later modify one of these files).
>
> Are you running in a level 1 workspace? Is the LPG Runtime feature
> installed? (This feature contains the LPG builder. Current version is
> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
> classes generated in the parser package? (E.g., for a language "Lang",
> there should be "LangLexer.java", "LangParser.java", and other lexer- and
> parser-related classes). Do you see any exception traces in the console
> window or get any error messages in the Error Log view?
>
>> Finally, I want to know in more clear terms how to test it after
>> successful completion of all the steps? (I did not understand the same in
>> user guide)
>
> This is a good question--we need some documentation about this. You can
> run through all of the steps (or a subset of them) and get a working IDE
> for our example language without doing any other work. This is what we do
> when we give an IMP demo.
>
> The grammar templates that are generated by the "New LPG Grammar with
> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
> although you can name it anything.
>
> The skeleton implementations that are generated for the other services all
> contain working example implementations that are based on the example
> grammar. Each time you add a language service you should be able to
> restart the IDE being developed and see that service working on programs
> in the example language.
>
> To run your new IDE, you need to run a level 2 workspace, that is, a
> runtime workbench starting from the development workspace in which you are
> building the IDE. The IDE should function automatically within the level
> 2 workspace when you are working on programs in your new language (just as
> the JDT operates automatically on Java programs).
>
> We recommend creating a Java project for developing programs in your new
> language and seeing how your new IDE works. In the "src" folder of the
> Java project, create a file in the new language. (I'll post an example
> separately in this newsgroup.) In order to be recognized by the new IDE,
> source programs in the new language must be given the filename extension
> that was specified in the "Programming language descriptor" wizard (we use
> "leg" for our example LEG-language extension). When you open a file with
> the appropriate filename extension, it should appear automatically in the
> editor of the new IDE. Depending on what other services have been
> instantiated in the IDE, you may see an outline view, syntax highlighting,
> source folding, and so on.
>
> You don't have to follow the whole IDE development process to the end. You
> can rerun the IDE each time you add a new service. The IDE actually
> becomes operational as soon as the parser is defined. If you run the IDE
> then, you should see little more than a basic Eclipse text editor, but it
> should already have integrated parsing--in other words, you should see
> annotations for syntax errors. When we give the IMP demo, we then usually
> add syntax highlighting (token coloring), outlining, and source text
> viewing, and rerun the IDE after that.
>
> This all works with the example LEG language and the example
> implementations for the various services. We think this grammar and these
> service implementations are fairly typical, but each language and IDE will
> be different. You may be able to start developing your own language and
> IDE by adapting the IMP LEG examples, or you may want to remove all of our
> example code and write your own grammar and servie implementations from
> scratch.
>
>> Thanks for your co-operation!
>>
>> Hitesh...
>
> Thanks for the good questions!
>
> Stan Sutton
Re: Answers to questions on the IMP project [message #567745 is a reply to message #12251] Thu, 18 October 2007 14:32 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hello Hitesh,

If the LPG Runtime feature is installed, then the LPG builder should be
available through that. If it were running successfully, there should
be another 8 or 9 Java classes in sample.imp.parser, and you should have
a set of AST classes in the *.AST package (and a few other classes). If
it were running unsuccessfully then you might see an exception stack
trace or error message on the console or you might get an error message
in the Error Log view. Do you see either of these things?

Another thing to look at: If LPG is installed properly, and you right
click on the project Sample (or any other one, for that matter), you
should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
installed properly, you should see some other "Enable *** Builder"
items, as well, such as "Enable X10 Builder.") If LPG is properly
installed then you should see the corresponding menu item. If you don't
then that's a problem.

Of course, if the LPG builder is properly installed, it should be
running automatically and you should see the additional classes that I
mentioned above. I just tried this with the current IMP release on SF
and using your names of "Sample" and "sample" for the project and
language, and it worked for me. If you don't see the additional classes
but you do have the "Enable LPG Builder" menu item, then you could try
selecting that so as to manually enable the builder. That shouldn't be
necessary, but see if it has some effect.

Regards,

Stan Sutton


Hitesh Nembhwani wrote:
> Hi Stanley,
>
> Yes, LPG Runtime feature is installed, version 2.0.8.
>
> I created a plug-in project named "Sample". When I used the option "New LPG
> Grammar with Parser Wrapper", two packages,
> (1) sample.imp.parser
> (2) sample.imp.parser.AST are created.
> Package 1 has following files:
> SampleASTNodeLocator.java
> SampleParseController.java
> SampleParser.java
> SampleKWLexer.gi
> SampleLexer.gi
> SampleLexer.l
> SampleParser.g
> SampleParser.l
>
> But package 2 is completely empty... (no classe/interfaces in it) and
> because of this I get errors in SampleASTNodeLocator & SampleParseController
> files saying "ASTNode cannot be resolved to a type".
> The SampleASTNodeLocator & SampleParseController files use "import
> sample.imp.parser.Ast.ASTNode"...
>
> Also, how do I check if LPG builder is running or not?
>
> Thanks,
> Hitesh...
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff34v5$ind$1@build.eclipse.org...
>> Hitesh Nembhwani wrote:
>>> Hi All,
>>>
>>> I'm new to the news group as well as with the IMP project. I have gone
>>> through the steps given in
>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>> still few things aren't clear as:
>>>
>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>> Services" -> "LPG Grammar and Parser for UIDE"
>>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>>> "New LPG Grammar with Parser Wrapper".
>>> Are these options the same thing?
>> Yes, these are the same thing. This is a case where the documentation is
>> lagging behind our recent changes to other parts of the system. Thanks for
>> pointing this out.
>>
>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>> generated in it) and due to this I get errors in other packages...
>> I can't say about this without more information. The LPG builder should
>> run automatically when you generate the grammar files using this wizard
>> (or later modify one of these files).
>>
>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>> installed? (This feature contains the LPG builder. Current version is
>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
>> classes generated in the parser package? (E.g., for a language "Lang",
>> there should be "LangLexer.java", "LangParser.java", and other lexer- and
>> parser-related classes). Do you see any exception traces in the console
>> window or get any error messages in the Error Log view?
>>
>>> Finally, I want to know in more clear terms how to test it after
>>> successful completion of all the steps? (I did not understand the same in
>>> user guide)
>> This is a good question--we need some documentation about this. You can
>> run through all of the steps (or a subset of them) and get a working IDE
>> for our example language without doing any other work. This is what we do
>> when we give an IMP demo.
>>
>> The grammar templates that are generated by the "New LPG Grammar with
>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
>> although you can name it anything.
>>
>> The skeleton implementations that are generated for the other services all
>> contain working example implementations that are based on the example
>> grammar. Each time you add a language service you should be able to
>> restart the IDE being developed and see that service working on programs
>> in the example language.
>>
>> To run your new IDE, you need to run a level 2 workspace, that is, a
>> runtime workbench starting from the development workspace in which you are
>> building the IDE. The IDE should function automatically within the level
>> 2 workspace when you are working on programs in your new language (just as
>> the JDT operates automatically on Java programs).
>>
>> We recommend creating a Java project for developing programs in your new
>> language and seeing how your new IDE works. In the "src" folder of the
>> Java project, create a file in the new language. (I'll post an example
>> separately in this newsgroup.) In order to be recognized by the new IDE,
>> source programs in the new language must be given the filename extension
>> that was specified in the "Programming language descriptor" wizard (we use
>> "leg" for our example LEG-language extension). When you open a file with
>> the appropriate filename extension, it should appear automatically in the
>> editor of the new IDE. Depending on what other services have been
>> instantiated in the IDE, you may see an outline view, syntax highlighting,
>> source folding, and so on.
>>
>> You don't have to follow the whole IDE development process to the end. You
>> can rerun the IDE each time you add a new service. The IDE actually
>> becomes operational as soon as the parser is defined. If you run the IDE
>> then, you should see little more than a basic Eclipse text editor, but it
>> should already have integrated parsing--in other words, you should see
>> annotations for syntax errors. When we give the IMP demo, we then usually
>> add syntax highlighting (token coloring), outlining, and source text
>> viewing, and rerun the IDE after that.
>>
>> This all works with the example LEG language and the example
>> implementations for the various services. We think this grammar and these
>> service implementations are fairly typical, but each language and IDE will
>> be different. You may be able to start developing your own language and
>> IDE by adapting the IMP LEG examples, or you may want to remove all of our
>> example code and write your own grammar and servie implementations from
>> scratch.
>>
>>> Thanks for your co-operation!
>>>
>>> Hitesh...
>> Thanks for the good questions!
>>
>> Stan Sutton
>
>
Re: Answers to questions on the IMP project [message #567799 is a reply to message #12284] Fri, 19 October 2007 12:18 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hello!

> Hitesh Nembhwani wrote:
> > I created a plug-in project named "Sample". When I used the option "New
LPG
> > Grammar with Parser Wrapper", two packages,
> > (1) sample.imp.parser
> > (2) sample.imp.parser.AST are created.
> > Package 1 has following files:
> > SampleASTNodeLocator.java
> > SampleParseController.java
> > SampleParser.java
> > SampleKWLexer.gi
> > SampleLexer.gi
> > SampleLexer.l
> > SampleParser.g
> > SampleParser.l
> >
> > But package 2 is completely empty... (no classe/interfaces in it) and
> > because of this I get errors in SampleASTNodeLocator &
SampleParseController
> > files saying "ASTNode cannot be resolved to a type".
> > The SampleASTNodeLocator & SampleParseController files use "import
> > sample.imp.parser.Ast.ASTNode"...

I have the same problem. It may be of help to notice that sometimes the
exception below appears in the console. In the wizard, the fields at the
bottom are disabled and there's a message "can't create wizard page".

best regards,
Vlad


!ENTRY org.eclipse.imp.runtime 4 0 2007-10-19 14:06:13.687
!MESSAGE Could not create wizard page
!STACK 0
java.lang.NullPointerException
at
org.eclipse.imp.wizards.ExtensionPointEnabler.loadImpExtensi onsModel(Extensi
onPointEnabler.java:506)
at
org.eclipse.imp.wizards.IMPWizardPage.discoverProjectLanguag e(IMPWizardPage.
java:240)
at
org.eclipse.imp.wizards.ExtensionPointWizardPage.createContr ol(ExtensionPoin
tWizardPage.java:407)
at
org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:180)
at
org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:6
14)
at
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:502)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at
org.eclipse.ui.internal.actions.NewWizardShortcutAction.run( NewWizardShortcu
tAction.java:102)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
tionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(
EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAp
pLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: Answers to questions on the IMP project [message #567827 is a reply to message #12306] Fri, 19 October 2007 12:25 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Oh, I see now that all IMP features have been installed outside of the main
Eclipse installation (I have some external product extension locations) and
maybe that's what makes it blow... (that path has spaces in it)

I'll be back with details.

regards,
Vlad

"Vlad D." <vladdu55@gmail.com> wrote in message
news:ffa7ad$nl5$1@build.eclipse.org...
> Hello!
>
> > Hitesh Nembhwani wrote:
> > > I created a plug-in project named "Sample". When I used the option
"New
> LPG
> > > Grammar with Parser Wrapper", two packages,
> > > (1) sample.imp.parser
> > > (2) sample.imp.parser.AST are created.
> > > Package 1 has following files:
> > > SampleASTNodeLocator.java
> > > SampleParseController.java
> > > SampleParser.java
> > > SampleKWLexer.gi
> > > SampleLexer.gi
> > > SampleLexer.l
> > > SampleParser.g
> > > SampleParser.l
> > >
> > > But package 2 is completely empty... (no classe/interfaces in it) and
> > > because of this I get errors in SampleASTNodeLocator &
> SampleParseController
> > > files saying "ASTNode cannot be resolved to a type".
> > > The SampleASTNodeLocator & SampleParseController files use "import
> > > sample.imp.parser.Ast.ASTNode"...
>
> I have the same problem. It may be of help to notice that sometimes the
> exception below appears in the console. In the wizard, the fields at the
> bottom are disabled and there's a message "can't create wizard page".
>
> best regards,
> Vlad
>
>
> !ENTRY org.eclipse.imp.runtime 4 0 2007-10-19 14:06:13.687
> !MESSAGE Could not create wizard page
> !STACK 0
> java.lang.NullPointerException
> at
>
org.eclipse.imp.wizards.ExtensionPointEnabler.loadImpExtensi onsModel(Extensi
> onPointEnabler.java:506)
> at
>
org.eclipse.imp.wizards.IMPWizardPage.discoverProjectLanguag e(IMPWizardPage.
> java:240)
> at
>
org.eclipse.imp.wizards.ExtensionPointWizardPage.createContr ol(ExtensionPoin
> tWizardPage.java:407)
> at
> org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:180)
> at
>
org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:6
> 14)
> at
>
org.eclipse.jface.wizard.WizardDialog.createContents(WizardD ialog.java:502)
> at org.eclipse.jface.window.Window.create(Window.java:426)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
> at
>
org.eclipse.ui.internal.actions.NewWizardShortcutAction.run( NewWizardShortcu
> tAction.java:102)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:539)
> at
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:488)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
> tionItem.java:400)
> at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:78)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(
> EclipseAppLauncher.java:92)
> at
>
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAp
> pLauncher.java:68)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
Re: Answers to questions on the IMP project [message #567862 is a reply to message #12284] Fri, 19 October 2007 12:44 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

1)Stanley, thanks a lot for the mails and help.
2)No, i don't see any other Java classes other than what I had mentioned
earlier. (*.AST is completely empty) I have attached the snap shot of my
project exlporer, this should show you what files are generated in the
packages. Alao, attached are the error log & problem views...
3)Yup, I can see "Enable LPG builder" menu item along with others...
4)I tried doing by even selecting the "Enable LPG builder" manually but
still dont have any luck going my way :(

Hitesh...


"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff7qpn$tdu$1@build.eclipse.org...
> Hello Hitesh,
>
> If the LPG Runtime feature is installed, then the LPG builder should be
> available through that. If it were running successfully, there should
> be another 8 or 9 Java classes in sample.imp.parser, and you should have
> a set of AST classes in the *.AST package (and a few other classes). If
> it were running unsuccessfully then you might see an exception stack
> trace or error message on the console or you might get an error message
> in the Error Log view. Do you see either of these things?
>
> Another thing to look at: If LPG is installed properly, and you right
> click on the project Sample (or any other one, for that matter), you
> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
> installed properly, you should see some other "Enable *** Builder"
> items, as well, such as "Enable X10 Builder.") If LPG is properly
> installed then you should see the corresponding menu item. If you don't
> then that's a problem.
>
> Of course, if the LPG builder is properly installed, it should be
> running automatically and you should see the additional classes that I
> mentioned above. I just tried this with the current IMP release on SF
> and using your names of "Sample" and "sample" for the project and
> language, and it worked for me. If you don't see the additional classes
> but you do have the "Enable LPG Builder" menu item, then you could try
> selecting that so as to manually enable the builder. That shouldn't be
> necessary, but see if it has some effect.
>
> Regards,
>
> Stan Sutton
>
>
> Hitesh Nembhwani wrote:
>> Hi Stanley,
>>
>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>
>> I created a plug-in project named "Sample". When I used the option "New
>> LPG
>> Grammar with Parser Wrapper", two packages,
>> (1) sample.imp.parser
>> (2) sample.imp.parser.AST are created.
>> Package 1 has following files:
>> SampleASTNodeLocator.java
>> SampleParseController.java
>> SampleParser.java
>> SampleKWLexer.gi
>> SampleLexer.gi
>> SampleLexer.l
>> SampleParser.g
>> SampleParser.l
>>
>> But package 2 is completely empty... (no classe/interfaces in it) and
>> because of this I get errors in SampleASTNodeLocator &
>> SampleParseController
>> files saying "ASTNode cannot be resolved to a type".
>> The SampleASTNodeLocator & SampleParseController files use "import
>> sample.imp.parser.Ast.ASTNode"...
>>
>> Also, how do I check if LPG builder is running or not?
>>
>> Thanks,
>> Hitesh...
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff34v5$ind$1@build.eclipse.org...
>>> Hitesh Nembhwani wrote:
>>>> Hi All,
>>>>
>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>> through the steps given in
>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>> still few things aren't clear as:
>>>>
>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>> "LPG" ->
>>>> "New LPG Grammar with Parser Wrapper".
>>>> Are these options the same thing?
>>> Yes, these are the same thing. This is a case where the documentation
>>> is
>>> lagging behind our recent changes to other parts of the system. Thanks
>>> for
>>> pointing this out.
>>>
>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>> generated in it) and due to this I get errors in other packages...
>>> I can't say about this without more information. The LPG builder should
>>> run automatically when you generate the grammar files using this wizard
>>> (or later modify one of these files).
>>>
>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>> installed? (This feature contains the LPG builder. Current version is
>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>> Java
>>> classes generated in the parser package? (E.g., for a language "Lang",
>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>> and
>>> parser-related classes). Do you see any exception traces in the console
>>> window or get any error messages in the Error Log view?
>>>
>>>> Finally, I want to know in more clear terms how to test it after
>>>> successful completion of all the steps? (I did not understand the same
>>>> in
>>>> user guide)
>>> This is a good question--we need some documentation about this. You can
>>> run through all of the steps (or a subset of them) and get a working IDE
>>> for our example language without doing any other work. This is what we
>>> do
>>> when we give an IMP demo.
>>>
>>> The grammar templates that are generated by the "New LPG Grammar with
>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>> "leg")--anyway, that's what we call it (for "Little Expression
>>> Grammar"),
>>> although you can name it anything.
>>>
>>> The skeleton implementations that are generated for the other services
>>> all
>>> contain working example implementations that are based on the example
>>> grammar. Each time you add a language service you should be able to
>>> restart the IDE being developed and see that service working on programs
>>> in the example language.
>>>
>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>> runtime workbench starting from the development workspace in which you
>>> are
>>> building the IDE. The IDE should function automatically within the
>>> level
>>> 2 workspace when you are working on programs in your new language (just
>>> as
>>> the JDT operates automatically on Java programs).
>>>
>>> We recommend creating a Java project for developing programs in your new
>>> language and seeing how your new IDE works. In the "src" folder of the
>>> Java project, create a file in the new language. (I'll post an example
>>> separately in this newsgroup.) In order to be recognized by the new
>>> IDE,
>>> source programs in the new language must be given the filename extension
>>> that was specified in the "Programming language descriptor" wizard (we
>>> use
>>> "leg" for our example LEG-language extension). When you open a file
>>> with
>>> the appropriate filename extension, it should appear automatically in
>>> the
>>> editor of the new IDE. Depending on what other services have been
>>> instantiated in the IDE, you may see an outline view, syntax
>>> highlighting,
>>> source folding, and so on.
>>>
>>> You don't have to follow the whole IDE development process to the end.
>>> You
>>> can rerun the IDE each time you add a new service. The IDE actually
>>> becomes operational as soon as the parser is defined. If you run the
>>> IDE
>>> then, you should see little more than a basic Eclipse text editor, but
>>> it
>>> should already have integrated parsing--in other words, you should see
>>> annotations for syntax errors. When we give the IMP demo, we then
>>> usually
>>> add syntax highlighting (token coloring), outlining, and source text
>>> viewing, and rerun the IDE after that.
>>>
>>> This all works with the example LEG language and the example
>>> implementations for the various services. We think this grammar and
>>> these
>>> service implementations are fairly typical, but each language and IDE
>>> will
>>> be different. You may be able to start developing your own language and
>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>> our
>>> example code and write your own grammar and servie implementations from
>>> scratch.
>>>
>>>> Thanks for your co-operation!
>>>>
>>>> Hitesh...
>>> Thanks for the good questions!
>>>
>>> Stan Sutton
>>
>>





Re: Answers to questions on the IMP project [message #567895 is a reply to message #12317] Fri, 19 October 2007 12:45 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
"Vlad D." <vladdu55@gmail.com> wrote in message
news:ffa7nj$pga$1@build.eclipse.org...
> Oh, I see now that all IMP features have been installed outside of the
main
> Eclipse installation (I have some external product extension locations)
and
> maybe that's what makes it blow... (that path has spaces in it)

Yes, that was it --- it seems something doesn't stand spaces in path
names...

best regards,
Vlad
Re: Answers to questions on the IMP project [message #567970 is a reply to message #12344] Sun, 21 October 2007 15:29 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Vlad,

Thanks very much for your observations about this. We have known that
there are some problems with spaces in pathnames that occur in relation
to LPG, but it seems that your problems occurred when you were trying to
do something unrelated to LPG, so maybe the problem is more widespread
than we had thought. I will post an advisory message about this problem
and we will be looking into it (although most of the IMP team will be
away this coming week, so it may take a little time).

Regards,

Stan Sutton


Vlad D. wrote:
> "Vlad D." <vladdu55@gmail.com> wrote in message
> news:ffa7nj$pga$1@build.eclipse.org...
>> Oh, I see now that all IMP features have been installed outside of the
> main
>> Eclipse installation (I have some external product extension locations)
> and
>> maybe that's what makes it blow... (that path has spaces in it)
>
> Yes, that was it --- it seems something doesn't stand spaces in path
> names...
>
> best regards,
> Vlad
>
>
Re: Answers to questions on the IMP project [message #568022 is a reply to message #12333] Sun, 21 October 2007 15:52 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hello Hitesh,

From what you sent it does seem that the LPG builder is installed but
that it is not running.

Looking at what I can see in the Error Log image, I would guess that the
NullPointerException at the base of the log is the cause of the problem.
You should expand this item and see where the exception is occurring.

One consideration: In this thread Vlad D has reported a
NullPointerException that is due to the occurrence of a space in the
pathname to his Eclipse installation. He also has a problem where the
wizard page cannot be created (which I see too in your error log).
Maybe you have the same problem? Is there a space in the path name to
your Eclipse installation? (We should be able to handle that, but it
seems we may still have some work to do to get that right.)

You're welcome for the help!

Regards,

Stan


Hitesh Nembhwani wrote:
> 1)Stanley, thanks a lot for the mails and help.
> 2)No, i don't see any other Java classes other than what I had mentioned
> earlier. (*.AST is completely empty) I have attached the snap shot of my
> project exlporer, this should show you what files are generated in the
> packages. Alao, attached are the error log & problem views...
> 3)Yup, I can see "Enable LPG builder" menu item along with others...
> 4)I tried doing by even selecting the "Enable LPG builder" manually but
> still dont have any luck going my way :(
>
> Hitesh...
>
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff7qpn$tdu$1@build.eclipse.org...
>> Hello Hitesh,
>>
>> If the LPG Runtime feature is installed, then the LPG builder should be
>> available through that. If it were running successfully, there should
>> be another 8 or 9 Java classes in sample.imp.parser, and you should have
>> a set of AST classes in the *.AST package (and a few other classes). If
>> it were running unsuccessfully then you might see an exception stack
>> trace or error message on the console or you might get an error message
>> in the Error Log view. Do you see either of these things?
>>
>> Another thing to look at: If LPG is installed properly, and you right
>> click on the project Sample (or any other one, for that matter), you
>> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
>> installed properly, you should see some other "Enable *** Builder"
>> items, as well, such as "Enable X10 Builder.") If LPG is properly
>> installed then you should see the corresponding menu item. If you don't
>> then that's a problem.
>>
>> Of course, if the LPG builder is properly installed, it should be
>> running automatically and you should see the additional classes that I
>> mentioned above. I just tried this with the current IMP release on SF
>> and using your names of "Sample" and "sample" for the project and
>> language, and it worked for me. If you don't see the additional classes
>> but you do have the "Enable LPG Builder" menu item, then you could try
>> selecting that so as to manually enable the builder. That shouldn't be
>> necessary, but see if it has some effect.
>>
>> Regards,
>>
>> Stan Sutton
>>
>>
>> Hitesh Nembhwani wrote:
>>> Hi Stanley,
>>>
>>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>>
>>> I created a plug-in project named "Sample". When I used the option "New
>>> LPG
>>> Grammar with Parser Wrapper", two packages,
>>> (1) sample.imp.parser
>>> (2) sample.imp.parser.AST are created.
>>> Package 1 has following files:
>>> SampleASTNodeLocator.java
>>> SampleParseController.java
>>> SampleParser.java
>>> SampleKWLexer.gi
>>> SampleLexer.gi
>>> SampleLexer.l
>>> SampleParser.g
>>> SampleParser.l
>>>
>>> But package 2 is completely empty... (no classe/interfaces in it) and
>>> because of this I get errors in SampleASTNodeLocator &
>>> SampleParseController
>>> files saying "ASTNode cannot be resolved to a type".
>>> The SampleASTNodeLocator & SampleParseController files use "import
>>> sample.imp.parser.Ast.ASTNode"...
>>>
>>> Also, how do I check if LPG builder is running or not?
>>>
>>> Thanks,
>>> Hitesh...
>>>
>>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>>> news:ff34v5$ind$1@build.eclipse.org...
>>>> Hitesh Nembhwani wrote:
>>>>> Hi All,
>>>>>
>>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>>> through the steps given in
>>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>>> still few things aren't clear as:
>>>>>
>>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>>> "LPG" ->
>>>>> "New LPG Grammar with Parser Wrapper".
>>>>> Are these options the same thing?
>>>> Yes, these are the same thing. This is a case where the documentation
>>>> is
>>>> lagging behind our recent changes to other parts of the system. Thanks
>>>> for
>>>> pointing this out.
>>>>
>>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>>> generated in it) and due to this I get errors in other packages...
>>>> I can't say about this without more information. The LPG builder should
>>>> run automatically when you generate the grammar files using this wizard
>>>> (or later modify one of these files).
>>>>
>>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>>> installed? (This feature contains the LPG builder. Current version is
>>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>>> Java
>>>> classes generated in the parser package? (E.g., for a language "Lang",
>>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>>> and
>>>> parser-related classes). Do you see any exception traces in the console
>>>> window or get any error messages in the Error Log view?
>>>>
>>>>> Finally, I want to know in more clear terms how to test it after
>>>>> successful completion of all the steps? (I did not understand the same
>>>>> in
>>>>> user guide)
>>>> This is a good question--we need some documentation about this. You can
>>>> run through all of the steps (or a subset of them) and get a working IDE
>>>> for our example language without doing any other work. This is what we
>>>> do
>>>> when we give an IMP demo.
>>>>
>>>> The grammar templates that are generated by the "New LPG Grammar with
>>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>>> "leg")--anyway, that's what we call it (for "Little Expression
>>>> Grammar"),
>>>> although you can name it anything.
>>>>
>>>> The skeleton implementations that are generated for the other services
>>>> all
>>>> contain working example implementations that are based on the example
>>>> grammar. Each time you add a language service you should be able to
>>>> restart the IDE being developed and see that service working on programs
>>>> in the example language.
>>>>
>>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>>> runtime workbench starting from the development workspace in which you
>>>> are
>>>> building the IDE. The IDE should function automatically within the
>>>> level
>>>> 2 workspace when you are working on programs in your new language (just
>>>> as
>>>> the JDT operates automatically on Java programs).
>>>>
>>>> We recommend creating a Java project for developing programs in your new
>>>> language and seeing how your new IDE works. In the "src" folder of the
>>>> Java project, create a file in the new language. (I'll post an example
>>>> separately in this newsgroup.) In order to be recognized by the new
>>>> IDE,
>>>> source programs in the new language must be given the filename extension
>>>> that was specified in the "Programming language descriptor" wizard (we
>>>> use
>>>> "leg" for our example LEG-language extension). When you open a file
>>>> with
>>>> the appropriate filename extension, it should appear automatically in
>>>> the
>>>> editor of the new IDE. Depending on what other services have been
>>>> instantiated in the IDE, you may see an outline view, syntax
>>>> highlighting,
>>>> source folding, and so on.
>>>>
>>>> You don't have to follow the whole IDE development process to the end.
>>>> You
>>>> can rerun the IDE each time you add a new service. The IDE actually
>>>> becomes operational as soon as the parser is defined. If you run the
>>>> IDE
>>>> then, you should see little more than a basic Eclipse text editor, but
>>>> it
>>>> should already have integrated parsing--in other words, you should see
>>>> annotations for syntax errors. When we give the IMP demo, we then
>>>> usually
>>>> add syntax highlighting (token coloring), outlining, and source text
>>>> viewing, and rerun the IDE after that.
>>>>
>>>> This all works with the example LEG language and the example
>>>> implementations for the various services. We think this grammar and
>>>> these
>>>> service implementations are fairly typical, but each language and IDE
>>>> will
>>>> be different. You may be able to start developing your own language and
>>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>>> our
>>>> example code and write your own grammar and servie implementations from
>>>> scratch.
>>>>
>>>>> Thanks for your co-operation!
>>>>>
>>>>> Hitesh...
>>>> Thanks for the good questions!
>>>>
>>>> Stan Sutton
>>>
>
>
Re: Answers to questions on the IMP project [message #568114 is a reply to message #12381] Mon, 22 October 2007 06:52 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Yes, that was it for me too :)
The spaces in the path name was the problem! Its solved now.. Thanks Stan
and Vlad.

There's one more query. As per the IMP User Guide
( http://eclipse-imp.sourceforge.net/documentation/users_guide .html) for
creating a hyperlinking service, wizard
"File" -> "New" -> "IDE Language Support" -> "Editor Services" -> "Hyperlink
Detector" is to be used

and as per the Cheat sheets, wizard
"File" -> "New" -> "IDE Language Support" -> "Editor Services" -> "Reference
Resolver" is to be used

But we don't have either "Reference Resolver" or "Hyperlink Detector" under
"Editor Services".
Instead, we have "Reference Resolver" under "Core Services". So, what/where
is the substitute for "Hyperlink Detector"?

Hitesh...


"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:fffsk2$uql$1@build.eclipse.org...
> Hello Hitesh,
>
> From what you sent it does seem that the LPG builder is installed but that
> it is not running.
>
> Looking at what I can see in the Error Log image, I would guess that the
> NullPointerException at the base of the log is the cause of the problem.
> You should expand this item and see where the exception is occurring.
>
> One consideration: In this thread Vlad D has reported a
> NullPointerException that is due to the occurrence of a space in the
> pathname to his Eclipse installation. He also has a problem where the
> wizard page cannot be created (which I see too in your error log). Maybe
> you have the same problem? Is there a space in the path name to your
> Eclipse installation? (We should be able to handle that, but it seems we
> may still have some work to do to get that right.)
>
> You're welcome for the help!
>
> Regards,
>
> Stan
>
>
> Hitesh Nembhwani wrote:
>> 1)Stanley, thanks a lot for the mails and help.
>> 2)No, i don't see any other Java classes other than what I had mentioned
>> earlier. (*.AST is completely empty) I have attached the snap shot of my
>> project exlporer, this should show you what files are generated in the
>> packages. Alao, attached are the error log & problem views...
>> 3)Yup, I can see "Enable LPG builder" menu item along with others...
>> 4)I tried doing by even selecting the "Enable LPG builder" manually but
>> still dont have any luck going my way :(
>>
>> Hitesh...
>>
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff7qpn$tdu$1@build.eclipse.org...
>>> Hello Hitesh,
>>>
>>> If the LPG Runtime feature is installed, then the LPG builder should be
>>> available through that. If it were running successfully, there should
>>> be another 8 or 9 Java classes in sample.imp.parser, and you should have
>>> a set of AST classes in the *.AST package (and a few other classes). If
>>> it were running unsuccessfully then you might see an exception stack
>>> trace or error message on the console or you might get an error message
>>> in the Error Log view. Do you see either of these things?
>>>
>>> Another thing to look at: If LPG is installed properly, and you right
>>> click on the project Sample (or any other one, for that matter), you
>>> should see a menu item "Enable LPG Builder." (If the rest of SAFARI is
>>> installed properly, you should see some other "Enable *** Builder"
>>> items, as well, such as "Enable X10 Builder.") If LPG is properly
>>> installed then you should see the corresponding menu item. If you don't
>>> then that's a problem.
>>>
>>> Of course, if the LPG builder is properly installed, it should be
>>> running automatically and you should see the additional classes that I
>>> mentioned above. I just tried this with the current IMP release on SF
>>> and using your names of "Sample" and "sample" for the project and
>>> language, and it worked for me. If you don't see the additional classes
>>> but you do have the "Enable LPG Builder" menu item, then you could try
>>> selecting that so as to manually enable the builder. That shouldn't be
>>> necessary, but see if it has some effect.
>>>
>>> Regards,
>>>
>>> Stan Sutton
>>>
>>>
>>> Hitesh Nembhwani wrote:
>>>> Hi Stanley,
>>>>
>>>> Yes, LPG Runtime feature is installed, version 2.0.8.
>>>>
>>>> I created a plug-in project named "Sample". When I used the option
>>>> "New LPG
>>>> Grammar with Parser Wrapper", two packages,
>>>> (1) sample.imp.parser
>>>> (2) sample.imp.parser.AST are created.
>>>> Package 1 has following files:
>>>> SampleASTNodeLocator.java
>>>> SampleParseController.java
>>>> SampleParser.java
>>>> SampleKWLexer.gi
>>>> SampleLexer.gi
>>>> SampleLexer.l
>>>> SampleParser.g
>>>> SampleParser.l
>>>>
>>>> But package 2 is completely empty... (no classe/interfaces in it) and
>>>> because of this I get errors in SampleASTNodeLocator &
>>>> SampleParseController
>>>> files saying "ASTNode cannot be resolved to a type".
>>>> The SampleASTNodeLocator & SampleParseController files use "import
>>>> sample.imp.parser.Ast.ASTNode"...
>>>>
>>>> Also, how do I check if LPG builder is running or not?
>>>>
>>>> Thanks,
>>>> Hitesh...
>>>>
>>>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>>>> news:ff34v5$ind$1@build.eclipse.org...
>>>>> Hitesh Nembhwani wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> I'm new to the news group as well as with the IMP project. I have
>>>>>> gone
>>>>>> through the steps given in
>>>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>>>> still few things aren't clear as:
>>>>>>
>>>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" ->
>>>>>> "Parser
>>>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>>>> "LPG" ->
>>>>>> "New LPG Grammar with Parser Wrapper".
>>>>>> Are these options the same thing?
>>>>> Yes, these are the same thing. This is a case where the documentation
>>>>> is
>>>>> lagging behind our recent changes to other parts of the system. Thanks
>>>>> for
>>>>> pointing this out.
>>>>>
>>>>>> 2)When I proceed further using the option "New LPG Grammar with
>>>>>> Parser
>>>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>>>> generated in it) and due to this I get errors in other packages...
>>>>> I can't say about this without more information. The LPG builder
>>>>> should
>>>>> run automatically when you generate the grammar files using this
>>>>> wizard
>>>>> (or later modify one of these files).
>>>>>
>>>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>>>> installed? (This feature contains the LPG builder. Current version
>>>>> is
>>>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>>>> Java
>>>>> classes generated in the parser package? (E.g., for a language
>>>>> "Lang",
>>>>> there should be "LangLexer.java", "LangParser.java", and other lexer-
>>>>> and
>>>>> parser-related classes). Do you see any exception traces in the
>>>>> console
>>>>> window or get any error messages in the Error Log view?
>>>>>
>>>>>> Finally, I want to know in more clear terms how to test it after
>>>>>> successful completion of all the steps? (I did not understand the
>>>>>> same in
>>>>>> user guide)
>>>>> This is a good question--we need some documentation about this. You
>>>>> can
>>>>> run through all of the steps (or a subset of them) and get a working
>>>>> IDE
>>>>> for our example language without doing any other work. This is what
>>>>> we do
>>>>> when we give an IMP demo.
>>>>>
>>>>> The grammar templates that are generated by the "New LPG Grammar with
>>>>> Parser Wrapper" contain grammar rules for an example language, "LEG"
>>>>> (or
>>>>> "leg")--anyway, that's what we call it (for "Little Expression
>>>>> Grammar"),
>>>>> although you can name it anything.
>>>>>
>>>>> The skeleton implementations that are generated for the other services
>>>>> all
>>>>> contain working example implementations that are based on the example
>>>>> grammar. Each time you add a language service you should be able to
>>>>> restart the IDE being developed and see that service working on
>>>>> programs
>>>>> in the example language.
>>>>>
>>>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>>>> runtime workbench starting from the development workspace in which you
>>>>> are
>>>>> building the IDE. The IDE should function automatically within the
>>>>> level
>>>>> 2 workspace when you are working on programs in your new language
>>>>> (just as
>>>>> the JDT operates automatically on Java programs).
>>>>>
>>>>> We recommend creating a Java project for developing programs in your
>>>>> new
>>>>> language and seeing how your new IDE works. In the "src" folder of
>>>>> the
>>>>> Java project, create a file in the new language. (I'll post an
>>>>> example
>>>>> separately in this newsgroup.) In order to be recognized by the new
>>>>> IDE,
>>>>> source programs in the new language must be given the filename
>>>>> extension
>>>>> that was specified in the "Programming language descriptor" wizard (we
>>>>> use
>>>>> "leg" for our example LEG-language extension). When you open a file
>>>>> with
>>>>> the appropriate filename extension, it should appear automatically in
>>>>> the
>>>>> editor of the new IDE. Depending on what other services have been
>>>>> instantiated in the IDE, you may see an outline view, syntax
>>>>> highlighting,
>>>>> source folding, and so on.
>>>>>
>>>>> You don't have to follow the whole IDE development process to the end.
>>>>> You
>>>>> can rerun the IDE each time you add a new service. The IDE actually
>>>>> becomes operational as soon as the parser is defined. If you run the
>>>>> IDE
>>>>> then, you should see little more than a basic Eclipse text editor, but
>>>>> it
>>>>> should already have integrated parsing--in other words, you should see
>>>>> annotations for syntax errors. When we give the IMP demo, we then
>>>>> usually
>>>>> add syntax highlighting (token coloring), outlining, and source text
>>>>> viewing, and rerun the IDE after that.
>>>>>
>>>>> This all works with the example LEG language and the example
>>>>> implementations for the various services. We think this grammar and
>>>>> these
>>>>> service implementations are fairly typical, but each language and IDE
>>>>> will
>>>>> be different. You may be able to start developing your own language
>>>>> and
>>>>> IDE by adapting the IMP LEG examples, or you may want to remove all of
>>>>> our
>>>>> example code and write your own grammar and servie implementations
>>>>> from
>>>>> scratch.
>>>>>
>>>>>> Thanks for your co-operation!
>>>>>>
>>>>>> Hitesh...
>>>>> Thanks for the good questions!
>>>>>
>>>>> Stan Sutton
>>>>
>>
Re: Answers to questions on the IMP project [message #568143 is a reply to message #9984] Mon, 22 October 2007 07:30 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Stan.

Just a reminder to post the example which you were supposed to! (demo for
working IDE)
Thanks,
Hitesh..

"Stanley Sutton" <suttons@us.ibm.com> wrote in message
news:ff34v5$ind$1@build.eclipse.org...
> Hitesh Nembhwani wrote:
>> Hi All,
>>
>> I'm new to the news group as well as with the IMP project. I have gone
>> through the steps given in
>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>> still few things aren't clear as:
>>
>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>> Services" -> "LPG Grammar and Parser for UIDE"
>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>> "New LPG Grammar with Parser Wrapper".
>> Are these options the same thing?
>
> Yes, these are the same thing. This is a case where the documentation is
> lagging behind our recent changes to other parts of the system. Thanks for
> pointing this out.
>
>> 2)When I proceed further using the option "New LPG Grammar with Parser
>> Wrapper", the package of AST remains empty (no classes/interfaces are
>> generated in it) and due to this I get errors in other packages...
>
> I can't say about this without more information. The LPG builder should
> run automatically when you generate the grammar files using this wizard
> (or later modify one of these files).
>
> Are you running in a level 1 workspace? Is the LPG Runtime feature
> installed? (This feature contains the LPG builder. Current version is
> 2.0.6, I believe.) Is the LPG builder running at all? Are there new Java
> classes generated in the parser package? (E.g., for a language "Lang",
> there should be "LangLexer.java", "LangParser.java", and other lexer- and
> parser-related classes). Do you see any exception traces in the console
> window or get any error messages in the Error Log view?
>
>> Finally, I want to know in more clear terms how to test it after
>> successful completion of all the steps? (I did not understand the same in
>> user guide)
>
> This is a good question--we need some documentation about this. You can
> run through all of the steps (or a subset of them) and get a working IDE
> for our example language without doing any other work. This is what we do
> when we give an IMP demo.
>
> The grammar templates that are generated by the "New LPG Grammar with
> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
> although you can name it anything.
>
> The skeleton implementations that are generated for the other services all
> contain working example implementations that are based on the example
> grammar. Each time you add a language service you should be able to
> restart the IDE being developed and see that service working on programs
> in the example language.
>
> To run your new IDE, you need to run a level 2 workspace, that is, a
> runtime workbench starting from the development workspace in which you are
> building the IDE. The IDE should function automatically within the level
> 2 workspace when you are working on programs in your new language (just as
> the JDT operates automatically on Java programs).
>
> We recommend creating a Java project for developing programs in your new
> language and seeing how your new IDE works. In the "src" folder of the
> Java project, create a file in the new language. (I'll post an example
> separately in this newsgroup.) In order to be recognized by the new IDE,
> source programs in the new language must be given the filename extension
> that was specified in the "Programming language descriptor" wizard (we use
> "leg" for our example LEG-language extension). When you open a file with
> the appropriate filename extension, it should appear automatically in the
> editor of the new IDE. Depending on what other services have been
> instantiated in the IDE, you may see an outline view, syntax highlighting,
> source folding, and so on.
>
> You don't have to follow the whole IDE development process to the end. You
> can rerun the IDE each time you add a new service. The IDE actually
> becomes operational as soon as the parser is defined. If you run the IDE
> then, you should see little more than a basic Eclipse text editor, but it
> should already have integrated parsing--in other words, you should see
> annotations for syntax errors. When we give the IMP demo, we then usually
> add syntax highlighting (token coloring), outlining, and source text
> viewing, and rerun the IDE after that.
>
> This all works with the example LEG language and the example
> implementations for the various services. We think this grammar and these
> service implementations are fairly typical, but each language and IDE will
> be different. You may be able to start developing your own language and
> IDE by adapting the IMP LEG examples, or you may want to remove all of our
> example code and write your own grammar and servie implementations from
> scratch.
>
>> Thanks for your co-operation!
>>
>> Hitesh...
>
> Thanks for the good questions!
>
> Stan Sutton
Re: Answers to questions on the IMP project [message #568240 is a reply to message #12421] Mon, 22 October 2007 13:38 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Please, make it ASAP. I need it urgently...
Many Thanx!
Hitesh...
"Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
news:ffhjio$1op$1@build.eclipse.org...
> Stan.
>
> Just a reminder to post the example which you were supposed to! (demo for
> working IDE)
> Thanks,
> Hitesh..
>
> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
> news:ff34v5$ind$1@build.eclipse.org...
>> Hitesh Nembhwani wrote:
>>> Hi All,
>>>
>>> I'm new to the news group as well as with the IMP project. I have gone
>>> through the steps given in
>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>> still few things aren't clear as:
>>>
>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>> Services" -> "LPG Grammar and Parser for UIDE"
>>> instead I get "File" -> "New" -> "IDE Language Support" -> "LPG" ->
>>> "New LPG Grammar with Parser Wrapper".
>>> Are these options the same thing?
>>
>> Yes, these are the same thing. This is a case where the documentation is
>> lagging behind our recent changes to other parts of the system. Thanks
>> for pointing this out.
>>
>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>> generated in it) and due to this I get errors in other packages...
>>
>> I can't say about this without more information. The LPG builder should
>> run automatically when you generate the grammar files using this wizard
>> (or later modify one of these files).
>>
>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>> installed? (This feature contains the LPG builder. Current version is
>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>> Java classes generated in the parser package? (E.g., for a language
>> "Lang", there should be "LangLexer.java", "LangParser.java", and other
>> lexer- and parser-related classes). Do you see any exception traces in
>> the console window or get any error messages in the Error Log view?
>>
>>> Finally, I want to know in more clear terms how to test it after
>>> successful completion of all the steps? (I did not understand the same
>>> in user guide)
>>
>> This is a good question--we need some documentation about this. You can
>> run through all of the steps (or a subset of them) and get a working IDE
>> for our example language without doing any other work. This is what we
>> do when we give an IMP demo.
>>
>> The grammar templates that are generated by the "New LPG Grammar with
>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>> "leg")--anyway, that's what we call it (for "Little Expression Grammar"),
>> although you can name it anything.
>>
>> The skeleton implementations that are generated for the other services
>> all contain working example implementations that are based on the example
>> grammar. Each time you add a language service you should be able to
>> restart the IDE being developed and see that service working on programs
>> in the example language.
>>
>> To run your new IDE, you need to run a level 2 workspace, that is, a
>> runtime workbench starting from the development workspace in which you
>> are building the IDE. The IDE should function automatically within the
>> level 2 workspace when you are working on programs in your new language
>> (just as the JDT operates automatically on Java programs).
>>
>> We recommend creating a Java project for developing programs in your new
>> language and seeing how your new IDE works. In the "src" folder of the
>> Java project, create a file in the new language. (I'll post an example
>> separately in this newsgroup.) In order to be recognized by the new IDE,
>> source programs in the new language must be given the filename extension
>> that was specified in the "Programming language descriptor" wizard (we
>> use "leg" for our example LEG-language extension). When you open a file
>> with the appropriate filename extension, it should appear automatically
>> in the editor of the new IDE. Depending on what other services have been
>> instantiated in the IDE, you may see an outline view, syntax
>> highlighting, source folding, and so on.
>>
>> You don't have to follow the whole IDE development process to the end.
>> You can rerun the IDE each time you add a new service. The IDE actually
>> becomes operational as soon as the parser is defined. If you run the IDE
>> then, you should see little more than a basic Eclipse text editor, but it
>> should already have integrated parsing--in other words, you should see
>> annotations for syntax errors. When we give the IMP demo, we then
>> usually add syntax highlighting (token coloring), outlining, and source
>> text viewing, and rerun the IDE after that.
>>
>> This all works with the example LEG language and the example
>> implementations for the various services. We think this grammar and
>> these service implementations are fairly typical, but each language and
>> IDE will be different. You may be able to start developing your own
>> language and IDE by adapting the IMP LEG examples, or you may want to
>> remove all of our example code and write your own grammar and servie
>> implementations from scratch.
>>
>>> Thanks for your co-operation!
>>>
>>> Hitesh...
>>
>> Thanks for the good questions!
>>
>> Stan Sutton
>
>
Re: Answers to questions on the IMP project [message #568333 is a reply to message #12439] Mon, 22 October 2007 13:52 Go to previous message
Eclipse UserFriend
Originally posted by: hiteshn.mail.gmail.com

Finally Done!!! :)
"Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
news:ffi94c$4k1$1@build.eclipse.org...
> Please, make it ASAP. I need it urgently...
> Many Thanx!
> Hitesh...
> "Hitesh Nembhwani" <hiteshn.mail@gmail.com> wrote in message
> news:ffhjio$1op$1@build.eclipse.org...
>> Stan.
>>
>> Just a reminder to post the example which you were supposed to! (demo for
>> working IDE)
>> Thanks,
>> Hitesh..
>>
>> "Stanley Sutton" <suttons@us.ibm.com> wrote in message
>> news:ff34v5$ind$1@build.eclipse.org...
>>> Hitesh Nembhwani wrote:
>>>> Hi All,
>>>>
>>>> I'm new to the news group as well as with the IMP project. I have gone
>>>> through the steps given in
>>>> http://eclipse-imp.sourceforge.net/documentation/users_guide .html but
>>>> still few things aren't clear as:
>>>>
>>>> 1) I cannot find "File" -> "New" -> "IDE Language Support" -> "Parser
>>>> Services" -> "LPG Grammar and Parser for UIDE"
>>>> instead I get "File" -> "New" -> "IDE Language Support" ->
>>>> "LPG" -> "New LPG Grammar with Parser Wrapper".
>>>> Are these options the same thing?
>>>
>>> Yes, these are the same thing. This is a case where the documentation
>>> is lagging behind our recent changes to other parts of the system.
>>> Thanks for pointing this out.
>>>
>>>> 2)When I proceed further using the option "New LPG Grammar with Parser
>>>> Wrapper", the package of AST remains empty (no classes/interfaces are
>>>> generated in it) and due to this I get errors in other packages...
>>>
>>> I can't say about this without more information. The LPG builder should
>>> run automatically when you generate the grammar files using this wizard
>>> (or later modify one of these files).
>>>
>>> Are you running in a level 1 workspace? Is the LPG Runtime feature
>>> installed? (This feature contains the LPG builder. Current version is
>>> 2.0.6, I believe.) Is the LPG builder running at all? Are there new
>>> Java classes generated in the parser package? (E.g., for a language
>>> "Lang", there should be "LangLexer.java", "LangParser.java", and other
>>> lexer- and parser-related classes). Do you see any exception traces in
>>> the console window or get any error messages in the Error Log view?
>>>
>>>> Finally, I want to know in more clear terms how to test it after
>>>> successful completion of all the steps? (I did not understand the same
>>>> in user guide)
>>>
>>> This is a good question--we need some documentation about this. You can
>>> run through all of the steps (or a subset of them) and get a working IDE
>>> for our example language without doing any other work. This is what we
>>> do when we give an IMP demo.
>>>
>>> The grammar templates that are generated by the "New LPG Grammar with
>>> Parser Wrapper" contain grammar rules for an example language, "LEG" (or
>>> "leg")--anyway, that's what we call it (for "Little Expression
>>> Grammar"), although you can name it anything.
>>>
>>> The skeleton implementations that are generated for the other services
>>> all contain working example implementations that are based on the
>>> example grammar. Each time you add a language service you should be
>>> able to restart the IDE being developed and see that service working on
>>> programs in the example language.
>>>
>>> To run your new IDE, you need to run a level 2 workspace, that is, a
>>> runtime workbench starting from the development workspace in which you
>>> are building the IDE. The IDE should function automatically within the
>>> level 2 workspace when you are working on programs in your new language
>>> (just as the JDT operates automatically on Java programs).
>>>
>>> We recommend creating a Java project for developing programs in your new
>>> language and seeing how your new IDE works. In the "src" folder of the
>>> Java project, create a file in the new language. (I'll post an example
>>> separately in this newsgroup.) In order to be recognized by the new
>>> IDE, source programs in the new language must be given the filename
>>> extension that was specified in the "Programming language descriptor"
>>> wizard (we use "leg" for our example LEG-language extension). When you
>>> open a file with the appropriate filename extension, it should appear
>>> automatically in the editor of the new IDE. Depending on what other
>>> services have been instantiated in the IDE, you may see an outline view,
>>> syntax highlighting, source folding, and so on.
>>>
>>> You don't have to follow the whole IDE development process to the end.
>>> You can rerun the IDE each time you add a new service. The IDE actually
>>> becomes operational as soon as the parser is defined. If you run the
>>> IDE then, you should see little more than a basic Eclipse text editor,
>>> but it should already have integrated parsing--in other words, you
>>> should see annotations for syntax errors. When we give the IMP demo, we
>>> then usually add syntax highlighting (token coloring), outlining, and
>>> source text viewing, and rerun the IDE after that.
>>>
>>> This all works with the example LEG language and the example
>>> implementations for the various services. We think this grammar and
>>> these service implementations are fairly typical, but each language and
>>> IDE will be different. You may be able to start developing your own
>>> language and IDE by adapting the IMP LEG examples, or you may want to
>>> remove all of our example code and write your own grammar and servie
>>> implementations from scratch.
>>>
>>>> Thanks for your co-operation!
>>>>
>>>> Hitesh...
>>>
>>> Thanks for the good questions!
>>>
>>> Stan Sutton
>>
>>
>
>
Re: Answers to questions on the IMP project [message #568396 is a reply to message #14382] Tue, 23 October 2007 02:21 Go to previous message
Stan Sutton is currently offline Stan SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Hi Hitesh,

I hope you got things worked out. I have posted a top-level message
with more information about examples. I apologize that it took some
time to get this additional information up, but I'm out of the office
this week with duties unrelated to IMP.

Good luck!

Stan Sutton
Previous Topic:IMP Examples
Next Topic:IMP Examples
Goto Forum:
  


Current Time: Thu Mar 28 09:37:27 GMT 2024

Powered by FUDForum. Page generated in 0.06682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top