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

Bug 333976

Summary: [Serializer] replace backtracking algorithm with declarative approach
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: moritz.eysholdt: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 275855, 286947, 287804, 289037, 311165, 312554, 320984, 321618, 324297, 327038, 333022, 341815    

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