Topic
Context-sensitive grammar
About: Context-sensitive grammar is a research topic. Over the lifetime, 1938 publications have been published within this topic receiving 45911 citations. The topic is also known as: CSG.
Papers published on a yearly basis
Papers
More filters
••
01 Jan 1979
TL;DR: This paper presents a general method of constructing, for any non-circular attribute grammar, a deterministic translator which will perform the semantic evaluation of each syntax tree of the grammar in time linear with the size of the tree.
Abstract: Attribute grammars are an extension of context-free grammars devised by Knuth as a formalism for specifying the semantics of a context-free language along with the syntax of the language. The syntactic phase of the translation process has been extensively studied and many techniques are available for automatically generating efficient parsers for context-free grammars. Attribute grammars offer the prospect of similarly automating the implementation of the semantic phase. In this paper we present a general method of constructing, for any non-circular attribute grammar, a deterministic translator which will perform the semantic evaluation of each syntax tree of the grammar in time linear with the size of the tree. Each tree is traversed in a manner particularly suited to the shape of the tree, yielding a near optimal evaluation order for that tree. Basically, the translator consists of a finite set of "Local Control Automata", one for each production; these are ordinary finite-state acyclic automata augmented with some special features, which are used to regulate the evaluation process of each syntax tree. With each node in the tree there will be associated the Local Control Automaton of the production applying at the node. At any given time during the translation process all Local Control Automata are inactive, except for the one associated with the currently processed node, which is responsible for directing the next steps taken by the translator until control is finally passed to a neighbour node, reactivating its Local Control Automaton. The Local Control Automata of neighbour nodes communicate with each other.The construction of the translator is custom tailored to each individual attribute grammar. The dependencies among the attributes occurring in the semantic rules are analysed to produce a near-optimal evaluation strategy for that grammar. This strategy ensures that during the evaluation process, each time the translator enters some subtree of the syntax tree, at least one new attribute evaluation will occur at each node visited. It is this property which distinguishes the method presented here from previously known methods of generating translators for unrestricted attribute grammars, and which causes the translators to be near-optimal.
23 citations
••
01 Jan 2011TL;DR: A general model for various mechanisms of regulated rewriting based on the applicability of rules is introduced, especially graph-controlled, programmed, matrix, random context, and ordered grammars as well as some basic variants of grammar systems.
Abstract: We introduce a general model for various mechanisms of regulated rewriting based on the applicability of rules, especially we consider graph-controlled, programmed, matrix, random context, and ordered grammars as well as some basic variants of grammar systems. Most of the general relations between graph-controlled grammars, matrix grammars, random-context grammars, and ordered grammars established in this paper are independent from the objects and the kind of rules and only based on the notion of applicability of rules within the different regulating mechanisms and their specific structure in allowing sequences of rules to be applied. For example, graph-controlled grammars are always at least as powerful as programmed and matrix grammars. For the simulation of random context and ordered grammars by matrix and graph-controlled grammars, some specific requirements have to be fulfilled by the types of rules.
23 citations
••
TL;DR: In this paper, the authors present a method and tool for comparing precedence rules of different grammars and parser generators, which is especially useful for reliable migration of a grammar from one grammar formalism to another.
23 citations
••
TL;DR: It is shown that the value-languages of simple-L-attributed grammars are exactly the IO-macrolanguages.
Abstract: By specializing the semantic-rules for attributed context-free grammars introduced by Knuth (Math. Systems Theory 2, 127–145) simple-L-attributed grammars are defined. The translations determined by these grammars are languages called value-languages. In this paper the question of classifying value-languages is considered. It is shown that the value-languages of simple-L-attributed grammars are exactly the IO-macrolanguages.
23 citations
•
IBM1
TL;DR: Grammar-based translation methodologies and RIFs as discussed by the authors have been used to translate between programming languages in the context of RIF grammars and generalizing RIF.
Abstract: Grammar based translation methodologies and RIFs- The inversion of RIF grammars- Generalizing RIFs- The INVERT system- Translating between programming languages- Conclusions and future directions
23 citations