Described is a method for syntactic error recovery that is compatible with deterministic parsing methods and that is able to recover from many errors more quickly than do other schemes because it performs global context recovery. The method relies on fiducial symbols, which are typically reserved key words of a language, to provide mileposts for error recovery. The method has been applied to LL(1) parsers, for which a detailed algorithm is given, and informally proved correct. The algorithm will always recover and return control to the parser if the text being analyzed satisfies only minimal requirements: that it contains one or more occurrences of fiducial symbols following the point at which an error is detected. Tables needed for error recovery have been automatically generated, along with parsing tables, by a parser constructor for the LL(1) grammars.A theoretical characterization of fiducial symbols is given, and the utility of this characterization in practice is discussed. It has been applied to a grammar for the programming language Pascal to aid in selection of a set of fiducial symbols. The error recovery scheme has been tested on a set of studentwritten Pascal program texts and is compared with other error recovery strategies.
No abstract
The G-machine is an abstract architecture for evaluating functional-language programs by programmed graph reduction. Unlike combinator reduction, in which control is derived dynamically from the expression graph itself, control in programmed graph reduction is specified by a sequence of instructions derived by compiling an applicative expression.The G-machine architecture was defined by Thomas Johnsson and Lennart Augustsson (Gothenburg) as the evaluation model for a compiler for a dialect of NIL with lazy evaluation rules. This paper describes a sequential evaluator based upon that abstract architecture. It discusses performance issues affecting reduction architectures, then describes the organization of a hardware design to address these issues. The interplay between compilation strategies and the computational engine is exploited in this design.Principal features of the design are (i) hardware support for graph traversal, (ii) a vertically microcoded, pipelined internal architecture, (iii) an instruction fetch and translation unit with very low latency, and (iv) a new memory architecture, one specifically suited to graph reduction and which can be extended to very large memories. Reduction systemsA reduction architecture evaluates an expression by transforming it through a series of intermediate forms until it cannot be further transformed, under a set of rewrite rules. The expression is then said to be in normal form, which is the value attributed to the original expression.To be deemed useful for evaluating functional-language programs, a reduction system must be consistent with the mathematical semantics of applicative expressions. It should also have the Church-Rosser property, which assures the uniqueness of a normal form independent of the particular reduction sequence by which it is produced. These, however, are the only constraints placed upon reduction systems, and a great variety of elegant and imaginative schemes are possible.Church's lambda-calculus and Curry's combinatory calculus are the best known examples of reduction systems, and have served as abstract models for experimental computing engines [Ber75, Cla80, SCN84, Sch85]. There are other systems as well. A string-reduction system implementing the semantics of Backus' metalanguage FFP has been used as the basis for an architecture allowing massive parallelism [Mag79]. String reduction is essentially like combinator reduction except that the value of an expression is not shared among multiple references; the expression is multiply evaluated.Architectures based upon ¢?-reduction (lambda-calculus), combinator reduction, or string reduction all have in common the property that control --the selection of the next reduction step --is dynamically derived from the current expression form at each stage in a reduction sequence. We call systems with this property pure reduction systems.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.