...
首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Providing Rapid Feedback in Generated Modular Language Environments Adding Error Recovery to Scannerless Generalized-LR Parsing
【24h】

Providing Rapid Feedback in Generated Modular Language Environments Adding Error Recovery to Scannerless Generalized-LR Parsing

机译:在生成的模块化语言环境中提供快速反馈,为无扫描仪广义LR解析添加错误恢复

获取原文
获取原文并翻译 | 示例
           

摘要

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.
机译:集成开发环境(IDE)可以提高程序员的工作效率,并基于语言的语法和语义提供快速的交互式反馈。新语言的开发人员要提供足够的IDE支持,负担很重。代码生成技术提供了一种可行的,高效的方法来半自动生成IDE插件。实现插件的关键组件是语言的语法和解析器。对于嵌入式语言和语言扩展,可以组合组成IDE插件模块及其语法。与传统的解析算法不同,无扫描程序的广义LR解析支持完整的上下文无关语法集,该上下文上下文在合成条件下是封闭的,因此可以解析由单独的语法模块组成的语言嵌入和扩展。为了在交互式环境中应用该算法,本文介绍了一种新颖的错误恢复机制,该机制可将其用于具有语法错误的文件,这在交互式编辑中很常见。错误恢复对于在语法错误的情况下提供快速反馈至关重要,因为大多数IDE服务都依赖于解析器-从语法突出显示到语义分析和交叉引用。我们将基于岛语法的原理作为方法,并从正常SDF语法导出具有错误恢复结果的容许语法。为了应对这些语法增加的复杂性,我们对解析器进行了调整以支持回溯。我们使用基于Java和Stratego的一组组合语言来评估我们的方法的恢复质量和性能。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号