Two-level Grammar as a Functional Programming Language

From MaRDI portal





A two-level grammar consists of two context-free grammars interacting in a manner such that their combined computing power is equivalent to that of a Turing machine. We show that two-level grammar can be used as a functional programming language where the two-level grammar notation is the syntax of the language. Two-level grammar programs as represented are actually high-level descriptions of recursive functions, with one level of the grammar specifying the function domains and the second level defining the function evaluation rules. A general algorithm to interpret two-level grammars is given to make two- level grammar programs executable. The primary advantages of two-level grammar over other functional programming languages are (1) the capability for data and procedural abstraction provided by the different levels of the grammar and (2) the structured form of natural language which is used as the two-level grammar syntax, making two-level grammar programs very readable.











This page was built for publication: Two-level Grammar as a Functional Programming Language

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q3815542)