Faster reachability analysis for LR(1) parsers

Frédéric Bour, F. Pottier
{"title":"Faster reachability analysis for LR(1) parsers","authors":"Frédéric Bour, F. Pottier","doi":"10.1145/3486608.3486903","DOIUrl":null,"url":null,"abstract":"We present a novel algorithm for reachability in an LR(1) automaton. For each transition in the automaton, the problem is to determine under what conditions this transition can be taken, that is, which (minimal) input fragment and which lookahead symbol allow taking this transition. Our algorithm outperforms Pottier's algorithm (2016) by up to three orders of magnitude on real-world grammars. Among other applications, this vastly improves the scalability of Jeffery's error reporting technique (2003), where a mapping of (reachable) error states to messages must be created and maintained.","PeriodicalId":212947,"journal":{"name":"Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering","volume":"123 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-10-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3486608.3486903","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

We present a novel algorithm for reachability in an LR(1) automaton. For each transition in the automaton, the problem is to determine under what conditions this transition can be taken, that is, which (minimal) input fragment and which lookahead symbol allow taking this transition. Our algorithm outperforms Pottier's algorithm (2016) by up to three orders of magnitude on real-world grammars. Among other applications, this vastly improves the scalability of Jeffery's error reporting technique (2003), where a mapping of (reachable) error states to messages must be created and maintained.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
更快的LR(1)解析器可达性分析
提出了一种求解LR(1)自动机可达性的新算法。对于自动机中的每个转换,问题是确定在什么条件下可以进行此转换,也就是说,哪个(最小)输入片段和哪个forward symbol允许进行此转换。我们的算法在现实世界的语法上比Pottier的算法(2016)高出三个数量级。在其他应用程序中,这极大地提高了Jeffery的错误报告技术(2003)的可伸缩性,其中必须创建和维护(可访问的)错误状态到消息的映射。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering Fast incremental PEG parsing New ideas: automated engineering of metamorphic testing environments for domain-specific languages Vision: the next 700 language workbenches Getting grammars into shape for block-based editors
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1