83,635 research outputs found

    Simple chain grammars and languages

    Get PDF
    A subclass of the LR(0)-grammars, the class of simple chain grammars is introduced. Although there exist simple chain grammars which are not LL(k) for any k>0, this new class of grammars is very closely related to the LL(1) and simple LL(1) grammars. In fact it can be shown that every simple chain grammar has an equivalent simple LL(1) grammar. Cover properties for simple chain grammars are investigated and a deterministic pushdown transducer which acts as a right parser for simple chain grammars is presented

    Wirth BNF Grammars [retrieved from

    Get PDF
    Wirth uses his own meta language to define its own syntax (and serve as an example of its use): grammar = { production}. production = identifier "= " expression ".". expression = term { "| " term}. term = factor { factor}. factor = identifier | literal | "( " expression ") " | "[ " expression "] " | "{ " expression "}". literal = """ " character { character} """". The word identifier is used to denote a nonterminal symbol, and literal denotes a terminal symbol. For brevity, identifier and character are not further defined. Repetition is denoted by curly braces, i.e., { a} denotes: empty, a, aa,.... Optionality is expressed by square brackets, i.e., [ a] denotes a or empty. Parentheses merely serve for grouping, i.e., ( a | b) c stands for: a c | b c. Terminal symbols are either literals, i.e., are enclosed in quote marks or are identifiers which do not appear on the left hand side of the metasymbol =. If a quote mark appears a a literal itself, then it is written twice (as is common in many programming languages). As a machine readable form, I have added the following additional properties to Wirth BNF grammars: Each production must start on a new line and may not have leading spaces. Each symbol, whether meta, terminal, or nonterminal, must be separated from all other symbols by spaces, except the terminating period. Productions may be freely continued on a new line; for readability these lines are often indented. Grammars may contain comments, which are lines which begin with a #, followed by a space. The remainder of the line is ignored. Grammars may contain blank lines to improve readability. Note that the spacing permits convenient processing by simple awk scripts

    A survey of normal form covers for context-free grammars

    Get PDF
    An overview is given of cover results for normal forms of context-free grammars. The emphasis in this paper is on the possibility of constructing É›-free grammars, non-left-recursive grammars and grammars in Greibach normal form. Among others it is proved that any É›-free context-free grammar can be right covered with a context-free grammar in Greibach normal form. All the cover results concerning the É›-free grammars, the non-left-recursive grammars and the grammars in Greibach normal form are listed, with respect to several types of covers, in a cover-table

    The formal power of one-visit attribute grammars

    Get PDF
    An attribute grammar is one-visit if the attributes can be evaluated by walking through the derivation tree in such a way that each subtree is visited at most once. One-visit (1V) attribute grammars are compared with one-pass left-to-right (L) attribute grammars and with attribute grammars having only one synthesized attribute (1S).\ud \ud Every 1S attribute grammar can be made one-visit. One-visit attribute grammars are simply permutations of L attribute grammars; thus the classes of output sets of 1V and L attribute grammars coincide, and similarly for 1S and L-1S attribute grammars. In case all attribute values are trees, the translation realized by a 1V attribute grammar is the composition of the translation realized by a 1S attribute grammar with a deterministic top-down tree transduction, and vice versa; thus, using a result of Duske e.a., the class of output languages of 1V (or L) attribute grammars is the image of the class of IO macro tree languages under all deterministic top-down tree transductions

    Regularly Controlled Bidirectional Linear Basic Grammars

    Get PDF
    We investigate the bidirectional application of grammar productions -- i.e., using the productions in the reversed direction too -- to linear basic grammars. As in the case of regularly controlled bidirectional context-free grammars (or RCB grammars), we provide bidirectional linear basic grammars with a regular control language over the rules (i.e., productions and their corresponding reductions). Our main result shows that under the so-called RS/B/f-mode of derivation, bidirectionality gives rise to a dramatic increase in generating power compared with (regularly controlled unidirectional) linear basic grammars.\ud \u

    The Grail theorem prover: Type theory for syntax and semantics

    Full text link
    As the name suggests, type-logical grammars are a grammar formalism based on logic and type theory. From the prespective of grammar design, type-logical grammars develop the syntactic and semantic aspects of linguistic phenomena hand-in-hand, letting the desired semantics of an expression inform the syntactic type and vice versa. Prototypical examples of the successful application of type-logical grammars to the syntax-semantics interface include coordination, quantifier scope and extraction.This chapter describes the Grail theorem prover, a series of tools for designing and testing grammars in various modern type-logical grammars which functions as a tool . All tools described in this chapter are freely available

    CHR Grammars

    Full text link
    A grammar formalism based upon CHR is proposed analogously to the way Definite Clause Grammars are defined and implemented on top of Prolog. These grammars execute as robust bottom-up parsers with an inherent treatment of ambiguity and a high flexibility to model various linguistic phenomena. The formalism extends previous logic programming based grammars with a form of context-sensitive rules and the possibility to include extra-grammatical hypotheses in both head and body of grammar rules. Among the applications are straightforward implementations of Assumption Grammars and abduction under integrity constraints for language analysis. CHR grammars appear as a powerful tool for specification and implementation of language processors and may be proposed as a new standard for bottom-up grammars in logic programming. To appear in Theory and Practice of Logic Programming (TPLP), 2005Comment: 36 pp. To appear in TPLP, 200

    Introducing the Concept of Activation and Blocking of Rules in the General Framework for Regulated Rewriting in Sequential Grammars

    Get PDF
    We introduce new possibilities to control the application of rules based on the preceding application of rules which can be de ned for a general model of sequential grammars and we show some similarities to other control mechanisms as graph-controlled grammars and matrix grammars with and without applicability checking as well as gram- mars with random context conditions and ordered grammars. Using both activation and blocking of rules, in the string and in the multiset case we can show computational com- pleteness of context-free grammars equipped with the control mechanism of activation and blocking of rules even when using only two nonterminal symbols

    Weakly Restricted Stochastic Grammars

    Get PDF
    A new type of stochastic grammars is introduced for investigation: weakly restricted stochastic grammars. In this paper we will concentrate on the consistency problem. To find conditions for stochastic grammars to be consistent, the theory of multitype Galton-Watson branching processes and generating functions is of central importance.\ud The unrestricted stochastic grammar formalism generates the same class of languages as the weakly restricted formalism. The inside-outside algorithm is adapted for use with weakly restricted grammars
    • …
    corecore