Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Formatting and grammar with optional rules
Formatting and grammar with optional rules [message #654137] Mon, 14 February 2011 10:50 Go to next message
Laurent  is currently offline Laurent Friend
Messages: 2
Registered: February 2011
Junior Member
Hi,
I have a grammar with such a rule:

elem :
	("key1" {Elem}| key2?="key2")
	"elem"
	arg1=(Arg1)?
	arg2=(Arg2)?
	";"
	;


And a formatting configuration :
c.setIndentationDecrement().after(ga.getElemRule());


This work. If I remove the ";" in the grammar (and therefore the elem rule ends with an optional rule call), then the indentation is not decremented (and the rest of the file is therefore incremented).
Is it a know bug ? (I have not found such a bug in the bug list) Is it "feature" and every rule should terminate with a non empty rule ? Is there some thing else that I do not do correctly ?
Re: Formatting and grammar with optional rules [message #654140 is a reply to message #654137] Mon, 14 February 2011 11:04 Go to previous message
Laurent  is currently offline Laurent Friend
Messages: 2
Registered: February 2011
Junior Member
In fact, it seems to be a bug in XText that I had not found in my first try.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=318883
Previous Topic:Customize serialization of a rule?
Next Topic:Compare With feature using DSL Editor
Goto Forum:
  


Current Time: Fri Apr 26 08:30:28 GMT 2024

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

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

Back to the top