| 
| cannot distinguish between alternative(s) [message #58133] | Tue, 14 July 2009 03:28  |  | 
| Eclipse User  |  |  |  |  | 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 04:55  |  | 
| Eclipse User  |  |  |  |  | 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
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03231 seconds