About

SDF Language

The SDF syntax definition formalism allows a concise and natural expression of the syntax of a context-free language. SDF integrates lexical and context-free syntax in a single syntax formalism.

The complete syntax of a language is thus defined in a single definition. SDF supports arbitrary context-free grammars. Therefore, SDF does not restrict the grammars to a subclass of the context-free grammars, such as LL or LALR. SDF syntax definitions can be modular. SDF modules can be reused in different syntax definitions.

Disambiguation of grammars is not done by grammar hacking, but by applying special purpose disambiguation facilities in SDF, such as priorities, reject productions, and follow restrictions.

SDF is a declarative language. This means that a syntax definition can be used for different purposes then the usual application: the generation of a parser. Instead, SDF syntax definitions can be used to generate other tools from syntax definitions, e.g. pretty-printers and data type definitions.