{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T17:05:51Z","timestamp":1789059951273,"version":"build-2803163510"},"reference-count":13,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2017,10,12]],"date-time":"2017-10-12T00:00:00Z","timestamp":1507766400000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/100000185","name":"Defense Advanced Research Projects Agency","doi-asserted-by":"publisher","award":["AFRL FA8750-15-2-0092"],"award-info":[{"award-number":["AFRL FA8750-15-2-0092"]}],"id":[{"id":"10.13039\/100000185","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,10,12]]},"abstract":"<jats:p>Precedence and associativity declarations in systems like yacc resolve ambiguities in context-free grammars (CFGs) by specifying restrictions on allowed parses. However, they are special purpose and do not handle the grammatical restrictions that language designers need in order to resolve ambiguities like dangling else, the interactions between binary operators and functional if expressions in ML, and the interactions between object allocation and function calls in JavaScript. Often, language designers resort to restructuring their grammars in order to encode these restrictions, but this obfuscates the designer's intent and can make grammars more difficult to read, write, and maintain.<\/jats:p>\n                  <jats:p>\n                    In this paper, we show how tree automata can modularly and concisely encode such restrictions. We do this by reinterpreting CFGs as tree automata and then intersecting them with tree automata encoding the desired restrictions. The results are then reinterpreted back into CFGs that encode the specified restrictions. This process can be used as a preprocessing step before other CFG manipulations and is well behaved. It performs well in practice and never introduces ambiguities or LR(\n                    <jats:italic toggle=\"yes\">k<\/jats:italic>\n                    ) conflicts.\n                  <\/jats:p>","DOI":"10.1145\/3133906","type":"journal-article","created":{"date-parts":[[2017,10,13]],"date-time":"2017-10-13T11:15:45Z","timestamp":1507893345000},"page":"1-25","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":6,"title":["Restricting grammars with tree automata"],"prefix":"10.1145","volume":"1","author":[{"given":"Michael D.","family":"Adams","sequence":"first","affiliation":[{"name":"University of Utah, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Matthew","family":"Might","sequence":"additional","affiliation":[{"name":"University of Utah, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,10,12]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-02654-1_8"},{"key":"e_1_2_1_2_1","volume-title":"October","author":"Comon Hubert","year":"2007","unstructured":"Hubert Comon, Max Dauchet, R\u00e9mi Gilleron, Florent Jacquemard, Denis Lugiez, Christof L\u00f6ding, Sophie Tison, and Marc Tommasi. Tree automata techniques and applications, October 2007. URL http:\/\/www.grappa.univ- lille3.fr\/tata ."},{"key":"e_1_2_1_3_1","volume-title":"June","author":"ECMA","year":"2011","unstructured":"ECMA 2011. Standard ECMA-262: ECMAScript Language Specification. Ecma International, 5.1 edition, June 2011. URL http:\/\/www.ecma- international.org\/publications\/files\/ECMA- ST\/Ecma- 262.pdf ."},{"key":"e_1_2_1_4_1","volume-title":"September","author":"IEC","year":"2007","unstructured":"ISO\/IEC 9899:TC3: Programming languages \u2013 C. ISO\/IEC JTC1\/SC22\/WG14, September 2007. URL http:\/\/www.open- std.org\/ JTC1\/SC22\/WG14\/www\/docs\/n1124.pdf ."},{"key":"e_1_2_1_5_1","first-page":"286","article-title":"Yakyak: parsing with logical side constraints. In Grzegorz Rozenberg and Wolfgang Thomas, editors, Developments in Language Theory, Foundations, Applications, and Perspectives, Aachen","volume":"6","author":"Klarlund Nils","year":"1999","unstructured":"Nils Klarlund, Niels Damgaard, and Michael I. Schwartzbach. Yakyak: parsing with logical side constraints. In Grzegorz Rozenberg and Wolfgang Thomas, editors, Developments in Language Theory, Foundations, Applications, and Perspectives, Aachen, Germany, 6-9 July 1999, pages 286\u2013301. World Scientific, 1999. ISBN 981-02-4380-4.","journal-title":"Germany"},{"key":"e_1_2_1_6_1","unstructured":"Paul Klint and Eelco Visser. Using filters for the disambiguation of context-free grammars. Technical Report P9426 University of Amsterdam December 1994."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0019-"},{"key":"e_1_2_1_8_1","volume-title":"Springer","author":"Lang Bernard","year":"1974","unstructured":"Bernard Lang. Deterministic techniques for efficient non-deterministic parsers, pages 255\u2013269. Springer, Berlin, Heidelberg, 1974. ISBN 978-3-540-37778-8. doi: 10.1007\/3- 540- 06841- 4_65."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/177492.177759"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF03036460"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45937-5_12"},{"key":"e_1_2_1_12_1","unstructured":"Eelco Visser. Syntax Definition for Language Prototyping. PhD thesis University of Amsterdam 1997."},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF00268139"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133906","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3133906","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3133906","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T16:06:37Z","timestamp":1789056397000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133906"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,10,12]]},"references-count":13,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2017,10,12]]}},"alternative-id":["10.1145\/3133906"],"URL":"https:\/\/doi.org\/10.1145\/3133906","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,10,12]]},"assertion":[{"value":"2017-10-12","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}