Abstract
Both XML and Lisp have demonstrated the utility of generic syntax for expressing tree-structured data. But generic languages do not provide the syntactic richness of custom languages. Generic Extensible Language (Gel) is a rich generic syntax that embodies many of the common syntactic conventions for operators, grouping and lists in widely-used languages. Prefix/infix operators are disambiguated by white-space, so that documents which violate common white-space conventions will not necessarily parse correctly with Gel. With some character replacements and adjusting for mismatch in operator precedence, Gel can extract meaningful structure from typical files in many languages, including Java, Cascading Style Sheets, Smalltalk, and ANTLR grammars. This evaluation shows the expressive power of Gel, not that Gel can be used as a parser for existing languages. Gel is intended to serve as a generic language for creating composable domain-specific languages.
Chapter PDF
Similar content being viewed by others
Keywords
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.
References
Backus, J.W., Beeber, R.J., Best, S., Goldberg, R., Herrick, H.L., Hughes, R.A., Mitchell, L.B., Nelson, R.A., Nutt, R., Sayre, D., Sheridan, B.P., Stern, H., Ziller, I.: Fortran Automated Coding System For the IBM 704. International Business Machines Corporation, New York (1956)
Berners-Lee, T., Masinter, L., McCahill, M.: Uniform Resource Locators (URL). RFC 1738, Internet Engineering Task Force (December 1994), http://ds.internic.net/rfc/rfc1738.txt (accessed August 23, 1997)
Biron, P.V., Malhotra, A.: XML Schema part 2: Datatypes. The World Wide Web Consortium (May 2001), http://www.w3.org/TR/xmlschema-2/
Brabrand, C., Møller, A., Schwartzbach, M.I.: The <bigwig> project. ACM Trans. Interet Technol. 2(2), 79–114 (2002)
Brabrand, C., Schwartzbach, M.I.: Growing languages with metamorphic syntax macros. In: Proceedings of Workshop on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2002, pp. 31–40. ACM Press, New York (2002)
Brabrand, C., Schwartzbach, M.I.: The metafront system: Safe and extensible parsing and transformation. Sci. Comput. Program 68(1), 2–20 (2007)
Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/xt 0.17. a language and toolset for program transformation. Sci. Comput. Program 72(1-2), 52–70 (2008)
Bravenboer, M., Visser, E.: Designing syntax embeddings and assimilations for language libraries. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 34–46. Springer, Heidelberg (2007)
Bray, T., Paoli, J., Sperberg-McQueen, C.M., Maler, E., Yergeau, F. (eds.): Extensible Markup Language (XML) 1.0. W3C Recommendation. W3C, 4th edn. (August 2003)
Cardelli, L., Matthes, F., Abadi, M.: Extensible syntax with lexical scoping. Technical report, Research Report 121, Digital SRC (1994)
Crocker, D.H.: Standard for the Format of ARPA Internet Text Messages. University of Delaware, Department of Electrical Engineering, Newark, DE 19711 (August 1982), http://www.faqs.org/rtcs/rfc822.html
Crockford, D.: Rfc 4627. the application/json media type for javascript object notation (json) (2006), http://www.json.org/
Ford, B.: Parsing expression grammars: A recognition-based syntactic foundation. In: Symposium on Principles of Programming Languages, pp. 111–122 (2004)
Gladky, A.V., Melčuk, I.A.: Tree grammars (= Δ-grammars). In: Proceedings of the 1969 Conference on Computational linguistics, Morristown, NJ, USA, pp. 1–7. Association for Computational Linguistics (1969)
Goldberg, A., Robson, D.: Smalltalk-80: the Language and Its Implementation. Addison-Wesley, Reading (1983)
Grimm, R.: Practical packrat parsing. New York University Technical Report, Dept. of Computer Science, TR2004-854 (2004)
Grimm, R.: Better extensibility through modular syntax. In: PLDI 2006: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation, New York, NY, USA, pp. 38–51. ACM, New York (2006)
Hudak, P., Jones, S.P., Wadler, P., Boutel, B., Fairbairn, J., Fasel, J., Guzmán, M.M., Hammond, K., Hughes, J., Johnsson, T., Kieburtz, D., Nikhil, R., Partain, W., Peterson, J.: Report on the programming language Haskell: a non-strict, purely functional language version 1.2. SIGPLAN Not. 27(5), 1–164 (1992)
Johnson, S.C.: Yacc: Yet another compiler compiler. In: UNIX Programmer’s Manual, vol. 2, pp. 353–387. Holt, Rinehart, and Winston, New York (1979)
Knuth, D.E.: The TEX book. Addison-Wesley, Reading (1984)
Krishnamurthi, S.: Programming Languages: Application and Interpretation (2006), http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/
Lie, H.W., Bos, B.: Cascading Style Sheets, level 1. W3c recommendation, W3C (January 1999)
McCarthy, J.: Recursive functions of symbolic expressions and their computation by machine, part i. Commun. ACM 3(4), 184–195 (1960)
Odersky, M., Spoon, L., Venners, B.: Programming in Scala: A comprehensive step-by-step guide. Artima Inc. (August 2008)
Parr, T., Quong, R.: ANTLR: A Predicated-LL(k) parser generator. Journal of Software Practice and Experience 25(7), 789–810 (1995)
Thompson, H.S., Beech, D., Maloney, M., Mendelsohn, N.: XML Schema part 1: Structures. The World Wide Web Consortium (May 2001), http://www.w3.org/TR/xmlschema-2/
Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)
Visser, E.: Program transformation with stratego/xt: Rules, strategies, tools, and systems in stratego/xt 0.9. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 216–238. Springer, Heidelberg (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 IFIP International Federation for Information Processing
About this paper
Cite this paper
Falcon, J., Cook, W.R. (2009). Gel: A Generic Extensible Language . In: Taha, W.M. (eds) Domain-Specific Languages. DSL 2009. Lecture Notes in Computer Science, vol 5658. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03034-5_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-03034-5_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-03033-8
Online ISBN: 978-3-642-03034-5
eBook Packages: Computer ScienceComputer Science (R0)