Advertisement

Eco: A Language Composition Editor

  • Lukas Diekmann
  • Laurence Tratt
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8706)

Abstract

Language composition editors have traditionally fallen into two extremes: traditional parsing, which is inflexible or ambiguous; or syntax directed editing, which programmers dislike. In this paper we extend an incremental parser to create an approach which bridges the two extremes: our prototype editor ‘feels’ like a normal text editor, but the user always operates on a valid tree as in a syntax directed editor. This allows us to compose arbitrary syntaxes while still enabling IDE-like features such as name binding analysis.

Keywords

Production Rule Parse Tree Textual Language Concrete Syntax Abstract Syntax Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barrett, E., Bolz, C.F., Tratt, L.: Unipycation: A case study in cross-language tracing. In: VMIL, pp. 31–40 (October 2013)Google Scholar
  2. 2.
    Boshernitsan, M.: Harmonia: A flexible framework for constructing interactive language-based programming tools. Master’s thesis, University of California, Berkeley (June 2001)Google Scholar
  3. 3.
    Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming 72(1-2), 52–70 (2008)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Cantor, D.G.: On the ambiguity problem of backus systems. J. ACM 9(4), 477–479 (1962)zbMATHMathSciNetGoogle Scholar
  5. 5.
    Cordy, J.R.: The TXL source transformation language. Science of Computer Programming 61(3), 190–210 (2006)CrossRefzbMATHMathSciNetGoogle Scholar
  6. 6.
    Diekmann, L., Tratt, L.: Parsing composed grammars with language boxes. In: Workshop on Scalable Language Specifications (June 2013)Google Scholar
  7. 7.
    Ferro, M.V., Dion, B.A.: Efficient incremental parsing for context-free languages. In: International Conference on Computer Languages, pp. 241–252 (1994)Google Scholar
  8. 8.
    Ford, B.: Parsing expression grammars: a recognition-based syntactic foundation. In: POPL, pp. 111–122 (January 2004)Google Scholar
  9. 9.
    Ghezzi, C., Mandrioli, D.: Incremental parsing. ACM Transactions on Programming Languages and Systems (TOPLAS) 1(1), 58–70 (1979)CrossRefzbMATHGoogle Scholar
  10. 10.
    Harrison, M.A., Maverick, V.: Presentation by tree transformation. In: Compcon, pp. 68–73 (September 1997)Google Scholar
  11. 11.
    Jalili, F., Gallier, J.H.: Building friendly parsers. In: POPL, pp. 196–206 (January 1982)Google Scholar
  12. 12.
    Kats, L.C.L., Visser, E.: The Spoofax language workbench: Rules for declarative specification of languages and IDEs. In: OOPSLA, pp. 444–463 (October 2010)Google Scholar
  13. 13.
    Khwaja, A.A., Urban, J.E.: Syntax-directed editing environments: Issues and features. In: SAC, pp. 230–237 (February 1993)Google Scholar
  14. 14.
    Knuth, D.: On the translation of languages from left to right. Information and Control 8(6), 607–639 (1965)CrossRefMathSciNetGoogle Scholar
  15. 15.
    Konat, G., Kats, L., Wachsmuth, G., Visser, E.: Declarative name binding and scope rules. In: Czarnecki, K., Hedin, G. (eds.) SLE 2012. LNCS, vol. 7745, pp. 311–331. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. 16.
    Li, W.X.: A new approach to incremental LR parsing. J. Prog. Lang. 5(1), 173–188 (1997)Google Scholar
  17. 17.
    Parikh, R.J.: On context-free languages. J. ACM 13(4), 570–581 (1966)zbMATHMathSciNetGoogle Scholar
  18. 18.
    Pech, V., Shatalin, A., Voelter, M.: JetBrains MPS as a tool for extending Java. In: PPPJ, pp. 165–168 (September 2013)Google Scholar
  19. 19.
    Renggli, L., Denker, M., Nierstrasz, O.: Language boxes. In: van den Brand, M., Gašević, D., Gray, J. (eds.) SLE 2009. LNCS, vol. 5969, pp. 274–293. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  20. 20.
    Salomon, D.J., Cormack, G.V.: Scannerless NSLR(1) parsing of programming languages. SIGPLAN Not. 24(7), 170–178 (1989)CrossRefGoogle Scholar
  21. 21.
    Schwerdfeger, A., Van Wyk, E.: Verifiable composition of deterministic grammars. In: PLDI (June 2009)Google Scholar
  22. 22.
    Teitelbaum, T., Reps, T.: The Cornell program synthesizer: a syntax-directed programming environment. Commun. ACM 24(9), 563–573 (1981)Google Scholar
  23. 23.
    Vasudevan, N., Tratt, L.: Detecting ambiguity in programming language grammars. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 157–176. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  24. 24.
    Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)Google Scholar
  25. 25.
    Wagner, T.A.: Practical Algorithms for Incremental Software Development Environments. PhD thesis, University of California, Berkeley (March 1998)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Lukas Diekmann
    • 1
  • Laurence Tratt
    • 1
  1. 1.Software Development Team, InformaticsKing’s College LondonUK

Personalised recommendations