| Summary: | FeatureRequest for ability to parse EOF | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Marco <marco> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | c.b.ainsley, sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Marco
Just to add one of thousand use cases: terminal FINALCOMMENT : "StartTag" -> EOF ; I also require EOF parsing as I have a situation where I have a group ending marker that is a backslash followed by (EOL|EOF). That is key = \ <-- backslash+EOL is start of group valuetext\ <-- backslash+EOL OR EOF is end of group At the moment, I have to manually ensure that I add an EOL at the bottom of every file to prevent a parse exception. We need an EOF token in order to fix the partitioning in Xtend2 which in turn fixes some auto edit issues.
@Chris:
EOL can already be parsed. It is possible to use ('\r'? '\n' | '\r') to match EOL.
I implemented EOF similar to what we did for the terminal wildcard. That is:
^EOF: {^EOF} 'EOF';
It is only allowed to use EOF in terminal rules.
Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |