SDF3
SDF: Modular Syntax Definition Formalism
(note: this is not an official release plan and probably quite out of date. Please update if some info is incorrect!)
Below is a list of considerations for the next generation (version 3) of the Syntax Definition Formalism SDF:
- An improved mechanism to deal with multiple types of layout is desirable
- Idea: No longer specify layout using the sort LAYOUT but rather make layout a parameter of context-free syntax sections
context-free syntax (C-Layout)
foo bar -> C
context-free syntax (Sdf-Layout)
hello world -> Sdf
- In the current version of SDF the priority of alternatives is strange and differs from alternative syntax definition formalisms. A B | C D is grouped as A (B|C) D instead of (A B) | (C D). Can SDF be redesigned to improve this?
- Idea: use explicit sequence operator: A . B | C . D
- What are the top sorts of a grammar? Currently all declared sorts automatically become top sorts. This behavior allows sentences over a sub part of a language to be accepted by the parser. Parsing over a part of a language is required during development of a grammar and corresponding tooling. In general however, the number of top sorts needs to be restricted in order for the parser to only accept sentences that really belong to a language.
- Idea: Add "top sorts" section to SDF
- Idea: Adapt the parser generator to support multiple start states which are independent of the declared top sorts.
- What naming scheme to use to specify and locate Sdf modules?
- Idea: use Java's Internet-wide unique package naming scheme.
imports nl.cwi.gb.sdf.*
nl.cwi.gb.aterms.*
- What flattening methods of lexicals are required?
- Idea: flattening with structure preservation. This approach would for instance preserve the lexical structure of URL's (["http:","//", "www.cwi.nl", "/"])
* Idea: flattening without structure preservation. For example: "http://www.cwi.nl/"
- To decrease the dependency of tools on the abstract syntax format of Sdf and to ease manipulation of Sdf parse trees, an AsFix API is required. This API should provide efficient access functions to AsFix terms and preferably should be generated from the Sdf syntax.
- Do we really need hidden and exported grammars?
Sdf.SDF3 moved from Tools.SDF3 on 09 Feb 2004 - 13:51 by MartinBravenboer