TreeRegex : An Extension to Regular Expressions for Matching and Manipulating Tree-Structured Text ( Technical Report )

semanticscholar(2017)

引用 0|浏览0
暂无评分
摘要
Tree-structured text is ubiquitous in software engineering and programming tasks. However, despite its prevalence, users frequently write custom, specialized routines to query and update such text. For example, a user might wish to rapidly prototype a compiler for a domain-specific language by issuing successive transformations, or they might wish to identify all the call sites of a particular function in a project (e.g. eval in JavaScript). We propose a natural and intuitive extension to regular expressions, called TreeRegex, which can specify patterns over tree-structured text. A key insight behind the design of TreeRegex is that if we annotate a string with special markers to expose information about the string’s tree structure, then a simple extension to regular expressions can be used to describe patterns over the annotated string. We develop an algorithm for matching TreeRegex expressions against annotated texts and report on five case studies where we find that using TreeRegex simplifies various tasks related to searching and modifying treestructured texts. ACM Reference format: Benjamin Mehne. 2017. TreeRegex: An Extension to Regular Expressions for Matching and Manipulating Tree-Structured Text (Technical Report). In Proceedings of , , , 16 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要