scispace - formally typeset
Search or ask a question

Showing papers on "Context-sensitive grammar published in 1984"



Proceedings ArticleDOI
01 Jun 1984
TL;DR: In this paper, attribute grammars are viewed as specifying translations from source language terms into target language terms, such that they come with an associative composition operation, which allows for a new kind of modularity in compiler specifications.
Abstract: In this paper, attribute grammars are viewed as specifying translations from source language terms into target language terms. The terms are constructed over a hierarchical signature consisting of a semantic and a syntactic part. Attribute grammars are redefined to become morphisms in the category of such signatures, called attribute coupled grammars, such that they come with an associative composition operation. The composition allows for a new kind of modularity in compiler specifications. The paper also discusses properties of the concept with respect to attribute evaluation and application as a tree transformation device.

150 citations


01 Apr 1984
TL;DR: The separation of syntactic and semantic rules is intended to promote modularity, simplicity and clarity of definition, and ease of modification as compared to Definite Clause GramMars, Metamorphosis Grammars, and Restriction GrammARS.
Abstract: In this paper we introduce Definite Clause Translation Grammars, a new class of logic grammars which generalizes Definite Clause Grammars and which may be thought of as a logical implementation of Attribute Grammars. Definite Clause Translation Grammars permit the specification of the syntax and semantics of a language: the syntax is specified as in Definite Clause Grammars; but the semantics is specified by one or more semantic rules in the form of Horn clauses attached to each node of the parse tree (automatically created during syntactic analysis), and which control traversal(s) of the parse tree and computation of attributes of each node. The semantic rules attached to a node constitute therefore, a local data base for that node. The separation of syntactic and semantic rules is intended to promote modularity, simplicity and clarity of definition, and ease of modification as compared to Definite Clause Grammars, Metamorphosis Grammars, and Restriction Grammars.

56 citations


Journal ArticleDOI
TL;DR: This paper examines certain restrictions on NLC grammars similar to the Chomsky or Greibach normal forms for context-free string Grammars, and finds that each of the restrictions causes a reduction in generating power for the grammar.

28 citations


Proceedings ArticleDOI
01 Jun 1984
TL;DR: The experience demonstrates the readability, ease of development, and additional verification available through the use of TT-grammars, a formal description technique for describing transformations from one well-defined language to another.
Abstract: A formal description technique for describing transformations from one well-defined language to another is introduced. A TT-grammar contains context-free grammars for describing the syntax of both languages. The transformation between the languages is described by a relationship of productions from the grammars. The TT-grammar is supported by an automated tool. SSAGS -- a translator writing system based on attribute grammars -- has been extended to support certain classes of TT-grammars. SSAGS analyzes TT-grammars and automatically generates Ada source programs implementing the transformation specified by the TT-grammar. Experience with two different restricted forms of TT-grammars is described with respect to their practical application. The experience demonstrates the readability, ease of development, and additional verification available through the use of TT-grammars.

25 citations


Journal ArticleDOI
TL;DR: It is proved that each recursively enumerable language can be generated by a context-free matrix grammar with appearance checking (using λ-rules) which contains at most: six nonterminal symbols.
Abstract: It is proved that each recursively enumerable language can be generated by a context-free matrix grammar with appearance checking (using λ-rules) which contains at most: six nonterminal symbols, that each linear language can be generated using only two: nonterminals, but there are regular languages which cannot be generated by matrix grammars with only one nonterminal.

24 citations



Journal ArticleDOI
TL;DR: The pushdown tree-to-string transducer with a certain synchronization facility as a model to realize transformations by attribute grammars is proposed and its basic properties using tree-walking finite state automata are studied.
Abstract: The translational mechanism of attribute grammars using tree automata are investigated. The pushdown tree-to-string transducer with a certain synchronization facility as a model to realize transformations by attribute grammars is proposed and its basic properties using tree-walking finite state automata are studied. To demonstrate the utility of this model, it is shown that noncircular attribute grammars are equally powerful as arbitrary attribute grammars, and a method is provided to show that a certain type of transformations is impossible by attribute grammars.

15 citations


Proceedings ArticleDOI
01 Jun 1984
TL;DR: This paper presents a new strategy for evaluating attribute grammars, sub-protocol attribute evaluation, and gives an algorithm for constructing sub- Protocol-evaluators, a refinement of Nielson's direct evaluator.
Abstract: This paper presents a new strategy for evaluating attribute grammars, sub-protocol attribute evaluation, and gives an algorithm for constructing sub-protocol-evaluators. Sub-protocol-evaluators can be built for any non-circular attribute grammar; this paper describes how to construct them for absolutely noncircular grammars [4]. Sub-protocol-evaluators are most easily understood as a simple optimization of another evaluator we call the protocol-evaluator. The protocol-evaluator has elements in common with the tree-walk evaluator of Kennedy-Warren [4] and with Nielson's direct evaluator [6]; it can be viewed as a refinement of each of these. Furthermore, the uniform AGs, proposed by Warren [9], and the ordered AGs, proposed by Kastens [3], are both subclasses of grammars for which especially efficient protocol-evaluators can be built.

14 citations


Proceedings ArticleDOI
01 Jun 1984
TL;DR: Compared with conventional context-free grammars (CFGs), RRP6s are more complex but offer in return several advantages, which improve readability through greater conciseness, avoid over-specification by uslng i t e r a t i o n instead of one-sided recursion.
Abstract: Regular r i gh t -pa r t grammars (RRPGs) are by now the accepted formalism for the d e f i n i t i o n of the context-free syntax of PLs. Compared with conventional context-free grammars (CFGs), RRP6s are more complex but offer in return several advantages. They improve readability through greater conciseness, avoid over-specification by uslng i t e r a t i o n instead of one-sided recursion, and may lead to oarsers more e f f i c i e n t in space and/or time.

13 citations


Book ChapterDOI
01 Jan 1984
TL;DR: DCGs are an extension of the grammar-rule notation in PROLOG , and can be used to parse a string simply by interpreting them in a manner similar to the execution of a Prolog program.
Abstract: A DCG consists of a set of rules in a notation based on logic programming. Each rule is similar to a context-free rule, with variables to show connections between the constituents involved, and an arbitrary test or action can be appended to the rule (for example, to handle number-agreement). DCGs are an extension of the grammar-rule notation in PROLOG , and can be used to parse a string simply by interpreting them in a manner similar to the execution of a Prolog program.

Journal ArticleDOI
TL;DR: This paper shows how a usable sentence generator can be constructed and shows how two-level grammars are very readable formalisms for generating Chomsky Type 0 languages.

Proceedings ArticleDOI
15 Jan 1984
TL;DR: Inverse currying transformations can be used to enhance context sensitive parsing using predicates on attributes, to eliminate sources of backtrack when parsing according to ambiguous grammars, and to facilitate semantics-supported error correction.
Abstract: Inverse currying transformation of an attribute grammar moves a context condition to places in the grammar where the violation of the condition can be detected as soon as the semantic information used in the condition is computed. It thereby takes into account the evaluation order chosen for the attribute grammar. Inverse currying transformations can be used to enhance context sensitive parsing using predicates on attributes, to eliminate sources of backtrack when parsing according to ambiguous grammars, and to facilitate semantics-supported error correction.


Proceedings ArticleDOI
02 Jul 1984
TL;DR: This paper presents a graph grammar formalism and parsing scheme for parsing languages with inherent configurational flavor and a small experimental Finnish parsing system.
Abstract: The structure of many languages with "free" word order and rich morphology like Finnish is rather configurational than linear. Although non-linear structures can be represented by linear formalisms it is often more natural to study multidimensional arrangement of symbols. Graph grammars are a multidimensional generalization of linear string grammars. In graph grammars string rewrite rules are generalized into graph rewrite rules. This paper presents a graph grammar formalism and parsing scheme for parsing languages with inherent configurational flavor. A small experimental Finnish parsing system has been implemented (Hyvonen 1983).

Journal Article
TL;DR: This work presents a modification of the Definite Clause Translation Grammars (Abramson 1984) which is used to logically specify data types as unambiguous context free grammars, and shows how such grammARS can be used to impose a typing system on logic programs.

Journal ArticleDOI
TL;DR: It is shown that the case in which the meta-level rules are of type 3 and the notions at hyper level of type 2 is sufficiently general to generate each member of the family of languages generated by van Wijngaarden grammars.
Abstract: The family of languages generated by van Wijngaarden grammars is considered. The production rules at the meta level as well as the notions at the hyper level are allowed to be of type 0, 1, 2, or 3. The communication between the levels (i.e. the replacement rule) is defined precisely. It is shown that the case in which the meta-level rules are of type 3 and the notions at hyper level of type 2 is sufficiently general to generate each member of the family.


Journal ArticleDOI
01 Sep 1984
TL;DR: This paper introduces a formal method for determining if the production rules in a regular or context free grammar are "connected" and "grounded" and uses it on several occasions in courses on programming language design or language translator implementation to verify that proposed student grammars were reduced.
Abstract: This paper introduces a formal method for determining if the production rules in a regular or context free grammar are "connected" (can appear in a sentential form) and "grounded" (can be driven to a string of terminal symbols). I have used it on several occasions in courses on programming language design or language translator implementation to verify that proposed student grammars were reduced (connected and grounded). The technique is also useful for reviewing matrix algebra and the theory of relations with students. The student must know or be introduced to Warshall's algorithm for generating the transitive closure of a relation [1--4].

Journal ArticleDOI
01 Mar 1984-Calcolo
TL;DR: The field of algorithms specification by means of attribute grammars is investigated with further ideas and examples of syntax-directed translation.
Abstract: Attribute grammars gave rise to a great interest from many authors as a means of specifying syntax-directed translation because of their naturalness and declarative rather then algorithmic character which make the definition of a language easier to understand and more concise. In this paper the field of algorithms specification by means of attribute grammars is investigated with further ideas and examples.