Skip to content

Instantly share code, notes, and snippets.

@cognominal
Last active March 25, 2021 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cognominal/5472705 to your computer and use it in GitHub Desktop.
Save cognominal/5472705 to your computer and use it in GitHub Desktop.
three equivalent programs albeit with different runtime costs #raku #example
a | b
The next two must be part of a grammar apparatus
token char($char) { $char } ;
<char('a')> | <char('b')>
proto token char { <...> }
token char:sym<a> { a }
token char:sym<b> { b }
<char>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment