Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Rule for allowing only one command per line in DSL using xtext
Rule for allowing only one command per line in DSL using xtext [message #1699206] Mon, 22 June 2015 14:53
Mohsin waqas is currently offline Mohsin waqasFriend
Messages: 33
Registered: June 2015
Member
Hello,
In my grammar I want atmost one command per line (I dont want ';' or ':' to terminate my commands).
But when I use ('\r'?'\n') to ensure one command per line, it produces an extra line gape. for example it produces:

read Ram 03DF

write Ram 05FF

JMP Add 056A

CHK Reg 08AA


this is not required. Expected should be without extra line wrap. For example:
read Ram 03DF
write Ram 05FF
JMP Add 056A
CHK Reg 08AA


the overview of what I am doing is

Model:
     (content += Elements ('\r'?'\n') )+
;
Elements:
Data | Path | Ram | Address
;
.
.
.

I am not sure how can I achieve that: Please help. thanks

[Updated on: Mon, 22 June 2015 15:21]

Report message to a moderator

Previous Topic:Is there is a way to parse certain file after the generating from outside the editor
Next Topic:Xtext Builder runs into a compile error
Goto Forum:
  


Current Time: Tue Mar 19 03:10:32 GMT 2024

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

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

Back to the top