Created
June 8, 2017 17:57
-
-
Save bioduds/18f12cfd064d063d1c555f4d33a37f24 to your computer and use it in GitHub Desktop.
is this a bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit package EC::Tests; | |
grammar VERSION { | |
rule TOP { | |
'Hello I am ' <NODE> ' and my version is ' <VERSION> | |
} | |
token NODE { \d+ \. \d+ \. \d+ \. \d+ } | |
token VERSION { \d+ \. \d+ \. \d+ } | |
#rule RESPOND { ... } | |
} | |
class VERSION::Actions { | |
method TOP ($/) { say $/; } | |
#method RESPOND ($/) { say 'OK'; } | |
} | |
##################### | |
use v6; | |
use lib 'lib/grammars'; | |
use message; | |
say "Running"; | |
EC::Tests::VERSION.new.parse( | |
'Hello I am 12.12.12.12 and my version is 21.21.21', | |
:actions( EC::Tests::VERSION::Actions.new ) | |
); | |
say "Ending"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment