How does sdf2table generates a parse table from an SDF syntax definition? Is there any source code about this project?

Asked by ZJG on 31 March 2013 at 05:51

The design and implementation of SDF2, the version of SDF that we are currently using in Spoofax, is described in the dissertation Syntax Definition for Language Prototyping. The algorithm of the parser is described in Chapter 3, aka Scannerless Generalized-LR Parsing. The algorithm for the parser generator is described in Chapter 5, aka A Case Study in Optimizing Parsing Schemata by Disambiguation Filters. Note that the parser generator is a basic SLR(0) generator, the description of which you can find in any text on compilers, with some enhancements to deal with priorities (which is the subject of Chapter 5).

The source code of the SGLR parser and the sdf2table parser generator that implement these ideas are included in the SDF2-bundle tar ball.

Answered by Eelco Visser on 1 April 2013 at 23:42