scispace - formally typeset
Search or ask a question

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


01 Jul 1979
TL;DR: Parsing--Overview of Parsing Techniques; Augmented Transition Nets; The General Syntactic Processor; Text Generation; Natural Language Processing Systems--Early Natural Language Systems; Wilk's Mechanical Translation System; LUNAR, SHRDLU, MARGIE, SAM and PAM, LIFER.
Abstract: : Contents: Natural Language Processing Overview; Mechanical Translation, Grammars--Formal Grammars; Transformational Grammars; Systemic Grammar; Case Grammar; Parsing--Overview of Parsing Techniques; Augmented Transition Nets; The General Syntactic Processor; Text Generation; Natural Language Processing Systems--Early Natural Language Systems; Wilk's Mechanical Translation System; LUNAR, SHRDLU, MARGIE, SAM and PAM, LIFER.

67 citations


Journal ArticleDOI
TL;DR: SummaryExtended context free grammars are obtained by allowing regular expressions on the right hand sides of production rules of context free Grammars by defining canonical transformations of extended grammARS into context freegrammars.
Abstract: Extended context free grammars are obtained by allowing regular expressions on the right hand sides of production rules of context free grammars. The LR(k) and LL(k) conditions are made applicable to these grammars by defining canonical transformations of extended grammars into context free grammars.

24 citations


Journal ArticleDOI
TL;DR: It is shown that deterministic bottom-up parsing of a predictive LR( k) grammar can be done by the LL(k) parser of the transformed grammar, and this parsing method is possible since the transformation always ‘left-to-right covers’ the original grammar.
Abstract: A new method for transforming grammars into equivalent LL(k) grammars is studied. The applicability of the transformation is characterized by defining a subclass of LR(k) grammars, called predictive LR(k) grammars, with the property that a grammar is predictive LR(k) if and only if the corresponding transformed grammar is LL(k). Furthermore, it is shown that deterministic bottom-up parsing of a predictive LR(k) grammar can be done by the LL(k) parser of the transformed grammar. This parsing method is possible since the transformed grammar always `left-to-right covers' the original grammar. The class of predictive LR(k) grammars strictly includes the class of LC(k) grammars (the grammars that can be parsed deterministically in the left-corner manner). Thus our transformation is more powerful than the one previously available, which transforms LC(k) grammars into LL(k) form.

24 citations


Proceedings ArticleDOI
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


Journal ArticleDOI
TL;DR: It is proved that the generative capacity of context-free and of regular grammars is increased in this way, while for type-0 and type-1 Grammars the generatives capacity is not modified.
Abstract: A conditional grammar is a Chomsky grammar with languages associated to its rules such that each rule is applicable only to words in the corresponding language. In this paper the generative capacity of type 0, 1, 2, 2 — λ , 3 grammars with associated type 0, 1, 2, 3 languages will be characterized in terms of the Chomsky hierarchy. We shall prove that the generative capacity of context-free and of regular grammars is increased in this way, while for type-0 and type-1 grammars the generative capacity is not modified. Two other variants of these grammars are shown to be equivalent with them.

22 citations


Journal ArticleDOI
TL;DR: The decidability of whether or not a grammar is LL -regular for a particular regular partition, which was first stated by Nijholt, and the undecidability are proved.

21 citations


Proceedings ArticleDOI
01 Aug 1979
TL;DR: Aparse is a flexible and modular system for generating efficient one-pass compilers from attributed grammar specifications that incorporates attribute values in the parsing function and permits smaller grammars to be used, and smaller parsers to be generated.
Abstract: Aparse is a flexible and modular system for generating efficient one-pass compilers from attributed grammar specifications. The system is of particular interest in that it combines recent research in attributed parsing and error-correction into a powerful and practical tool.It has been amply demonstrated that attributed grammars are a convenient mechanism for organizing translations ([Fan 72], [LRS 74], [Bra 76]). This is partially due to the fact that an attributed grammar is not a completely formal specification tool—it merely provides a framework for structuring a semantic and syntactic specification. A number of compiler-compilers have been written to process attributed grammars ([LB 74], [BW 78], [GRW 77]), but Aparse is unique in incorporating attribute values in the parsing function. We have found that this facility permits smaller grammars to be used, and smaller parsers to be generated. In addition, a significant degree of context-sensitivity can be reflected in what is essentially a context-free framework. Section 2 will contain a brief introduction to attributed grammars, and section 3 will sketch the theory of attributed parsing.

19 citations


Journal ArticleDOI
TL;DR: Macro grammars and context-free tree Grammars are discussed in which a bound is put on the nesting-depth of nested calls of nonterminals on the basis of dynamic or static restrictions.
Abstract: Macro grammars and context-free tree grammars are discussed in which a bound is put (dynamically or statically) on the nesting-depth of nested calls of nonterminals. The dynamic and static restrictions are closely related (and both are related to the nested stack automaton with bounded nesting of stacks). The corresponding classes of tree languages have derivation bounded contextfree languages as path-languages. Macro languages exist which cannot be generated by nesting-depth bounded macro grammars.

13 citations


Journal ArticleDOI
TL;DR: A new procedure for finding right-linear grammars for coded, observed sequences of behavioural actions, written in Fortran to facilitate grammatical analysis is reported.

13 citations


Journal ArticleDOI
TL;DR: The generative capacity of tree controlled context-free, λ-free context- free, and regular grammars with type-i control language, i=0, 1, 2, 3, 4 (i=4 stands for finite languages) is investigated.
Abstract: We investigate the generative capacity of tree controlled context-free, λ-free context-free, and regular grammars with type-i control language,i=0, 1, 2, 3, 4 (i=4 stands for finite languages).

12 citations


Journal ArticleDOI
TL;DR: Two new proofs of the fact that proper left-recursive grammars can be covered by non-left-recursions are presented, based on a simple trick and a new method for eliminating left recursion from a proper context-free grammar.

Journal ArticleDOI
TL;DR: It is shown that extended macro Grammars have the same language generating power as (parallel) iteration grammars and can be formulated using iterated substitution using IO and OI versions.
Abstract: Extended macro grammars (of the linear basic type only) are introduced as a generalization of those in [5], and it is shown that they have the same language generating power as (parallel) iteration grammars. In particular the IO and OI versions of extended macro grammars correspond to the deterministic and the (usual) nondeterministic iteration grammars respectively. Hence iterated substitution can be formulated using extended macro grammars. A nondeterministic register program without tests may be viewed as a macro grammar. IO-extension of this macro grammar corresponds to the use of nonrecursive function procedures in the register program. OI-extended macro grammars correspond to register programs which compute on sets. Hence these features of register programs can be investigated by means of (extended) parallel rewriting systems.

Book ChapterDOI
TL;DR: This paper is the first part of an approach to extend the class of languages parsable by the method of recursive descent (without backup) to all deterministic context-free languages.

Book ChapterDOI
16 Jul 1979
TL;DR: A parser which makes efficient use of the wealth of syntactic information available in the attributes of an attributed grammar is defined, and it is found that, with contextual predicates, ALL(k) grammars can naturally express context-sensitive syntax, and can significantly reduce the size of context-free Grammars.
Abstract: We have defined a parser which makes efficient use of the wealth of syntactic information available in the attributes of an attributed grammar. Moreover, we have found that, with contextual predicates, ALL(k) grammars can naturally express context-sensitive syntax, and, with disambiguating predicates, can significantly reduce the size of context-free grammars.

Book ChapterDOI
16 Jul 1979
TL;DR: Bracketed two-level grammars as mentioned in this paper are a generalization of the van Wijngaarden Grammars, and they are decidable and include EXSPACE.
Abstract: Bracketed two-level grammars are not a variation of two-level grammars (van Wijngaarden grammars) but consitute a restriction within the general scheme. The resulting grammars give rise to an effective top-down analysis, where the replacement of metanotions is governed by rules similar to the evaluation dependencies in attribute grammars. Supplemented by the formalized concept of predicates, the class of languages is shown to be decidable and includes EXSPACE. Moreover it has been demonstrated by a description of PASCAL-S, that the grammars are versatile enough to yield quite readable formal definitions of programming languages. To allow a critical comparison, a grammar for the syntax of ASPLE is given in an Appendix.

Journal ArticleDOI
TL;DR: It is shown that the set of grammatical trees of a context-free grammar satisfies this left part property if and only if the context- free grammar is a left part grammar.

Journal ArticleDOI
TL;DR: It is shown that recursively enumerable languages possess a very strong representation in the class of scattered context languages, which supports in some sense the conjecture that theclass of scatteredcontext languages equals the classof context sensitive languages.

Journal ArticleDOI
TL;DR: It is shown that for a left-regular grammar G the authors can obtain a right-Regular grammar G’ (which is by definition in Greibach normal form) which left-to-right covers G (in this case left parses of G�’ can be mapped by a homomorphism on right parsers of G).

Journal ArticleDOI
TL;DR: This paper investigates some methods for proving the equivalence of different language specifications that are given in terms of attribute grammars, and discusses several propositions that give sufficient conditions for one attribute grammar to be semantically covered by the other one.
Abstract: This paper investigates some methods for proving the equivalence of different language specifications that are given in terms of attribute grammars. Different specifications of the same language may be used for different purposes, such as language definition, program verification, or language implementation. The concept of syntactic coverings is extended to the semantic part of attribute grammars. Given two attribute grammars, the paper discusses several propositions that give sufficient conditions for one attribute grammar to be semantically covered by the other one. These tools are used for a comparison of two attribute grammars that specify syntax and semantics of mixed-type expressions. This example shows a trade-off between the complexity of syntactic and semantic specifications. Another example discussed is the equivalence of different attribute grammars for the translation of the while-statement, as used in compilers for top-down and bottom-up syntax analysis.

Journal ArticleDOI
TL;DR: It is proved that some unambiguous example grammars cannot have covering Grammars of the types mentioned, and a related notion called weak covering is introduced, which allows the results to be formulated more generally.

Journal Article
TL;DR: It is shown that if the transformation is applied to a strict deterministic grammar, the newly obtained grammar in Greibach normal form is also strict Deterministic.
Abstract: A new method is presented to transform non-left-recursive grammars to grammars in Greibach normal form. It is shown that if the transformation is applied to a strict deterministic grammar, the newly obtained grammar in Greibach normal form is also strict deterministic.

Journal ArticleDOI
TL;DR: An approach is described in this paper for realizing attribute grammars based on the STAGE2 macroprocessor that is simple, portable, can run even on small machines, can be quickly implemented and has a convenient to the user metalanguage.
Abstract: An approach is described in this paper for realizing attribute grammars. A system called STAR has been implemented according to this approach. The system is based on the STAGE2 macroprocessor. It is simple, portable, it can run even on small machines, it can be quickly implemented and it has a convenient to the user metalanguage. The system, however, disregards efficiency and is limited to small size problems.

Journal ArticleDOI
TL;DR: It can be shown that every simple chain grammar has an equivalent simple LL(1) grammar.

Journal ArticleDOI
TL;DR: It is shown that SVMT-bounded Grammars generate only context free languages, and that all context free grammars can be converted to equivalent SVMT -boundedgrammars.
Abstract: The concept of SVMT-bounded grammars is introduced. It is shown that SVMT-bounded grammars generate only context free languages, and that all context free grammars can be converted to equivalent SVMT-bounded grammars. It is also shown that the property of SVMT-boundedness can sometimes be used to conclude that a given language is context free while certain previous results cannot be used for this purpose.

Journal ArticleDOI
TL;DR: It is demonstrated that a transformation from a non-left-recursive context-free grammar to a Greibach normal form grammar cannot only be ambiguity preserving, but also both cover and functor relations between grammars or their associated syntax-categories can be obtained from such a transformation.
Abstract: Attention is paid to structure preserving properties of transformations from a non-leftrecursive context-free grammar to a Greibach normal form grammar. It is demonstrated that such a transformation cannot only be ambiguity preserving, but also both cover and functor relations between grammars or their associated syntax-categories can be obtained from such a transformation.

Book ChapterDOI
16 Jul 1979
TL;DR: It has been shown that in the case of a repetition-free and regular based two-level grammar one can always solve the equations assigned to each derivation of the resulting CF grammar, which suggests an approach to the parsing problem of two- level grammars based on well known methods for CF grammar and the algorithm presented.
Abstract: The paper gives another understanding of the two-level grammar formalism: any two-level grammar can be splitted into two parts — a context-free "syntax" and an equational "semantics". It has been shown that in the case of a repetition-free and regular based two-level grammar one can always solve the equations assigned to each derivation of the resulting CF grammar. This suggests an approach to the parsing problem of two-level grammars based on well known methods for CF grammars and the algorithm presented. The approach may occur efficient however, only if some restrictions are imposed on two-level grammars. One sort of restrictions we have discussed in the paper (repetition-free and regular based grammars). Others should result from the requirements of programming languages. For example, one obvious requirement is that two-level grammars should be (semanticaly) unambiguous, i.e., here — in terms of the corresponding CF grammars and equations — that each set of equations has at most one solution.

Journal ArticleDOI
TL;DR: The purpose of this note is to present a new definition for simple precedence grammars which is easier to handle being weaker than, yet equivalent to the definition found in the literature.
Abstract: The purpose of this note is to present a new definition for simple precedence grammars which is easier to handle being weaker than, yet equivalent to the definition found in the literature. It is also more in line with other definitions of linear time parsable grammar classes.

Journal ArticleDOI
TL;DR: A method is presented that for each class of K-iteration grammars provides a class of acceptors for the corresponding class of languages, and it is shown that a simple (and natural) extension of a PDA2model yields aclass of acceptor for the class of recursively enumerable languages.
Abstract: The classes of languages accepted by (unrestricted) PAC machines and (unrestricted) PDA2machines are characterized. Several extentions of the PAC machine model are defined and in particular: (i) a method is presented that for each class of K-iteration grammars provides a class ofacceptors for the corresponding class of languages, and (ii) it is shown that a simple (and natural) extension of a PDA2model yields a class of acceptors forthe class of recursively enumerable languages.

Journal ArticleDOI
TL;DR: Formal specifications are presented for the complete syntax and semantics of an ALGOL-like language fragment, using a recently introduced definitional technique employing two-level grammars (W-grammars).