publications: - title: "Practical Scope Recovery Using Bridge Parsing" author: - name: "Emma Nilsson-Nyman" link: "http://www.cs.lth.se/home/Emma.Nilsson_Nyman/" - name: "Torbjörn Ekman" link: "http://progtools.comlab.ox.ac.uk/members/torbjorn" - name: "Görel Hedin" link: "http://cs.lth.se/gorel_hedin" year: "2008" doi: "http://dx.doi.org/10.1007/978-3-642-00434-6_7" links: doi: "http://dx.doi.org/10.1007/978-3-642-00434-6_7" tags: - "layout sensitive parsing" - "indentation" - "layout" - "parsing" - "error recovery" researchr: "https://researchr.org/publication/Nilsson-NymanEH08" cites: 0 citedby: 0 pages: "95-113" booktitle: "SLE" kind: "inproceedings" key: "Nilsson-NymanEH08" - title: "Declarative Intraprocedural Flow Analysis of Java Source Code" author: - name: "Emma Nilsson-Nyman" link: "http://www.cs.lth.se/home/Emma.Nilsson_Nyman/" - name: "G{\\\"o}rel Hedin" link: "https://researchr.org/alias/g%7B%5Eb%22o%7Drel-hedin" - name: "Eva Magnusson" link: "https://researchr.org/alias/eva-magnusson" - name: "Torbj{\\\"o}rn Ekman" link: "https://researchr.org/alias/torbj%7B%5Eb%22o%7Drn-ekman" year: "2009" tags: - "Java" - "points-to analysis" - "analysis" - "data-flow" - "source-to-source" - "data-flow analysis" - "open-source" researchr: "https://researchr.org/publication/DBLP%3Ajournals-entcs-Nilsson-NymanHME09" cites: 0 citedby: 0 journal: "ENTCS" volume: "238" number: "5" kind: "article" key: "DBLP:journals-entcs-Nilsson-NymanHME09" - title: "Natural and Flexible Error Recovery for Generated Parsers" author: - name: "Maartje de Jonge" link: "https://researchr.org/profile/maartjedejonge/publications" - name: "Emma Nilsson-Nyman" link: "http://www.cs.lth.se/home/Emma.Nilsson_Nyman/" - name: "Lennart C. L. Kats" link: "http://www.lclnet.nl/" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2009" doi: "http://dx.doi.org/10.1007/978-3-642-12107-4_16" abstract: "Parser generators are an indispensable tool for rapid language development. However, they often fall short of the finesse of a hand-crafted parser, built with the language semantics in mind. One area where generated parsers have provided unsatisfactory results is that of error recovery. Good error recovery is both natural, giving recovery suggestions in line with the intention of the programmer; and flexible, allowing it to be adapted according to language insights and language changes. This paper describes a novel approach to error recovery, taking into account not only the context-free grammar, but also indentation usage. We base our approach on an extension of the SGLR parser that supports fine-grained error recovery rules and can be used to parse complex, composed languages. We take a divide-and-conquer approach to error recovery: using indentation, erroneous regions of code are identified. These regions constrain the search space for applying recovery rules, improving performance and ensuring recovery suggestions local to the error. As a last resort, erroneous regions can be discarded. Our approach also integrates bridge parsing to provide more accurate suggestions for indentation-sensitive language constructs such as scopes. We evaluate our approach by comparison with the JDT Java parser used in Eclipse. " links: doi: "http://dx.doi.org/10.1007/978-3-642-12107-4_16" successor: "https://researchr.org/publication/JongeKVS12" tags: - "semantics" - "rule-based" - "Java" - "Eclipse" - "rules" - "C++" - "search suggestions" - "context-aware" - "search" - "parsing" - "error recovery" - "systematic-approach" - "SGLR" - "grammar" researchr: "https://researchr.org/publication/JongeNKV09" cites: 0 citedby: 0 pages: "204-223" booktitle: "SLE" kind: "inproceedings" key: "JongeNKV09" - title: "Providing rapid feedback in generated modular language environments: adding error recovery to scannerless generalized-LR parsing" author: - name: "Lennart C. L. Kats" link: "http://www.lclnet.nl/" - name: "Maartje de Jonge" link: "https://researchr.org/profile/maartjedejonge/publications" - name: "Emma Nilsson-Nyman" link: "http://www.cs.lth.se/home/Emma.Nilsson_Nyman/" - name: "Eelco Visser" link: "http://eelcovisser.org" year: "2009" doi: "http://doi.acm.org/10.1145/1640089.1640122" abstract: "Integrated development environments (IDEs) increase programmer productivity, providing rapid, interactive feedback based on the syntax and semantics of a language. A heavy burden lies on developers of new languages to provide adequate IDE support. Code generation techniques provide a viable, efficient approach to semi-automatically produce IDE plugins. Key components for the realization of plugins are the language's grammar and parser. For embedded languages and language extensions, constituent IDE plugin modules and their grammars can be combined. Unlike conventional parsing algorithms, scannerless generalized-LR parsing supports the full set of context-free grammars, which is closed under composition, and hence can parse language embeddings and extensions composed from separate grammar modules. To apply this algorithm in an interactive environment, this paper introduces a novel error recovery mechanism, which allows it to be used with files with syntax errors -- common in interactive editing. Error recovery is vital for providing rapid feedback in case of syntax errors, as most IDE services depend on the parser -- from syntax highlighting to semantic analysis and cross-referencing. We base our approach on the principles of island grammars, and derive permissive grammars with error recovery productions from normal SDF grammars. To cope with the added complexity of these grammars, we adapt the parser to support backtracking. We evaluate the recovery quality and performance of our approach using a set of composed languages, based on Java and Stratego. " links: doi: "http://doi.acm.org/10.1145/1640089.1640122" successor: "https://researchr.org/publication/JongeKVS12" "technical report (pdf)": "http://www.lclnet.nl/publications/error-recovery.pdf" tags: - "parsing algorithm" - "semantics" - "rule-based" - "Java" - "SDF" - "composition" - "analysis" - "principles" - "C++" - "code generation" - "context-aware" - "Meta-Environment" - "parsing" - "scannerless parsing" - "systematic-approach" - "island grammars" - "ASF+SDF" - "grammar" - "Stratego" researchr: "https://researchr.org/publication/KatsJNV09" cites: 0 citedby: 1 pages: "445-464" booktitle: "OOPSLA" kind: "inproceedings" key: "KatsJNV09"