You do indeed seem right on most of those points, Jured, but there's a couple that bear a closer look. I'm sure > doesn't need to be escaped when not inside a <> construction (just like the HTML I'm writing now, which is rather interesting, in a cool meta- sort of way, but I'm going off on a tangent)... but in that case, I'd escape it anyway, for parallelism. As to the last point, the meaning of $ did indeed change, and he meant $$, not $, since that is a newline in the middle of the string.
Confession: It does an Immortal Body good.
| [reply] |
As to the last point, the meaning of $ did indeed change, and he meant $$, not $, since that is a newline in the middle of the string.
No, there is no /m in the Perl5 version. I think the correct translation is \n? $.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
| [reply] [d/l] [select] |
$text =~ /<Diff.file>/; # Invoke through grammar
In Apocalypse 5, Larry uses ::, not . to separate grammar and rule names.
This is a method call.
Update: As Juerd rightly points out, there is a distinction between a grammer and a class, and their rules and methods. However, the same syntax is used to call a rule from a grammer, as a grammer can inherit from other grammer(s), delegate to other grammers, and possibly even autogenerate rules. In these cases, the rule needs to be treated as a method call.
Cheers,
Erik
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet | [reply] [d/l] |
This is a method call.
file is a rule, not a method. (Diff is a grammar, not a class. -- There is a parallel, but Damian and Larry interpret it differently)
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
| [reply] |