regex - 我如何更好地理解 SmaCC 如何在正则表达式中使用“isMethod”功能?
问题描述
我不清楚 SmaCC 正则表达式中的“isMethod”支持。
这两个消息来源本质上说的是同一件事
- https://files.pharo.org/books-pdfs/booklet-Smacc/2017-10-29-Smacc.pdf
- http://www.refactoryworkers.com/SmaCC/Scanner.html
<isMethod> Copies the characters where Character>>isMethod returns true into
the current regular expression. For example, instead of using \d, we could use
<isDigit> since Character>>isDigit returns true for digits.
没什么好说的,所以我有几个问题:
- 这是否意味着我可以使用 isWhitespace、isNotWhitespace 等?(我怎么知道名字?)
- 这是否意味着我可以使用自己的代币?(如果我定义了这些,比如 isVariable、isMultiLineComment?)
- 有什么好地方可以让我更好地理解这一点吗?
谢谢你的时间
解决方案
GToolkit Discord 是解决这个问题的更好地方,因为其中一位原作者在那里闲逛
推荐阅读
- python - 在编辑器中打开文件时的崇敬顺序
- android-studio - Genymotion 模拟器启动虚拟设备时出错,“player.exe”已停止
- ios - 修复 SwiftUI 表单中奇怪的 DatePicker 动画行为
- php - 想要从 Laravel 嵌套关系创建一个家谱
- amazon-web-services - AWS RDS 加密允许通过 mysql-client 访问生成纯文本
- c++ - 尽管一切看起来都很好,但值并没有交换
- sequelize.js - sequelize 中的批量删除和销毁有什么区别?
- adobe - Adobe Experience Manager - 用于无头消费的隐藏内容
- javascript - 仅接受十六进制输入
- java - 无法使用数据流访问记录类型数组列进行键值转换