Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [Xtext-0.7.1] some problems with the first steps
[Xtext-0.7.1] some problems with the first steps [message #61081] Mon, 20 July 2009 07:49 Go to next message
Eclipse UserFriend
Hello *,

I've got some problems with my new XText-project.

For migrate my old oAW-XText-project I'm testing TMF XText now.
1) I've downloaded today
http://download.itemis.com/distros/eclipse-SDK-3.5-xtext-0.7 .1-linux-gtk-x86_64.tar.gz

2) I've started this Eclipse and created a new XText project
3) I copied my old EBNF and make some changes for compatibility with
TMF-XText-0.7.1
4) run the workflow GenerateDsl.mwe

And now the problem, the parser was not generated.
" org.example.dsl.contentassist.antlr.internal.InternalDslPars er cannot
be resolved to a type".

In the project "dsl.ui" exists a package
"org.example.dsl.contentassist.antlr.internal". May the needed parser
should generated in there.

In documentation I found the hint to download separate ANTLR feature,
but it is installed yet.

What should I do now?

Ciao, Micha
Re: [Xtext-0.7.1] some problems with the first steps [message #61130 is a reply to message #61081] Mon, 20 July 2009 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

are there any error messages in the logs when you invoke the
GenerateDsl.mwe?

Regards,
Sebastian

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 20.07.2009 13:49 Uhr, schrieb Michael Burhkardt:
> Hello *,
>
> I've got some problems with my new XText-project.
>
> For migrate my old oAW-XText-project I'm testing TMF XText now.
> 1) I've downloaded today
> http://download.itemis.com/distros/eclipse-SDK-3.5-xtext-0.7 .1-linux-gtk-x86_64.tar.gz
>
> 2) I've started this Eclipse and created a new XText project
> 3) I copied my old EBNF and make some changes for compatibility with
> TMF-XText-0.7.1
> 4) run the workflow GenerateDsl.mwe
>
> And now the problem, the parser was not generated.
> " org.example.dsl.contentassist.antlr.internal.InternalDslPars er cannot
> be resolved to a type".
>
> In the project "dsl.ui" exists a package
> "org.example.dsl.contentassist.antlr.internal". May the needed parser
> should generated in there.
>
> In documentation I found the hint to download separate ANTLR feature,
> but it is installed yet.
>
> What should I do now?
>
> Ciao, Micha
Re: [Xtext-0.7.1] some problems with the first steps [message #61765 is a reply to message #61130] Tue, 21 July 2009 04:09 Go to previous messageGo to next message
Eclipse UserFriend
Hello Sebastian,

you are right, there were an error.

error(211):
.../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
[fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
invocations reachable from alts 1,2. Resolve by left-factoring or using
syntactic predicates or using backtrack=true option.


If found in the documentation the hint, to insert the following lines
into the workflow file
<fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
<options backtrack="true" memoize="true"/>
</fragment>

Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
was generated, but the main project cannot find it.

Why?
Should I add a depandancy manually?

Ciao, Micha



Sebastian Zarnekow schrieb:
> Hi Michael,
>
> are there any error messages in the logs when you invoke the
> GenerateDsl.mwe?
>
> Regards,
> Sebastian
>
Re: [Xtext-0.7.1] some problems with the first steps [message #61788 is a reply to message #61765] Tue, 21 July 2009 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

please note that there should be two parsers, one in your main project
(the one with the dsl.xtext) and another one in your ui project. You'ld
have to add the options for both fragments. Please replace

<fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" />

and use this one instead:

<fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
<options backtrack="true" memoize="true"/>
</fragment>

Regards,
Sebastian

Am 21.07.2009 10:09 Uhr, schrieb Michael Burhkardt:
> Hello Sebastian,
>
> you are right, there were an error.
>
> error(211):
> .../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
> [fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
> invocations reachable from alts 1,2. Resolve by left-factoring or using
> syntactic predicates or using backtrack=true option.
>
>
> If found in the documentation the hint, to insert the following lines
> into the workflow file
> <fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
> <options backtrack="true" memoize="true"/>
> </fragment>
>
> Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
> was generated, but the main project cannot find it.
>
> Why?
> Should I add a depandancy manually?
>
> Ciao, Micha
>
>
>
> Sebastian Zarnekow schrieb:
>> Hi Michael,
>>
>> are there any error messages in the logs when you invoke the
>> GenerateDsl.mwe?
>>
>> Regards,
>> Sebastian
>>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: [Xtext-0.7.1] some problems with the first steps [message #61811 is a reply to message #61788] Tue, 21 July 2009 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Sebastian,

I think, I got the error. If I use a capital letter for domain laguage name,
everything works fine with the given example from wizard.

So, now I try to copy my old ebnf into a new project. Thanks for you help.

Ciao, Micha


--- Original-Nachricht ---
Absender: Sebastian Zarnekow
Datum: 21.07.2009 11:58
> Hi Michael,
>
> please note that there should be two parsers, one in your main project
> (the one with the dsl.xtext) and another one in your ui project. You'ld
> have to add the options for both fragments. Please replace
>
> <fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" />
>
> and use this one instead:
>
> <fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
> <options backtrack="true" memoize="true"/>
> </fragment>
>
> Regards,
> Sebastian
>
> Am 21.07.2009 10:09 Uhr, schrieb Michael Burhkardt:
>> Hello Sebastian,
>>
>> you are right, there were an error.
>>
>> error(211):
>> .../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
>> [fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
>> invocations reachable from alts 1,2. Resolve by left-factoring or using
>> syntactic predicates or using backtrack=true option.
>>
>>
>> If found in the documentation the hint, to insert the following lines
>> into the workflow file
>> <fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
>> <options backtrack="true" memoize="true"/>
>> </fragment>
>>
>> Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
>> was generated, but the main project cannot find it.
>>
>> Why?
>> Should I add a depandancy manually?
>>
>> Ciao, Micha
>>
>>
>>
>> Sebastian Zarnekow schrieb:
>>> Hi Michael,
>>>
>>> are there any error messages in the logs when you invoke the
>>> GenerateDsl.mwe?
>>>
>>> Regards,
>>> Sebastian
>>>
>
>
Re: [Xtext-0.7.1] some problems with the first steps [message #61856 is a reply to message #61811] Tue, 21 July 2009 07:34 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

please consider to update Xtext to 0.7.1 as it incorporates a bunch of
fixes. For example, your lower case language name would have been
flagged as an error instead of a warning.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 21.07.2009 12:10 Uhr, schrieb Michael Burkhardt:
> Hi Sebastian,
>
> I think, I got the error. If I use a capital letter for domain laguage
> name, everything works fine with the given example from wizard.
>
> So, now I try to copy my old ebnf into a new project. Thanks for you help.
>
> Ciao, Micha
>
>
> --- Original-Nachricht ---
> Absender: Sebastian Zarnekow
> Datum: 21.07.2009 11:58
>> Hi Michael,
>>
>> please note that there should be two parsers, one in your main project
>> (the one with the dsl.xtext) and another one in your ui project.
>> You'ld have to add the options for both fragments. Please replace
>>
>> <fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" />
>>
>> and use this one instead:
>>
>> <fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
>> <options backtrack="true" memoize="true"/>
>> </fragment>
>>
>> Regards,
>> Sebastian
>>
>> Am 21.07.2009 10:09 Uhr, schrieb Michael Burhkardt:
>>> Hello Sebastian,
>>>
>>> you are right, there were an error.
>>>
>>> error(211):
>>> .../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
>>> [fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
>>> invocations reachable from alts 1,2. Resolve by left-factoring or using
>>> syntactic predicates or using backtrack=true option.
>>>
>>>
>>> If found in the documentation the hint, to insert the following lines
>>> into the workflow file
>>> <fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
>>> <options backtrack="true" memoize="true"/>
>>> </fragment>
>>>
>>> Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
>>> was generated, but the main project cannot find it.
>>>
>>> Why?
>>> Should I add a depandancy manually?
>>>
>>> Ciao, Micha
>>>
>>>
>>>
>>> Sebastian Zarnekow schrieb:
>>>> Hi Michael,
>>>>
>>>> are there any error messages in the logs when you invoke the
>>>> GenerateDsl.mwe?
>>>>
>>>> Regards,
>>>> Sebastian
>>>>
>>
>>
Re: [Xtext-0.7.1] some problems with the first steps [message #61880 is a reply to message #61788] Tue, 21 July 2009 10:22 Go to previous messageGo to next message
Eclipse UserFriend
Hello Sebastian,

in my main project I found a MWE file, but not in my UI project. I search for
the string "AntlrDelegatingFragment" in all file, but the single result was the
known GenerateDsl.mwe file from my main project.

Am I wrong?

Ciao, Micha


--- Original-Nachricht ---
Absender: Sebastian Zarnekow
Datum: 21.07.2009 11:58
> Hi Michael,
>
> please note that there should be two parsers, one in your main project
> (the one with the dsl.xtext) and another one in your ui project. You'ld
> have to add the options for both fragments. Please replace
>
> <fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" />
>
> and use this one instead:
>
> <fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
> <options backtrack="true" memoize="true"/>
> </fragment>
>
> Regards,
> Sebastian
>
> Am 21.07.2009 10:09 Uhr, schrieb Michael Burhkardt:
>> Hello Sebastian,
>>
>> you are right, there were an error.
>>
>> error(211):
>> .../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
>> [fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
>> invocations reachable from alts 1,2. Resolve by left-factoring or using
>> syntactic predicates or using backtrack=true option.
>>
>>
>> If found in the documentation the hint, to insert the following lines
>> into the workflow file
>> <fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
>> <options backtrack="true" memoize="true"/>
>> </fragment>
>>
>> Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
>> was generated, but the main project cannot find it.
>>
>> Why?
>> Should I add a depandancy manually?
>>
>> Ciao, Micha
>>
>>
>>
>> Sebastian Zarnekow schrieb:
>>> Hi Michael,
>>>
>>> are there any error messages in the logs when you invoke the
>>> GenerateDsl.mwe?
>>>
>>> Regards,
>>> Sebastian
>>>
>
>
Re: [Xtext-0.7.1] some problems with the first steps [message #61935 is a reply to message #61880] Tue, 21 July 2009 11:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

I'm afraid my previous post was misleading.
I was refering to the workflow file in your dsl project. It contains the
fragments for the runtime and for the ui project. There are two
fragments that will create an Antlr based parser for you.
You need to define the backtracking in both fragments. You alread did
this for the ui, but I was assuming that you did not find the fragment
for the runtime parser.
The AntlrDelegatingFragment needs to be replaced by the
XtextAntlrGeneratorFragment which allows to define backtracking the same
way as for the ui parser.

Please search for AntlrDelegatingFragment in your GenerateDsl.mwe and use

<fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
<options backtrack="true" memoize="true"/>
</fragment>

instead.

Everything should have been fine if you already set backtracking to true
for the ui fragment _and_ the runtime fragment. In this case I'ld like
you to attach your mwe file because I have no idea why the parser should
be missing in your runtime project.

Regards,
Sebastian

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 21.07.2009 16:22 Uhr, schrieb Michael Burkhardt:
> Hello Sebastian,
>
> in my main project I found a MWE file, but not in my UI project. I
> search for the string "AntlrDelegatingFragment" in all file, but the
> single result was the known GenerateDsl.mwe file from my main project.
>
> Am I wrong?
>
> Ciao, Micha
>
>
> --- Original-Nachricht ---
> Absender: Sebastian Zarnekow
> Datum: 21.07.2009 11:58
>> Hi Michael,
>>
>> please note that there should be two parsers, one in your main project
>> (the one with the dsl.xtext) and another one in your ui project.
>> You'ld have to add the options for both fragments. Please replace
>>
>> <fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" />
>>
>> and use this one instead:
>>
>> <fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
>> <options backtrack="true" memoize="true"/>
>> </fragment>
>>
>> Regards,
>> Sebastian
>>
>> Am 21.07.2009 10:09 Uhr, schrieb Michael Burhkardt:
>>> Hello Sebastian,
>>>
>>> you are right, there were an error.
>>>
>>> error(211):
>>> .../dsl/src-gen/org/example/parser/antlr/internal/InternalDs l.g:2635:1:
>>> [fatal] rule ruleReceive has non-LL(*) decision due to recursive rule
>>> invocations reachable from alts 1,2. Resolve by left-factoring or using
>>> syntactic predicates or using backtrack=true option.
>>>
>>>
>>> If found in the documentation the hint, to insert the following lines
>>> into the workflow file
>>> <fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
>>> <options backtrack="true" memoize="true"/>
>>> </fragment>
>>>
>>> Now the org.example.dsl.contentassist.antlr.internal.InternalDslPars er
>>> was generated, but the main project cannot find it.
>>>
>>> Why?
>>> Should I add a depandancy manually?
>>>
>>> Ciao, Micha
>>>
>>>
>>>
>>> Sebastian Zarnekow schrieb:
>>>> Hi Michael,
>>>>
>>>> are there any error messages in the logs when you invoke the
>>>> GenerateDsl.mwe?
>>>>
>>>> Regards,
>>>> Sebastian
>>>>
>>
>>
Re: [Xtext-0.7.1] some problems with the first steps [message #62330 is a reply to message #61935] Wed, 22 July 2009 05:20 Go to previous message
Eclipse UserFriend
Don't be scared! Now I found the parts in the MWE file.

They are:
<!-- the following fragment tries to use the Antlr Generator fragment which can
be installed via update manager from http://download.itemis.com/updates/ -->
<!--fragment class="org.eclipse.xtext.generator.AntlrDelegatingFragment" / -->
<fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
<options backtrack="true" memoize="true"/>
</fragment>

and:
<!--fragment class="org.eclipse.xtext.generator.DelegatingGeneratorFragment "
delegate="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment " message="You are
generating without ANTLR. It is highly recommended to download and use the
plugin 'de.itemis.xtext.antlr' \n\t using the update site
http://download.itemis.com/updates/.">
</fragment -->
<fragment class="de.itemis.xtext.antlr.XtextAntlrUiGeneratorFragment" >
<options backtrack="true" memoize="true"/>
</fragment>

I didn't found the second one.

Now, it works fine.

Thanks for your help. However, more problems will emerge for sure.

Ciao, Micha



--- Original-Nachricht ---
Absender: Sebastian Zarnekow
Datum: 21.07.2009 17:52
> Hi Michael,
>
> I'm afraid my previous post was misleading.
> I was refering to the workflow file in your dsl project. It contains the
> fragments for the runtime and for the ui project. There are two
> fragments that will create an Antlr based parser for you.
> You need to define the backtracking in both fragments. You alread did
> this for the ui, but I was assuming that you did not find the fragment
> for the runtime parser.
> The AntlrDelegatingFragment needs to be replaced by the
> XtextAntlrGeneratorFragment which allows to define backtracking the same
> way as for the ui parser.
>
> Please search for AntlrDelegatingFragment in your GenerateDsl.mwe and use
>
> <fragment class="de.itemis.xtext.antlr.XtextAntlrGeneratorFragment">
> <options backtrack="true" memoize="true"/>
> </fragment>
>
> instead.
>
> Everything should have been fine if you already set backtracking to true
> for the ui fragment _and_ the runtime fragment. In this case I'ld like
> you to attach your mwe file because I have no idea why the parser should
> be missing in your runtime project.
>
> Regards,
> Sebastian
>
Previous Topic:Setting stereotype of an UML element
Next Topic:Reading Xtext model file in Java Apps
Goto Forum:
  


Current Time: Sun May 11 18:23:13 EDT 2025

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

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

Back to the top