2005Unpublished venueRequires access

Boolean grammars: expressive power and parsing algorithms

Kai Salomaa, Alexander Okhotin

Open publisher page 0 citations

Abstract

Context-free grammars are extended with Boolean operations, yielding a new language specification formalism named Boolean grammars. By virtue of having been produced out of two intuitively clear fundamental concepts, Boolean grammars retain some of their genuine clarity, at the same time allowing to express more than could be expressed using the context-free grammars. The semantics of the formalism is defined using language equations. As a by-product of this definition, the fundamentals of the theory of language equations with Boolean operations are established. Various sample grammars are given, ranging from the descriptions of the standard examples of non-context-free languages to a complete specification of the syntax of a simple imperative programming language. This shows Boolean grammars to be a sufficiently potent tool for language specification. At the same time, the major context-free parsing techniques, such as recursive descent, generalized LR and the Cocke-Kasami-Younger tabular algorithm, are demonstrated to have extensions for Boolean grammars. Several practically usable parsing algorithms for Boolean grammars are constructed and implemented in a research-oriented parser generator. It is shown that the increased expressive power of Boolean grammars does not demand sacrifices in terms of parsing complexity. It is proved that the languages generated by Boolean grammars are context-sensitive. One more class of grammars, called dual concatenation grammars, is introduced and shown to be equivalent to Boolean grammars. A subclass of Boolean grammars, the linear Boolean grammars, is shown to be computationally equivalent to trellis automata and to linear conjunctive grammars.

About this research paper

What this paper is about

Context-free grammars are extended with Boolean operations, yielding a new language specification formalism named Boolean grammars. By virtue of having been produced out of two intuitively clear fundamental concepts, Boolean grammars retain some of their genuine clarity, at the same time allowing to express more than could be expressed using the context-free grammars. The semantics of the formalism is defined using language equations. As a by-product of this definition, the fundamentals of the theory of language equations with Boolean operations are established. Various sample grammars are given, ranging from the descriptions of the standard examples of non-context-free languages to a complete specification of the syntax of a simple imperative programming language. This shows Boolean grammars to be a sufficiently potent tool for language specification. At the same time, the major context-free parsing techniques, such as recursive descent, generalized LR and the Cocke-Kasami-Younger tabular algorithm, are demonstrated to have extensions for Boolean grammars. Several practically usable parsing algorithms for Boolean grammars are constructed and implemented in a research-oriented parser generator. It is shown that the increased expressive power of Boolean grammars does not demand sacrifices in terms of parsing complexity. It is proved that the languages generated by Boolean grammars are context-sensitive. One more class of grammars, called dual concatenation grammars, is introduced and shown to be equivalent to Boolean grammars. A subclass of Boolean grammars, the linear Boolean grammars, is shown to be computationally equivalent to trellis automata and to linear conjunctive grammars.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

Context-free grammars are extended with Boolean operations, yielding a new language specification formalism named Boolean grammars. By virtue of having been produced out of two intuitively clear fundamental concepts, Boolean grammars retain some of their genuine clarity, at the same time allowing to express more than could be expressed using the context-free grammars. The semantics of the formalism is defined using language equations. As a by-product of this definition, the fundamentals of the theory of language equations with Boolean operations are established. Various sample grammars are given, ranging from the descriptions of the standard examples of non-context-free languages to a complete specification of the syntax of a simple imperative programming language. This shows Boolean grammars to be a sufficiently potent tool for language specification. At the same time, the major context-free parsing techniques, such as recursive descent, generalized LR and the Cocke-Kasami-Younger tabular algorithm, are demonstrated to have extensions for Boolean grammars. Several practically usable parsing algorithms for Boolean grammars are constructed and implemented in a research-oriented parser generator. It is shown that the increased expressive power of Boolean grammars does not demand sacrifices in terms of parsing complexity. It is proved that the languages generated by Boolean grammars are context-sensitive. One more class of grammars, called dual concatenation grammars, is introduced and shown to be equivalent to Boolean grammars. A subclass of Boolean grammars, the linear Boolean grammars, is shown to be computationally equivalent to trellis automata and to linear conjunctive grammars.

Key concepts: Indexed grammar, Phrase structure grammar, Context-sensitive grammar, Tree-adjoining grammar, Definite clause grammar, Computer science, L-attributed grammar, Context-free grammar

Related papers

Back to paper searchBrowse research topicsOriginal source
Boolean grammars: expressive power and parsing algorithms — Research Paper | ScholarLens