Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » cannot distinguish between alternative(s)
cannot distinguish between alternative(s) [message #58133] Tue, 14 July 2009 07:28 Go to next message
Marcel Merkel is currently offline Marcel MerkelFriend
Messages: 2
Registered: July 2009
Junior Member
Hi Newsgroup,

in my dsl I will have to work with db tables. To identify a column inside
a table I use the following statements:


Table:
(schema=ID '.')? tableName=ID;


Element:
table=Table '.' columnName=ID ;

Optionally you may have to add a schema name, therefore schema is optional
in the Table statement.


When I execute the MWE worklfow I get the following warning:

warning(202):
../org.xtext.example.mydsl/src-gen/org/xtext/example/parser/ antlr/internal/InternalMyDsl.g:373:2:
the decision cannot distinguish between alternative(s) 2,1 for at least
one input sequence

which is not 100% clear to me. I see the concern from the compiler but I
do not know how to fix it. Is there any pattern fur such a problem ? A
quick fix would be to use another separator (e.g. # ) in the Table
definition. But I'd prefer to use the same separator.

Any help would be very much appreciated.

Regards,

Marcel
Re: cannot distinguish between alternative(s) [message #58856 is a reply to message #58133] Wed, 15 July 2009 08:55 Go to previous message
Knut Wannheden is currently offline Knut WannhedenFriend
Messages: 298
Registered: July 2009
Senior Member
Hi Marcel,

You should be able to enable ANTLR backtracking. The recent thread with
subject "[Xtext] ANTLR options"
( http://www.eclipse.org/newsportal/article.php?id=1296&gr oup=eclipse.modeling.tmf)
discussed how this is done.

Hope that helps,

--knut

Marcel Merkel wrote:
> Hi Newsgroup,
>
> in my dsl I will have to work with db tables. To identify a column
> inside a table I use the following statements:
>
>
> Table:
> (schema=ID '.')? tableName=ID;
>
>
> Element:
> table=Table '.' columnName=ID ;
> Optionally you may have to add a schema name, therefore schema is
> optional in the Table statement.
>
>
> When I execute the MWE worklfow I get the following warning:
>
> warning(202):
> ./org.xtext.example.mydsl/src-gen/org/xtext/example/parser/a ntlr/internal/InternalMyDsl.g:373:2:
> the decision cannot distinguish between alternative(s) 2,1 for at least
> one input sequence
>
> which is not 100% clear to me. I see the concern from the compiler but I
> do not know how to fix it. Is there any pattern fur such a problem ? A
> quick fix would be to use another separator (e.g. # ) in the Table
> definition. But I'd prefer to use the same separator.
> Any help would be very much appreciated.
>
> Regards,
>
> Marcel
>
Previous Topic:Re: Modifying Content assist, and notifying linking service
Next Topic:Grammars without 'with' generate errors
Goto Forum:
  


Current Time: Wed Jul 17 10:06:30 GMT 2024

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

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

Back to the top