Advertisement

Reusing batch parsers as incremental parsers

  • Luigi Petrone
Software Technology
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1026)

Abstract

A simple solution to the incremental parsing problem is found by mapping sentential forms of a context-free grammar G over terminal strings of the placeholder language and then subtree forests, i.e. sequences of syntax sub-trees, over sequences of pairs (placeholdertoken, subtree-pointer). Parsing such sequences-of-pairs/ placeholder-strings is equivalent to parsing and therefore to embedding sub-tree-forests into a global syntax tree. Using this placeholder-for-tree techmnique we may easily implement several incremental bottom-up parsing policies by reusing standard (batch) parsers, such as those generated by Yacc, or any LARL or LR(k) parser.

Key words and Phrases

parsing parse trees LR parsers incremental parsing programming environments 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barioglio, M., Capella, G., Lupo, I., and Petrone, L. Software Productivity Tools for Program Design, Implementation, Documentation. Proc.s of the 1986 IFIP Congress. Elsevier Publ. (North-Holland), IFIP 1986, 909–914.Google Scholar
  2. 2.
    Bergadano, E. Parsificazione incrementale negli Editor Strutturati. Dip. Informatica, Universita' di Torino (1993)Google Scholar
  3. 3.
    Degano, P., Mannucci, S., and Mojana, B. Efficient Incremental LR Parsing for Syntax-Directed Editors. ACM Trans. Prog. Lang. Syst. 10, (July 1988), 345–373.Google Scholar
  4. 4.
    Donzeau-Gouge, V., Huet, G., Kahn, G, and Lang, B. Programming Environments based on Structured Editors: the MENTOR Experience. Workshop on Programm. Environments, Ridgefield, CT (1980).Google Scholar
  5. 5.
    Ghezzi, C., and Mandrioli, D. Incremental Parsing. ACM Trans. Prog. Lang. Syst. 1, (July 1979), 56–71.Google Scholar
  6. 6.
    Ghezzi, C., and Mandrioli, D. Augmenting Parsers to Support Incrementality Journal of the ACM (July I980), 564–579.Google Scholar
  7. 7.
    Medina Mora, R., and Feiler, P. An Incremental Programming Environment. IEEE Trans. Softw. Eng. SE-7, 5 (Sept. 1981), 472–482.Google Scholar
  8. 8.
    Pappas, T. L., Designing Ada Programs, (a Product Review of KeyOne) IEEE Computer, (March 1990), 92–94.Google Scholar
  9. 9.
    Petrone, L., et alii. DUAL: An Interactive Tool for Developing Documented Programs by Step-wise Refinements. Proc.s Int. Conf. Software Engin., Tokyo (1982), 350–357.Google Scholar
  10. 10.
    Petrone, L., et alii. KeyOne Manual. Copyright LPS. Torino, Italy (1985, and rev. 1990)Google Scholar
  11. 11.
    Petrone, L., and Bergadano, E. The new Architecture of Free Structured Editors (in preparation).Google Scholar
  12. 12.
    Petrone, L. Incremental Parsers, Batch parsers and Free Structured Editors (submitted for publication).Google Scholar
  13. 13.
    Teitelbaum, T., and Reps, T., The Cornell Program Synthesizer: A Syntax-directed Programming Environment. Commun. ACM 24,9 (Sept. 1981), 563–573.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Luigi Petrone
    • 1
  1. 1.Università di TorinoTorinoItaly

Personalised recommendations