首页> 外文会议>24th annual ACM conference on object oriented programming, systems, languages and applications 2009 >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 plug-ins are the language's grammar and parser. For embedded languages and language extensions, constituent IDE plu-gin 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的plu-gin模块及其语法进行组合。与传统的解析算法不同,无扫描程序的广义LR解析支持完整的上下文无关语法集,该上下文上下文在合成时是封闭的,因此可以解析由单独的语法模块组成的语言嵌入和扩展。为了在交互式环境中应用该算法,本文介绍了一种新颖的错误恢复机制,该机制可将其与存在语法错误的文件一起使用-在交互式编辑中很常见。错误恢复对于在语法错误的情况下提供快速反馈至关重要,因为大多数IDE服务都依赖于解析器-从语法突出显示到语义分析和交叉引用。我们基于岛文语法的原理,并从正常的SDF语法中导出带有错误恢复产生的允许文法。为了应对这些语法增加的复杂性,我们对解析器进行了调整以支持回溯。我们使用一套基于Java和Stratego的组合语言来评估我们的方法的恢复质量和性能。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号