Skip to content

Instantly share code, notes, and snippets.

@bioduds
Created June 8, 2017 17:57
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 bioduds/18f12cfd064d063d1c555f4d33a37f24 to your computer and use it in GitHub Desktop.
Save bioduds/18f12cfd064d063d1c555f4d33a37f24 to your computer and use it in GitHub Desktop.
is this a bug?
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