我不清楚 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?)
- 有什么好地方可以让我更好地理解这一点吗?
谢谢你的时间