Results 1 - 10
of
23
Yacc: Yet Another Compiler-Compiler
, 1975
"... Computer program input generally has some structure; in fact, every computer program ..."
Abstract
-
Cited by 163 (2 self)
- Add to MetaCart
Computer program input generally has some structure; in fact, every computer program
The Syntax Definition Formalism SDF - Reference Manual
, 2001
"... SDF is a formalism for the definition of syntax which is comparable to BNF in some respect, but has a wider scope in that it also covers the definition... ..."
Abstract
-
Cited by 132 (23 self)
- Add to MetaCart
SDF is a formalism for the definition of syntax which is comparable to BNF in some respect, but has a wider scope in that it also covers the definition...
Incremental Analysis of Real Programming Languages
- In Proceedings of the 1997 ACM SIGPLAN Conference on Programming Language Design and Implementation
, 1997
"... A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR(k) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, w ..."
Abstract
-
Cited by 25 (6 self)
- Add to MetaCart
A major research goal for compilers and environments is the automatic derivation of tools from formal specifications. However, the formal model of the language is often inadequate; in particular, LR(k) grammars are unable to describe the natural syntax of many languages, such as C ++ and Fortran, which are inherently non-deterministic. Designers of batch compilers work around such limitations by combining generated components with ad hoc techniques (for instance, performing partial type and scope analysis in tandem with parsing). Unfortunately, the complexity of incremental systems precludes the use of batch solutions. The inability to generate incremental tools for important languages inhibits the widespread use of language-rich interactive environments. We address this problem by extending the language model itself, introducing a program representation based on parse dags that is suitable for both batch and incremental analysis. Ambiguities unresolved by one stage are retained in this representation until further stages can complete the analysis, even if the resolution depends on further actions by the user. Representing ambiguity explicitly increases the number and variety of languages that can be analyzed incrementally using existing methods. To create this representation, we have developed an efficient incremental parser for general context-free grammars. 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 retain multiple interpretations indefinitely. Our representation and analyses gain efficiency by exploiting the local nature of ambigu...
Phobos: A front-end approach to extensible compilers
, 2003
"... This paper describes a practical approach for implementing domain-specific languages with extensible compilers. Given a compiler with one or more front-end languages, we introduce the idea of a "generic" front-end that allows the syntactic and semantic specification of domainspecific languages. Phob ..."
Abstract
-
Cited by 14 (9 self)
- Add to MetaCart
This paper describes a practical approach for implementing domain-specific languages with extensible compilers. Given a compiler with one or more front-end languages, we introduce the idea of a "generic" front-end that allows the syntactic and semantic specification of domainspecific languages. Phobos, our generic front-end, offers modular language specification, allowing the programmer to define new syntax and semantics incrementally.
A Family of Syntax Definition Formalisms
- PROGRAMMING RESEARCH GROUP, UNIVERSITY OF AMSTERDAM
, 1997
"... ..."
Efficient and Flexible Incremental Parsing
- ACM Transactions on Programming Languages and Systems
, 1996
"... syntax, ambiguity, balanced structure, incremental parsing, operator precedence, optimal reuse 1. ..."
Abstract
-
Cited by 12 (5 self)
- Add to MetaCart
syntax, ambiguity, balanced structure, incremental parsing, operator precedence, optimal reuse 1.
Precedences in Specifications and Implementations of Programming Languages
- Theoretical Computer Science
, 1991
"... Although precedences are often used to resolve ambiguities in programming language descriptions, there has been no parser-independent definition of languages which are generated by grammars with precedence rules. This paper gives such a definition for a subclass of context-free grammars. The defi ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
Although precedences are often used to resolve ambiguities in programming language descriptions, there has been no parser-independent definition of languages which are generated by grammars with precedence rules. This paper gives such a definition for a subclass of context-free grammars. The definition is shown to be equivalent to the implicit definition an operator precedence parser gives. A problem with a language containing infix, prefix and postfix operators of different precedences is that the well-known algorithm, which transforms a grammar with infix operator precedences to an ordinary unambiguous context-free grammar, does not work. This paper gives an algorithm that works also for prefix and postfix operators, and the correctness of it is proved. An application of the algorithm is also presented. 1 Introduction Precedences are used in many language descriptions to resolve ambiguities. The reason for resolving ambiguities with precedences, instead of using an unambig...
LR Parsers for Natural Languages
"... MLR, an extended t.R parser, is introduced, and its application to natural language parsing is discussed. An LR parser is a hift-reduce parser which is deterministically .quided by a parsing table. A parsing table can be obtained automatically from a contextfree phrase structure grammar, LR parsers ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
MLR, an extended t.R parser, is introduced, and its application to natural language parsing is discussed. An LR parser is a hift-reduce parser which is deterministically .quided by a parsing table. A parsing table can be obtained automatically from a contextfree phrase structure grammar, LR parsers cannot manage ambiguous gramlnars such as natural language grantmars, because their parsing tables would Itave multiply-delinud entries, which precludes deterministic parsing, MLR, however, can handle mulliply-defined entries, using a dynamic procjramnling method. When an input sentence is ambiguous, the MI.R parser produces all possible parse trees without parsing any part of the input sentence more than once in the same way, despite the fact that the parser does not maintain a chart as in chart ilarsing. Our method also prr)vides an elegant solution to the problem of multi-part-of.speech words such as "that". The MLR parser and its parsing table generator have been implemented at Carnegie-Mellon University, I
A Case Study in Optimizing Parsing Schemata by Disambiguation Filters
- Proceedings Accolade95
"... Disambiguation methods for context-free grammars enable concise specification of programming languages by ambiguous grammars. A disambiguation filter is a function that selects a subset from a set of parse trees---the possible parse trees for an ambiguous sentence. The framework of filters provides ..."
Abstract
-
Cited by 6 (3 self)
- Add to MetaCart
Disambiguation methods for context-free grammars enable concise specification of programming languages by ambiguous grammars. A disambiguation filter is a function that selects a subset from a set of parse trees---the possible parse trees for an ambiguous sentence. The framework of filters provides a declarative description of disambiguation methods independent of parsing. Although filters can be implemented straightforwardly as functions that prune the parse forest produced by some generalized parser, this can be too inefficient for practical applications. In this paper the optimization of parsing schemata, a framework for highlevel description of parsing algorithms, by disambiguation filters is considered in order to find efficient parsing algorithms for declaratively specified disambiguation methods. As a case study the optimization of the parsing schema of Earley's parsing algorithm by two filters is investigated. The main result is a technique for generation of efficient LR-like p...

