一种实用的类型敏感解析方法

Ken Sailor, Carl McCrosky
{"title":"一种实用的类型敏感解析方法","authors":"Ken Sailor,&nbsp;Carl McCrosky","doi":"10.1016/0096-0551(94)90017-5","DOIUrl":null,"url":null,"abstract":"<div><p>Type-sensitive parsing of expressions is context-sensitive parsing based on type. Previous research reported a general class of algorithms for type-sensitive parsing. Unfortunately, these algorithms are impractical for languages that infer type. This paper describes a related algorithm which is much more efficient—its incremental cost is linear (with a small constant) in the length of the expression, even when types must be deduced. Our method can be applied to any statically typed language solving a variety of problems associated with conventional parsing techniques including problems with operator precedence and the interaction between infix operators and higher order functions.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"20 2","pages":"Pages 101-116"},"PeriodicalIF":0.0000,"publicationDate":"1994-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/0096-0551(94)90017-5","citationCount":"0","resultStr":"{\"title\":\"A practical approach to type-sensitive parsing\",\"authors\":\"Ken Sailor,&nbsp;Carl McCrosky\",\"doi\":\"10.1016/0096-0551(94)90017-5\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>Type-sensitive parsing of expressions is context-sensitive parsing based on type. Previous research reported a general class of algorithms for type-sensitive parsing. Unfortunately, these algorithms are impractical for languages that infer type. This paper describes a related algorithm which is much more efficient—its incremental cost is linear (with a small constant) in the length of the expression, even when types must be deduced. Our method can be applied to any statically typed language solving a variety of problems associated with conventional parsing techniques including problems with operator precedence and the interaction between infix operators and higher order functions.</p></div>\",\"PeriodicalId\":100315,\"journal\":{\"name\":\"Computer Languages\",\"volume\":\"20 2\",\"pages\":\"Pages 101-116\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1994-05-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://sci-hub-pdf.com/10.1016/0096-0551(94)90017-5\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computer Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/0096055194900175\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Languages","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/0096055194900175","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

表达式的类型敏感解析是基于类型的上下文敏感解析。以前的研究报告了一类用于类型敏感解析的通用算法。不幸的是,这些算法对于推断类型的语言是不切实际的。本文描述了一种更有效的相关算法,它的增量成本在表达式长度上是线性的(带有一个小常数),即使必须推导类型。我们的方法可以应用于任何静态类型语言,解决与传统解析技术相关的各种问题,包括操作符优先级问题和中缀操作符与高阶函数之间的交互问题。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A practical approach to type-sensitive parsing

Type-sensitive parsing of expressions is context-sensitive parsing based on type. Previous research reported a general class of algorithms for type-sensitive parsing. Unfortunately, these algorithms are impractical for languages that infer type. This paper describes a related algorithm which is much more efficient—its incremental cost is linear (with a small constant) in the length of the expression, even when types must be deduced. Our method can be applied to any statically typed language solving a variety of problems associated with conventional parsing techniques including problems with operator precedence and the interaction between infix operators and higher order functions.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信