Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315431 - FeatureRequest for ability to parse EOF
Summary: FeatureRequest for ability to parse EOF
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 13:17 EDT by Marco CLA
Modified: 2017-09-19 17:17 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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