Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333976 - [Serializer] replace backtracking algorithm with declarative approach
Summary: [Serializer] replace backtracking algorithm with declarative approach
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 275855 286947 287804 289037 311165 312554 320984 321618 324297 327038 333022 341815
  Show dependency tree
 
Reported: 2011-01-11 09:30 EST by Moritz Eysholdt CLA
Modified: 2017-09-19 17:07 EDT (History)
1 user (show)

See Also:
moritz.eysholdt: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-01-11 09:30:20 EST
the current serializer's algorithm (backtracking, know as ParseTreeConstructor) has some issues with 
- speed
- memory consumption
- providing error messages
- customization
- maintainability 


As already discussed internally, the proposal is to replace this algorithm with a better approach, which is:

1.) Derive constraints form the grammar, one constraint for each context+EClass. This is similar as currently done by the ConcreteSyntaxConstraintProvider. The CSCP however, can't handle assigned actions. Since bug 327038, however, it has turned out that this is possible.
2.) Turn the semantic model's EObjects into sequences of tokens - based on the constraints.
3.) Use a state machine to mix-in the missing tokens, such as unassigned keywords.
Comment 1 Moritz Eysholdt CLA 2011-01-11 09:31:49 EST
I'll mark existing bugs that will be fixed with the new serializer as to depend on this bug. This will help to understand the impact.
Comment 2 Moritz Eysholdt CLA 2011-10-18 03:46:36 EDT
The new serializer is implemented and does a good Job in Xbase, Xtend2, MWE2 and several other projects already. Time to close this bug.
Comment 3 Sebastian Zarnekow CLA 2011-10-18 03:48:35 EDT
Yeehaa :)
Comment 4 Karsten Thoms CLA 2017-09-19 16:56:19 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:07:17 EDT
Closing all bugs that were set to RESOLVED before Neon.0