Skip to main content

Eco: A Language Composition Editor

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. 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. 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)

    Article  MathSciNet  Google Scholar 

  4. Cantor, D.G.: On the ambiguity problem of backus systems. J. ACM 9(4), 477–479 (1962)

    MATH  MathSciNet  Google Scholar 

  5. Cordy, J.R.: The TXL source transformation language. Science of Computer Programming 61(3), 190–210 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  6. Diekmann, L., Tratt, L.: Parsing composed grammars with language boxes. In: Workshop on Scalable Language Specifications (June 2013)

    Google Scholar 

  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. Ford, B.: Parsing expression grammars: a recognition-based syntactic foundation. In: POPL, pp. 111–122 (January 2004)

    Google Scholar 

  9. Ghezzi, C., Mandrioli, D.: Incremental parsing. ACM Transactions on Programming Languages and Systems (TOPLAS) 1(1), 58–70 (1979)

    Article  MATH  Google Scholar 

  10. Harrison, M.A., Maverick, V.: Presentation by tree transformation. In: Compcon, pp. 68–73 (September 1997)

    Google Scholar 

  11. Jalili, F., Gallier, J.H.: Building friendly parsers. In: POPL, pp. 196–206 (January 1982)

    Google Scholar 

  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. Khwaja, A.A., Urban, J.E.: Syntax-directed editing environments: Issues and features. In: SAC, pp. 230–237 (February 1993)

    Google Scholar 

  14. Knuth, D.: On the translation of languages from left to right. Information and Control 8(6), 607–639 (1965)

    Article  MathSciNet  Google Scholar 

  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)

    Chapter  Google Scholar 

  16. Li, W.X.: A new approach to incremental LR parsing. J. Prog. Lang. 5(1), 173–188 (1997)

    Google Scholar 

  17. Parikh, R.J.: On context-free languages. J. ACM 13(4), 570–581 (1966)

    MATH  MathSciNet  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  20. Salomon, D.J., Cormack, G.V.: Scannerless NSLR(1) parsing of programming languages. SIGPLAN Not. 24(7), 170–178 (1989)

    Article  Google Scholar 

  21. Schwerdfeger, A., Van Wyk, E.: Verifiable composition of deterministic grammars. In: PLDI (June 2009)

    Google Scholar 

  22. Teitelbaum, T., Reps, T.: The Cornell program synthesizer: a syntax-directed programming environment. Commun. ACM 24(9), 563–573 (1981)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  24. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (September 1997)

    Google Scholar 

  25. Wagner, T.A.: Practical Algorithms for Incremental Software Development Environments. PhD thesis, University of California, Berkeley (March 1998)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Diekmann, L., Tratt, L. (2014). Eco: A Language Composition Editor. In: Combemale, B., Pearce, D.J., Barais, O., Vinju, J.J. (eds) Software Language Engineering. SLE 2014. Lecture Notes in Computer Science, vol 8706. Springer, Cham. https://doi.org/10.1007/978-3-319-11245-9_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-11245-9_5

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-11244-2

  • Online ISBN: 978-3-319-11245-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics