Double comment bug when using autoformat [message #1031957] |
Tue, 02 April 2013 08:06  |
Eclipse User |
|
|
|
Hi,
when using autoformat via Strg + Shift + F in my ini-Editor some of my comments are doubled. A (minimal) working example seems to be
Using the autoformat command twice will produce
Without the last line (the 'm') this doesn't happen.
My grammar is
grammar iniEditor.INIEditor with org.eclipse.xtext.common.Terminals hidden (INI_COMMENT, WS)
generate iNIEditor "INIEditor.iniEditor"
Domainmodel :
execalls+=ExeCall*
;
ExeCall :
Exe
arguments += Argument*
;
Exe:
'[' name = ID ']'
;
Argument:
(Arg | Def) AGN Argumentstring ('\r'? '\n')?
;
Arg :
name = Name
;
Def :
name = Defname
;
Defname :
'#' Name
;
Name:
ID ('_' INT | '<' INT '>')?
;
Argumentstring:
(ID | STRING | INT | '-' | '%' | '.' | '\\' | '?' | ':' | '*' | '/' | '<>' | '[]' | '{}' | '()')*
;
terminal INI_COMMENT:
';' !('\n'|'\r')* ('\r'? '\n')?
;
terminal AGN:
'='
;
I have no idea why this is happening. As I am new to xtext I don't know whether it is due to my grammar or due to xtext. By the way, is the grammar okay like that or do I make something which should not be done?
Thank you for your help!
Maximilian
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25249 seconds