Created
September 24, 2017 20:00
-
-
Save softmoth/5a3e34b041cfe7ba045503c7d86f617b to your computer and use it in GitHub Desktop.
YAMLish failure `foo: no good` doesn't parse
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
#! /usr/bin/env perl6 | |
grammar Grammar { | |
rule TOP { <element> } | |
token plain { \N* } | |
token inline { yes | no } | |
token element { | |
<value=inline> || <value=plain> | |
} | |
} | |
use Data::Dump; | |
for 'no', 'no bar', 'xno bar' { | |
note "\n$_"; | |
Grammar.parse($_); | |
dd $/; | |
dd $/<element>.Str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment