Abstract
Processors for programming languages and other formal languages typically use a concrete syntax to describe the user's view of a program and an abstract syntax to represent language structures internally. Grammatical abstraction is defined as a relationship between two context-free grammars. It formalizes the notion of one syntax being “more abstract” than another. Two variants of abstraction are presented. Weak grammatical abstraction supports (i) the construction during LR parsing of an internal representation that is closely related to the abstract syntax and (ii) incremental LR parsing using that internal representation as its base. Strong grammatical abstraction tightens the correspondence so that top-down construction of incrementally-parsable internal representations is possible. These results arise from an investigation into language-based editing systems, but apply to any program that transforms a linguistic object from a representation in its concrete syntax to a representation in its abstract syntax or vice versa.
- 1 A. V. Aho and S. C. Johnson. Deterministic parsing of ambiguous grammars. Communications of the ACM, 18(8):441-452, August 1975. Google ScholarDigital Library
- 2 Robert A. Ballance, Jacob Butcher, and Susan L. Graham. Incremental Parsing in the Pan Language. Based Editor. Technical Report 88/??, Computer Science Division, UC Berkeley, March 1988.Google Scholar
- 3 Robert A. Ballance, Michael L. Van De Vanter, and Susan L. Graham. The Architecture of Pan I. Technice1 Report 88/409, Computer Science Division, UC Berkeley, March 1988. Google ScholarDigital Library
- 4 Jacob Butcher. Master of science report. 1988. Computer Science Division- EECS, University of California, Berkeley. In preparation.Google Scholar
- 5 F. L. DeRemer. Compiler Construction; An Advanced Course, chapter Transformational Grammars, pages 109-120. Springer-Verlag, New York, Heidelberg, Berlin, second edition, 1976. Google ScholarDigital Library
- 6 V. Donzeau-Gouge, G. Huet, G. Kahn, and B. Lang. Programming Environments Baaed on Structure Editors: The MENTOR Experience. Research Report 26, INRIA, July 1980.Google Scholar
- 7 Susan L. Graham. On bounded right context languages and grammars. SIAM Journal on Computing, 3(a):224-254, 1974.Google Scholar
- 8 James N. Gray and Michael A. Harrison. On the covering and reduction problems for context-free grammars. Journal of the A CM, 19(4):675-698, October 1972. Google ScholarDigital Library
- 9 Michael A. Harrison. Introduction to Formal Language Theory. Addison-Wesley, Reading, Mass., 1978. Google ScholarDigital Library
- 10 H. B. Hunt, D.J. Rosenkrantz, and T.G. Szymanski. The covering problem for linear context-free grammars. Theoretical Computer Science, 2:361- 382, 1976.Google ScholarCross Ref
- 11 Fahimeh Jalili and Jean H. Gallier. Building friendly parsers. In A CM Ninth Symposium on the Principles of Programming Languages, pages 196-206, 1982. Google ScholarDigital Library
- 12 G. Kahn, B. Lang, B. Melese, and E. Morcos. Metal: a formalism to specify formalisms. Science of Computer Programming, 3:152-188, 1983.Google ScholarCross Ref
- 13 Uwe Kastens. Personal communication.Google Scholar
- 14 Bent Bruun Kristensen, Ole Lehrmann Madsen, Birger MZller-Pedersen, and Kristen Nygaard. An algebra for program fragments. In Proceedings of the A CM SIGPLAN 85 Symposium on Language Issues in Programming Environments, pages 161-170, 1985. Google ScholarDigital Library
- 15 Wilf R. LaLonde. Regular right-part grammars and their parsers. Communications of the A CM, 20(10):731-741, October 1977. Google ScholarDigital Library
- 16 Anton Nijholt. Context-Free Grammars: Covers, Normal Forms, and Parsing. Volume 93 of Lecture Notes in Computer Science, Springer-Verlag, New York, Heidelberg, Berlin, 1980. Google ScholarDigital Library
- 17 Robert E. Noonan. An algorithm for generating abstract syntax trees. Computer Languages, 10($/4):225-2s6, 19ss. Google ScholarDigital Library
- 18 D. J. Rosenkrantz and H. }3. Hunt. Efficient algorithms for automatic construction and compactification of parsing grammars. AC'M Transactions on Programming Languages and Systems, 9(4), 1987. Google ScholarDigital Library
- 19 Tim Teitelbaum and Thomas Reps. The Cornell program synthesizer: a syntkx-directed programming environment. C'AC'M, 24(9):563-573, Sep 1981. Google ScholarDigital Library
- 20 Vance E. Waddle. Production Trees: A Compact Representation of Parsed Programs. Technical Report, IBM Thomas J. Watson Research Center, 1986.Google Scholar
Index Terms
- Grammatical abstraction and incremental syntax analysis in a language-based editor
Recommendations
Grammatical abstraction and incremental syntax analysis in a language-based editor
PLDI '88: Proceedings of the ACM SIGPLAN 1988 conference on Programming language design and implementationProcessors for programming languages and other formal languages typically use a concrete syntax to describe the user's view of a program and an abstract syntax to represent language structures internally. Grammatical abstraction is defined as a ...
Grammatical inference for syntax-based statistical machine translation
ICGI'06: Proceedings of the 8th international conference on Grammatical Inference: algorithms and applicationsIn this article we present a syntax-based translation system, called TABL (Translation using Alignment-Based Learning). It translates natural language sentences by mapping grammar rules (which are induced by the Alignment-Based Learning grammatical ...
Language Modeling for Syntax-Based Machine Translation Using Tree Substitution Grammars: A Case Study on Chinese-English Translation
The poor grammatical output of Machine Translation (MT) systems appeals syntax-based approaches within language modeling. However, previous studies showed that syntax-based language modeling using (Context-Free) Treebank Grammars was not very helpful in ...
Comments