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: "WWW" 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: "ICWE" 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: "SPE" 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: "SPE" 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: "PLDI" 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: "sp" 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: "cc" 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" 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: "OOPSLA" 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: "IWPC" 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: "ICWE" 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: "SLE" 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"