Incremental analysis of real programming languages

  title={Incremental analysis of real programming languages},
  author={Tim A. Wagner and Susan L. Graham},
  booktitle={PLDI '97},
A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. [] Key Method Our algorithm combines Tomita's generalized LR parser with reuse of entire subtrees via state-matching. Disambiguation can occur statically, during or after parsing, or during semantic analysis (using existing incremental techniques); program errors that preclude disambiguation retsin multiple interpretations indefinitely. Our representation and analyses gain efficiency by…

Figures and Tables from this paper

Editing composed languages
An incremental parser is extended to create an approach that bridges the two extremes: an editor that ‘feels’ like a normal text editor, but always operates on a valid tree as in syntax-directed editing, which allows users to compose arbitrary syntaxes.
Practical algorithms for incremental software development environments
An integrated collection of algorithms and data structures to serve as the basis for a practical incremental software development environment and provides the first known method for handling C, C++, COBOL, and FORTRAN in an incremental framework derived from formal specifications.
Handling the Complexities of a Real-World Language: A Harmonia Language Module for C
By resolving syntactic ambiguities during name resolution, it is described how a ‚ex-based lexer, an ambiguous context-free grammar, and an objectoriented syntax-tree based analysis can be built to function well in a text editor or other interactive environment.
Approximating Context-Free Grammars for Parsing and Verification. (Approximation de grammaires algébriques pour l'analyse syntaxique et la vérification)
The grammar approximation technique discussed in the thesis is applied to nondeterminism and ambiguity issues in two different ways, one for the generation of noncanonical parsers, and the other for ambiguity detection in itself, with the insurance that a grammar reported as unambiguous is actually so.
Design of methodology for incremental compiler construction
The methodology design for the incremental compiler construction is based on the known algorithms for standard compiler construction and derived for both groups of languages, and tries to solve the problem of the incremental semantic analysis.
Context-aware scanning and determinism-preserving grammar composition, in theory and practice
This thesis presents three innovations that are a large step towards eliminating parsing as an Achilles’ heel in this application, including a new algorithm of scanning called context-aware scanning, in which the scanner at each scan is made aware of what sorts of tokens are recognized as valid by the parser at that point.
Decorating tokens to facilitate recognition of ambiguous language constructs
This paper describes the use of token decoration to facilitate recognition of ambiguous language constructs and describes the implementation of a parser front‐end for C++, keystone, and the results in decorating tokens.
A Computer Language Transformation System Capable of Generalized Context-Dependent Parsing
A design of a new computer language transformation system with a focus on enhancing the parsing system to support generalized context-dependent parsing and design a transformation language that is closer to general-purpose programming languages, yet enables common transformation techniques.
Parsing in a hostile world
  • D. Blasband
  • Computer Science
    Proceedings Eighth Working Conference on Reverse Engineering
  • 2001
The paper describes a formalization and development effort aimed at automating the production of parsers for languages for which the common classifications, and even the common division of labor between lexical and syntactical analysis, do not apply.
Language Analysis and Tools for Ambiguous Input Streams
  • A. Begel, S. Graham
  • Computer Science, Linguistics
    Electron. Notes Theor. Comput. Sci.
  • 2004


Efficient and flexible incremental parsing
The approach extends the theory of sentential-form parsing to allow for ambiguity in the grammar, exploiting it for notational convenience, to denote sequences, and to construct compact (“abstract”) syntax trees directly.
Optimal incremental parsing
This communication sets the problem of incremental parsing in the context of a complete incremental compiling system. It turns out that, according to the incrementally paradigm of the attribute
Regular right part grammars and their parsers
This paper introduces an alternative to context-free grammars called regular right part (RRP) Grammars, which resemble PASCAL syntax diagrams, which describe the syntax of programming languages more concisely and more understandably than is possible with CF grammarmars.
Using Filters for the Disambiguation of Context-free Grammars
A framework of filters is proposed to describe and compare a wide range of disambiguation problems in a parser-independent way and enables us to define several general properties of disAmbiguation methods.
The syntax definition formalism SDF—reference manual—
SDF is a formalism for the definition of syntax which is comparable to BNF in some respects, but has a wider scope in that it also covers the definition of lexical and abstract syntax. Its design and
A Case Study in Optimizing Parsing Schemata by Disambiguation Filters
The optimization of parsing schemata, a framework for high-level description of parsing algorithms, by disambiguation filters is considered in order to find efficient parsing algorithms for declaratively specified disambigsuation methods.
Building friendly parsers
This paper presents a general incremental parser for LR(1) grammars allowing several/any form of modifications in the input program using an error automaton.
An efficient context-free parsing algorithm
A parsing algorithm which seems to be the most efficient general context-free algorithm known is described and appears to be superior to the top-down and bottom-up algorithms studied by Griffiths and Petrick.
Deterministic parsing of ambiguous grammars
This work considers methods of describing the syntax of programming languages in ways that are more flexible and natural than conventional BNF descriptions and shows how efficient LL and LR parsers can be constructed directly from certain classes of these specifications.
The Computational Complexity of GLR Parsing
The Tomita parsing algorithm adapts Knuth’s (1967) well-known parsing algorithm for LR(K) Grammars to non-LR grammars, including ambiguous grammARS, including ambiguity grammar, to achieve provably efficient results.