grammar [message #1070748] |
Thu, 18 July 2013 11:31  |
Eclipse User |
|
|
|
HI,
Has anyone try to define a grammar rule which could accept any characters?
I am trying, but cannot do it myself:
I want define a single rule for all content, and each line of content would be one element. Then use the framework provided by xtext to do the content assist, coloring, validation and so on...
However, I have no idea to define such a rule:
('a'..'z'|'A'..'Z'|'#'|'!') (.)+ ('\r\n'|'\n')
this could do a similar job, but each line is not recognized in this rule until seeing ('\r\n'|'\n'). so the content assist cannot be applied.
BTW, how can I not to use the default terminal rules? removing "with org.eclipse.xtext.common.Terminals" will lead to the disability of defining new terminal rule.
Many Thanks
sincerely,
YM
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11486 seconds