skip to main content
10.1145/1596655.1596667acmconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

Parsing Fortress syntax

Published:27 August 2009Publication History

ABSTRACT

In this paper, we report our experience with parsing the syntax of the Fortress programming language. Fortress is a new programming language designed for scientific and high-performance computing. Features include: implicit parallelism, transactions, and concrete syntax that emulates mathematical notation. Fortress is intended to grow over time to accommodate the changing needs of its users.

Parsing the Fortress syntax is nontrivial due to its support for mathematical syntax and growable syntax. Mathematical syntax is highly ambiguous and growable syntax allows a program itself to define how it is parsed. Fortress currently runs entirely on the JVM, which requires internal representation of Fortress as Java classes. We describe our trials to parse the entire Fortress syntax, in the presence of constant changes of the language syntax and its internal representation. and the lessons we learned from the experience.

References

  1. CUP - LALR Parser Generator for Java#8482;. http://www2.cs.tum.edu/projects/cup/.Google ScholarGoogle Scholar
  2. Java Compiler Compiler#8482; (JavaCC#8482;) - The Java Parser Generator. https://javacc.dev.java.net/.Google ScholarGoogle Scholar
  3. Eric Allen, David Chase, Christine Flood, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, and Guy L. Steele Jr. Project Fortress Community website. http://www.projectfortress.sun.com.Google ScholarGoogle Scholar
  4. Eric Allen, David Chase, Joe Hallett, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy L. Steele Jr., and Sam Tobin-Hochstadt. The Fortress Language Specification Version 1.0. http://research.sun.com/projects/plrg/fortress.pdf, March 2008.Google ScholarGoogle Scholar
  5. Eric Allen, Ryan Culpepper, Janus Dam Nielsen, Jon Rafkind, and Sukyoung Ryu. Growing a syntax. In Foundations of Object-Oriented Languages, 2009.Google ScholarGoogle Scholar
  6. D. H. Bailey, E. Barszcz, J. T. Barton, D. S. Browning, R. L. Carter, R. A. Fatoohi, P. O. Frederickson, T. A. Lasinski, H. D. Simon, V. Venkatakrishnan, and S. K. Weeratunga. The NAS parallel benchmarks. Technical report, The International Journal of Supercomputer Applications, 1991.Google ScholarGoogle Scholar
  7. Gilad Bracha, Guy Steele, Bill Joy, and James Gosling. Java(TM) Language Specification, The (3rd Edition) (Java Series). Addison-Wesley Professional, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bryan Ford. Parsing expression grammars: a recognition-based syntactic foundation. In POPL '04: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 111--122, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Robert Grimm. Rats! -- an easily extensible parser generator. http://cs.nyu.edu/~rgrimm/xtc/rats.html.Google ScholarGoogle Scholar
  10. James W. Cooper. Java#8482;Design Patterns: A Tutorial. Addison-Wesley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Stephen C. Johnson. Yacc: Yet another compiler-compiler, 1979.Google ScholarGoogle Scholar
  12. Xavier Leroy, Damien Doligez, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. The Objective Caml System, release 3.08. http://caml.inria.fr/distrib/ocaml-3.08/ocaml-3.08-refman.pdf, 2004.Google ScholarGoogle Scholar
  13. Scott McPeak and G. C. Necula. Elkhound: A fast, practical GLR parser generator. In Compiler Construction, pages 73--88, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  14. Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Stéphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. The Scala Language Specification. http://scala.epfl.ch/docu/files/ScalaReference.pdf, 2004.Google ScholarGoogle Scholar
  15. Brian R. Stoler, Eric Allen, and Dan Smith. ASTGen. http://sourceforge.net/projects/astgen.Google ScholarGoogle Scholar
  16. Bjarne Stroustrup. The C++ Programming Language (Special Edition ed.). Addison-Wesley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. The Unicode Consortium. The Unicode Standard, Version 5.0. Addison-Wesley, 2006.Google ScholarGoogle Scholar

Index Terms

  1. Parsing Fortress syntax

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      PPPJ '09: Proceedings of the 7th International Conference on Principles and Practice of Programming in Java
      August 2009
      200 pages
      ISBN:9781605585987
      DOI:10.1145/1596655

      Copyright © 2009 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 27 August 2009

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Author Tags

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate29of58submissions,50%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader