Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » What is wrong in my grammar?
What is wrong in my grammar? [message #857103] Thu, 26 April 2012 08:47 Go to next message
Markus Breitinger is currently offline Markus BreitingerFriend
Messages: 3
Registered: April 2012
Junior Member
I have files in a style like the Windows-INI but with multiple parameters separated by TAB characters. I attached my grammar and a file to parse. Could please anyone tell me what i do wrong!
  • Attachment: GetData.fup
    (Size: 5.22KB, Downloaded 242 times)
  • Attachment: FUP.xtext
    (Size: 0.50KB, Downloaded 125 times)
Re: What is wrong in my grammar? [message #857167 is a reply to message #857103] Thu, 26 April 2012 09:51 Go to previous messageGo to next message
Markus Breitinger is currently offline Markus BreitingerFriend
Messages: 3
Registered: April 2012
Junior Member
Some more information:
The editor complains about:
- the first Property in a Section:
Multiple markers at this line
- missing RULE_NEWLINE at 'DBVersion'
- mismatched input '2' expecting RULE_NEWLINE
- a Section conating a space character in its name:
mismatched input '_BLINK1 13' expecting RULE_ID
- a Value formatted like a section start with the brackets, but should be recognized as Value of a Property: (example: line 257)
Multiple markers at this line
- missing RULE_NEWLINE at 'ecolome'
- extraneous input '�' expecting RULE_ID
- mismatched input '-' expecting '='
Re: What is wrong in my grammar? [message #857190 is a reply to message #857103] Thu, 26 April 2012 10:20 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
You've declared NEWLINE tokens to go to the hidden channel, so you can't explicitly match them in parser rules.

Re: What is wrong in my grammar? [message #857222 is a reply to message #857190] Thu, 26 April 2012 11:02 Go to previous messageGo to next message
Markus Breitinger is currently offline Markus BreitingerFriend
Messages: 3
Registered: April 2012
Junior Member
Thank you!

This reduced the amount of errors a lot. It seems like there are hidden rules which are not defined in my grammar. How can i get rid of them?
Re: What is wrong in my grammar? [message #859481 is a reply to message #857222] Fri, 27 April 2012 17:00 Go to previous message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Modify line 2 of your grammar (where it's defined which rules to hide).

Previous Topic:switchable OutputConfiguration
Next Topic:Woes migrating to 2.2.1 from 2.0.1 - need help
Goto Forum:
  


Current Time: Mon Jul 13 17:52:02 GMT 2020

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

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

Back to the top