Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created December 23, 2022 18:30
Show Gist options
  • Save Whateverable/c35d9be84594f3400c17ca24273d9261 to your computer and use it in GitHub Desktop.
Save Whateverable/c35d9be84594f3400c17ca24273d9261 to your computer and use it in GitHub Desktop.
bisectable6
grammar Demo2 { token TOP { <to2> }; token to2 { \d+ }; }; my $var2 = Demo2.parse("111"); grammar Demo { token TOP { <to> }; token to { \d+ }; }; my $var = Demo.parse("111"); say $var<to>, $var2<to2>; say $var<to> eqv $var2<to2>
¦«2015.12,2016.01.1,2016.02,2016.03,2016.04,2016.06,2016.07.1,2016.08.1,
2016.09,2016.10,2016.11,2016.12,2017.01,2017.02,2017.03»:
「111」「111」
True
¦«2016.05»:
「111」「111」
False
¦«2015.12,2016.01.1,2016.02,2016.03,2016.04,2016.06,2016.07.1,2016.08.1,
2016.09,2016.10,2016.11,2016.12,2017.01,2017.02,2017.03»:
「111」「111」
True
¦«2017.04.3,2017.05,2017.06,2017.07,2017.08,2017.09,2017.10,2017.11,
2017.12,2018.01,2018.02.1,2018.03,2018.04.1,2018.05,2018.06,2018.08,
2018.09,2018.10,2018.11,2018.12,2019.03.1,2019.07.1,2019.11,2020.01,
2020.02.1,2020.05.1,2020.06,2020.07,2020.08.2,2020.09,2020.10,2020.11,
2020.12,2021.02.1,2021.03,2021.04,2021.05,2021.06,2021.07,2021.08,
2021.09,2021.10,2021.12,2022.02,2022.03,2022.04,2022.06,2022.07,2022.12,
HEAD(d52342e)»:
「」「111」
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment