Top-Down Parsing of Conjunctive Languages

نویسنده

  • Alexander Okhotin
چکیده

This paper generalizes the notion of a strong LL(k) context-free grammar for the case of conjunctive grammars and develops a top-down parsing algorithm for the resulting language family. A top-down parser of a conjunctive language attempts to construct a derivation of the input string, at each step using a nite lookahead to determine which grammar rule to apply. Fragments of formulae that form the derivation are stored in a tree-structured pushdown. Two ways to implement top-down parsers are suggested: a table-driven parser with a tree-structured pushdown and a recursive descent parser. Both techniques naturally extend their context-free counterparts.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Top-Down Parsing with Parsing Contexts A Simple Approach to Context-Sensitive Parsing

The domain of context-free languages has been extensively explored and there exist numerous techniques for parsing (all or a subset of) context-free languages. Unfortunately, some programming languages are not context-free. Using standard context-free parsing techniques to parse a context-sensitive programming language poses a considerable challenge. Implementors of programming language parsers...

متن کامل

Technical Correspondence: Techniques For Automatic Memoization With Applications To Context-Free Parsing

It is shown that a process similar to Earley's algorithm can be generated by a simple top-down backtracking parser, when augmented by automatic memoization. The memoized parser has the same complexity as Earley's algorithm, but parses constituents in a different order. Techniques for deriving memo functions are described, with a complete implementation in Common Lisp, and an outline of a macro-...

متن کامل

Error Reporting in Parsing Expression Grammars

Parsing Expression Grammars (PEGs) describe top-down parsers. Unfortunately, the errorreporting techniques used in conventional top-down parsers do not directly apply to parsers based on Parsing Expression Grammars (PEGs), so they have to be somehow simulated. While the PEG formalism has no account of semantic actions, actual PEG implementations add them, and we show how to simulate an error-re...

متن کامل

Definite-Clause Set Grammars: A Formalism for Problem Solving

D First, we present definite-clause set grammars (DCSG), a DCG-like formalism for free-word-order languages. The DCSG formalism is well suited for problem solving. By dealing with DCSG as a generalized parsing problem, we avoid a certain type of looping problem in backward chaining. Next, we extend DCSG by viewing grammar rules as definitions for set conversions. In order to realize inverse con...

متن کامل

Defining and Parsing Visual Languages with Layered Graph Grammars

Sentences of Visual Languages (VLs) may often be regarded as assemblies of pictorial objects with spatial relationships like “above” or “contains” between them, i.e. their representations are a kind of directed graphs. Such a spatial relationship graph is often complemented by a more abstract graph, which provides information about the syntax (and the semantics) of the visual sentence in a more...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Grammars

دوره 5  شماره 

صفحات  -

تاریخ انتشار 2002