计算机科学 > 程序设计语言
[提交于 2022年12月29日]
标题:Matchertext: Towards Verbatim Interlanguage Embedding
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Embedding text in one language within text of another is commonplace for numerous purposes, but usually requires tedious and error-prone "escaping" transformations on the embedded string. We propose a simple cross-language syntactic discipline, matchertext, which enables the safe embedding a string in any compliant language into a string in any other language via simple "copy-and-paste" - in particular with no escaping, obfuscation, or expansion of embedded strings. We apply this syntactic discipline to several common and frequently-embedded language syntaxes such as URIs, HTML, and JavaScript, exploring the benefits, costs, and compatibility issues in adopting the proposed matchertext discipline. One early matchertext-based language is MinML, a concise but general alternative syntax for writing HTML or XML.
提交历史
来自:Bryan Ford[v1] 2022年12月29日 星期四 00:10:31 UTC