Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » mismatched input 'test' expecting RULE_ID(mismatched input 'test' expecting RULE_ID)
mismatched input 'test' expecting RULE_ID [message #1769345] Sun, 30 July 2017 12:24 Go to next message
GW4E  Project is currently offline GW4E ProjectFriend
Messages: 1
Registered: July 2017
Junior Member
Hi

I created a grammar with the following rules

AlgorithmCall returns AlgorithmType :
{AlgorithmCall} algorithm=AlgorithmType '(' (condition=Condition ) ")" ;

Condition:
pathtype = 'RV' '(' (value = ID) ')' | pathtype = 'RE' '(' (value = ID) ')' ;

When I parse random(RE(test)) i got an error
mismatched input 'test' expecting RULE_ID

When I change the rule with
Condition:
pathtype = 'RV' '(' (value = INT) ')' | pathtype = 'RE' '(' (value = INT) ')' ;
and I parse random(RE(100)) i dont get any error.

Sounds like I have a pb with ID.

Any idea of what I'm doing wrong ?

Thanks.
Re: mismatched input 'test' expecting RULE_ID [message #1769449 is a reply to message #1769345] Mon, 31 July 2017 18:28 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
You might be affected by https://blogs.itemis.com/en/xtext-hint-identifiers-conflicting-with-keywords

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Is there incremental parser or partial parser in Xtext or ANTLR
Next Topic:Unresolved proxies
Goto Forum:
  


Current Time: Sat Sep 18 08:48:42 GMT 2021

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

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

Back to the top