publications: - title: "Enforcing strict model-view separation in template engines" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2004" doi: "http://doi.acm.org/10.1145/988672.988703" abstract: "The mantra of every experienced web application developer is the same: thou shalt separate business logic from display. Ironically, almost all template engines allow violation of this separation principle, which is the very impetus for HTML template engine development. This situation is due mostly to a lack of formal definition of separation and fear that enforcing separation emasculates a template's power. I show that not only is strict separation a worthy design principle, but that we can enforce separation while providing a potent template engine. I demonstrate my StringTemplate engine, used to build jGuru.com and other commercial sites, at work solving some nontrivial generational tasks.My goal is to formalize the study of template engines, thus, providing a common nomenclature, a means of classifying template generational power, and a way to leverage interesting results from formal language theory. I classify three types of restricted templates analogous to Chomsky's type 1..3 grammar classes and formally define separation including the rules that embody separation.Because this paper provides a clear definition of model-view separation, template engine designers may no longer blindly claim enforcement of separation. Moreover, given theoretical arguments and empirical evidence, programmers no longer have an excuse to entangle model and view. " links: doi: "http://doi.acm.org/10.1145/988672.988703" tags: - "empirical" - "programming languages" - "web programming" - "rule-based" - "meta programming" - "meta-model" - "template engine" - "modeling language" - "language modeling" - "business rules" - "language design" - "model-driven development" - "rules" - "logic programming" - "web applications" - "logic" - "type theory" - "Meta-Environment" - "design" - "grammar" researchr: "https://researchr.org/publication/Parr04%3A0" cites: 0 citedby: 1 pages: "224-233" booktitle: "Proceedings of the 13th international conference on World Wide Web, WWW 2004, New York, NY, USA, May 17-20, 2004" editor: - name: "Stuart I. Feldman" link: "https://researchr.org/alias/stuart-i.-feldman" - name: "Mike Uretsky" link: "https://researchr.org/alias/mike-uretsky" - name: "Marc Najork" link: "https://researchr.org/alias/marc-najork" - name: "Craig E. Wills" link: "https://researchr.org/alias/craig-e.-wills" publisher: "ACM" isbn: "1-58113-844-X" kind: "inproceedings" key: "Parr04:0" - title: "Chronica: a temporal web search engine" author: - name: "Deniz Efendioglu" link: "https://researchr.org/alias/deniz-efendioglu" - name: "Chris Faschetti" link: "https://researchr.org/alias/chris-faschetti" - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2006" doi: "http://doi.acm.org/10.1145/1145581.1145609" links: doi: "http://doi.acm.org/10.1145/1145581.1145609" tags: - "search" researchr: "https://researchr.org/publication/EfendiogluFP06" cites: 0 citedby: 0 pages: "119-120" booktitle: "Proceedings of the 6th International Conference on Web Engineering, ICWE 2006, Palo Alto, California, USA, July 11-14, 2006" editor: - name: "David Wolber" link: "https://researchr.org/alias/david-wolber" - name: "Neil Calder" link: "https://researchr.org/alias/neil-calder" - name: "Christopher H. Brooks" link: "https://researchr.org/alias/christopher-h.-brooks" - name: "Athula Ginige" link: "https://researchr.org/alias/athula-ginige" publisher: "ACM" isbn: "1-59593-352-2" kind: "inproceedings" key: "EfendiogluFP06" - title: "ANTLRWorks: an ANTLR grammar development environment" author: - name: "Jean Bovet" link: "https://researchr.org/alias/jean-bovet" - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2008" doi: "http://dx.doi.org/10.1002/spe.872" links: doi: "http://dx.doi.org/10.1002/spe.872" tags: - "syntax definition" - "ANTLR" - "Meta-Environment" - "grammar" researchr: "https://researchr.org/publication/BovetP08" cites: 0 citedby: 0 journal: "Software: Practice and Experience" volume: "38" number: "12" pages: "1305-1332" kind: "article" key: "BovetP08" - title: "ANTLR: A Predicated- :::: LL(k) :::: Parser Generator" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Russell W. Quong" link: "https://researchr.org/alias/russell-w.-quong" year: "1995" tags: - "syntax definition" - "parsing" researchr: "https://researchr.org/publication/ParrQ95" cites: 0 citedby: 0 journal: "Software: Practice and Experience" volume: "25" number: "7" pages: "789-810" kind: "article" key: "ParrQ95" - title: "LL(*): the foundation of the ANTLR parser generator" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Kathleen Fisher" link: "https://researchr.org/alias/kathleen-fisher" year: "2011" doi: "http://doi.acm.org/10.1145/1993498.1993548" links: doi: "http://doi.acm.org/10.1145/1993498.1993548" dblp: "http://dblp.uni-trier.de/rec/bibtex/conf/pldi/ParrF11" tags: - "parsing" researchr: "https://researchr.org/publication/ParrF11" cites: 0 citedby: 0 pages: "425-436" booktitle: "Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, San Jose, CA, USA, June 4-8, 2011" editor: - name: "Mary W. Hall" link: "https://researchr.org/alias/mary-w.-hall" - name: "David A. Padua" link: "https://researchr.org/alias/david-a.-padua" publisher: "ACM" isbn: "978-1-4503-0663-8" kind: "inproceedings" key: "ParrF11" - title: "The Fortran-P Translator: Towards Automatic Translation of Fortran 77 Programs for Massively Parallel Processors" author: - name: "Matthew T. O Keefe" link: "https://researchr.org/alias/matthew-t.-o-keefe" - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Kevin Edgar" link: "https://researchr.org/alias/kevin-edgar" - name: "Steve Anderson" link: "https://researchr.org/alias/steve-anderson" - name: "Paul Woodward" link: "https://researchr.org/alias/paul-woodward" - name: "Hank Dietz" link: "https://researchr.org/alias/hank-dietz" year: "1995" doi: "http://iospress.metapress.com/content/e363174158308472/" links: doi: "http://iospress.metapress.com/content/e363174158308472/" tags: - "translation" - "parallel programming" researchr: "https://researchr.org/publication/OKeefePEAWD95" cites: 0 citedby: 0 journal: "Scientific Programming" volume: "4" number: "1" pages: "1-21" kind: "article" key: "OKeefePEAWD95" - title: "Adding Semantic and Syntactic Predicates To LL(k): pred-LL(k)" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Russell W. Quong" link: "https://researchr.org/alias/russell-w.-quong" year: "1994" tags: - "syntax definition" researchr: "https://researchr.org/publication/ParrQ94" cites: 0 citedby: 0 pages: "263-277" booktitle: "Compiler Construction, 5th International Conference, CC 94, Edinburgh, U.K., April 7-9, 1994, Proceedings" editor: - name: "Peter Fritzson" link: "https://researchr.org/alias/peter-fritzson" volume: "786" series: "Lecture Notes in Computer Science" publisher: "Springer" isbn: "3-540-57877-3" kind: "inproceedings" key: "ParrQ94" - title: "Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2010" doi: "http://pragprog.com/titles/tpdsl/language-implementation-patterns" abstract: "Learn to build configuration file readers, data readers, model-driven code generators, source-to-source translators, source analyzers, and interpreters. You don’t need a background in computer science—ANTLR creator Terence Parr demystifies language implementation by breaking it down into the most common design patterns. Pattern by pattern, you’ll learn the key skills you need to implement your own computer languages." links: doi: "http://pragprog.com/titles/tpdsl/language-implementation-patterns" tags: - "programming languages" - "design science" - "meta programming" - "data-flow language" - "pattern language" - "meta-model" - "interpreter" - "modeling language" - "language modeling" - "language design" - "data-flow programming" - "data-flow" - "source-to-source" - "e-science" - "ANTLR" - "DSL" - "programming" - "software languages" - "Meta-Environment" - "compilers" - "design" - "interpreters" - "open-source" - "domain-specific language" researchr: "https://researchr.org/publication/Parr%3A2010" cites: 0 citedby: 0 publisher: "The Pragmatic Bookshelf" kind: "book" key: "Parr:2010" - title: "PCCTS reference manual: version 1.00" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Henry G. Dietz" link: "https://researchr.org/alias/henry-g.-dietz" - name: "William E. Cohen" link: "https://researchr.org/alias/william-e.-cohen" year: "1992" doi: "http://doi.acm.org/10.1145/130973.130980" links: doi: "http://doi.acm.org/10.1145/130973.130980" tags: - "syntax definition" - "e-science" researchr: "https://researchr.org/publication/ParrDC92" cites: 0 citedby: 0 journal: "SIGPLAN Notices" volume: "27" number: "2" pages: "88-165" kind: "article" key: "ParrDC92" - title: "Adaptive LL(*) parsing: the power of dynamic analysis" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Sam Harwell" link: "https://researchr.org/alias/sam-harwell" - name: "Kathleen Fisher" link: "https://researchr.org/alias/kathleen-fisher" year: "2014" doi: "http://doi.acm.org/10.1145/2660193.2660202" links: doi: "http://doi.acm.org/10.1145/2660193.2660202" dblp: "http://dblp.uni-trier.de/rec/bibtex/conf/oopsla/ParrHF14" researchr: "https://researchr.org/publication/ParrHF14" cites: 0 citedby: 0 pages: "579-598" booktitle: "Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2014, part of SPLASH 2014, Portland, OR, USA, October 20-24, 2014" editor: - name: "Andrew P. Black" link: "https://researchr.org/alias/andrew-p.-black" - name: "Todd D. Millstein" link: "https://researchr.org/alias/todd-d.-millstein" publisher: "ACM" isbn: "978-1-4503-2585-1" kind: "inproceedings" key: "ParrHF14" - title: "The Reuse of Grammars with Embedded Semantic Actions" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2008" doi: "http://dx.doi.org/10.1109/ICPC.2008.36" links: doi: "http://dx.doi.org/10.1109/ICPC.2008.36" tags: - "syntax definition" - "reuse" - "ANTLR" - "grammar" researchr: "https://researchr.org/publication/Parr08" cites: 0 citedby: 0 pages: "5-10" booktitle: "The 16th IEEE International Conference on Program Comprehension, ICPC 2008, Amsterdam, The Netherlands, June 10-13, 2008" editor: - name: "René L. Krikhaar" link: "https://researchr.org/alias/ren%C3%A9-l.-krikhaar" - name: "Ralf Lämmel" link: "http://www.uni-koblenz.de/~laemmel/Site/Home.html" - name: "Chris Verhoef" link: "http://www.cs.vu.nl/~x/" publisher: "IEEE Computer Society" kind: "inproceedings" key: "Parr08" - title: "Web application internationalization and localization in action" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2006" doi: "http://doi.acm.org/10.1145/1145581.1145650" links: doi: "http://doi.acm.org/10.1145/1145581.1145650" tags: - "web applications" researchr: "https://researchr.org/publication/Parr06" cites: 0 citedby: 0 pages: "64-70" booktitle: "Proceedings of the 6th International Conference on Web Engineering, ICWE 2006, Palo Alto, California, USA, July 11-14, 2006" editor: - name: "David Wolber" link: "https://researchr.org/alias/david-wolber" - name: "Neil Calder" link: "https://researchr.org/alias/neil-calder" - name: "Christopher H. Brooks" link: "https://researchr.org/alias/christopher-h.-brooks" - name: "Athula Ginige" link: "https://researchr.org/alias/athula-ginige" publisher: "ACM" isbn: "1-59593-352-2" kind: "inproceedings" key: "Parr06" - title: "Towards a universal code formatter through machine learning" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Jurgen J. Vinju" link: "http://homepages.cwi.nl/~jurgenv/" year: "2016" doi: "http://dl.acm.org/citation.cfm?id=2997383" links: doi: "http://dl.acm.org/citation.cfm?id=2997383" dblp: "http://dblp.uni-trier.de/rec/bibtex/conf/sle/ParrV16" researchr: "https://researchr.org/publication/ParrV16" cites: 0 citedby: 0 pages: "137-151" booktitle: "Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering, Amsterdam, The Netherlands, October 31 - November 1, 2016" editor: - name: "Tijs van der Storm" link: "https://researchr.org/alias/tijs-van-der-storm" - name: "Emilie Balland" link: "https://researchr.org/alias/emilie-balland" - name: "Dániel Varró" link: "https://researchr.org/alias/d%C3%A1niel-varr%C3%B3" publisher: "ACM" isbn: "978-1-4503-4447-0" kind: "inproceedings" key: "ParrV16" - title: "The Definitive ANTLR Reference: Building Domain-Specific Languages" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" year: "2007" month: "May" tags: - "C++" - "domain-specific language" researchr: "https://researchr.org/publication/Parr2007" cites: 0 citedby: 1 publisher: "Pragmatic Programmers" kind: "book" key: "Parr2007" - title: "A Language for Creating and Manipulating VRML" author: - name: "Terence John Parr" link: "http://www.cs.usfca.edu/~parrt/" - name: "Timothy F. Rohaly" link: "https://researchr.org/alias/timothy-f.-rohaly" year: "1995" doi: "http://doi.acm.org/10.1145/217306.217323" links: doi: "http://doi.acm.org/10.1145/217306.217323" researchr: "https://researchr.org/publication/ParrR95%3A0" cites: 0 citedby: 0 pages: "123-131" booktitle: "VRML" kind: "inproceedings" key: "ParrR95:0"