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

I created a grammar with the following rules

AlgorithmCall returns AlgorithmType :
{AlgorithmCall} algorithm=AlgorithmType '(' (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
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 ?

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: 14285
Registered: July 2009
Senior Member
You might be affected by

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Is there incremental parser or partial parser in Xtext or ANTLR
Next Topic:Unresolved proxies
Goto Forum:

Current Time: Fri Jul 01 15:15:57 GMT 2022

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

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

Back to the top