Created
May 5, 2018 15:38
-
-
Save Master-Poiku/c2d46cef9dc0bfe1a5e9bf62a1aff535 to your computer and use it in GitHub Desktop.
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
say "-- Ori docu"; | |
my token non-space-y { 'once' 'upon' 'a' 'time' } | |
my rule space-y { 'once' 'upon' 'a' 'time' } | |
say so 'onceuponatime' ~~ &non-space-y; # OUTPUT: «True» | |
say so 'once upon a time' ~~ &non-space-y; # OUTPUT: «False» | |
say so 'onceuponatime' ~~ &space-y; # OUTPUT: «False» | |
say so 'once upon a time' ~~ &space-y; # OUTPUT: «True» | |
say "-- Differ to docu:"; | |
my token non-space-x { 'a' ':=' '1' } | |
my rule space-x { 'a' ':=' '1' } | |
say so 'a:=1' ~~ &non-space-x; # OUTPUT: True | |
say so 'a := 1' ~~ &non-space-x; # OUTPUT: False | |
say so 'a:=1' ~~ &space-x; # OUTPUT: True <<<<<<<<<<<<< Why this line differ ? | |
say so 'a := 1' ~~ &space-x; # OUTPUT: True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment