Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315431

Summary: FeatureRequest for ability to parse EOF
Product: [Modeling] TMF Reporter: Marco <marco>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: c.b.ainsley, sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: M7   
Hardware: All   
OS: All   
Whiteboard:

Description Marco CLA 2010-06-02 13:17:28 EDT
Build Identifier: 

make EOF available as token for rules e.g. by built-in terminal rule.

Reproducible: Always
Comment 1 Marco CLA 2010-06-02 14:28:47 EDT
Just to add one of thousand use cases:

terminal FINALCOMMENT : "StartTag" -> EOF ;
Comment 2 Chris Ainsley CLA 2011-02-16 21:54:37 EST
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.
Comment 3 Sebastian Zarnekow CLA 2011-04-07 15:09:01 EDT
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.
Comment 4 Sebastian Zarnekow CLA 2011-04-08 05:47:53 EDT
Pushed to master.
Comment 5 Karsten Thoms CLA 2017-09-19 17:05:29 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:17:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0