Perl6/Raku has built in grammers that can do that idiomatically.
If you have a couple minutes, give this a glance. It will give you an idea.
https://andrewshitov.com/2018/10/31/a-simple-parser-in-perl-...
I am no expert in haskell either. But parsec is similar in concept.
Perl6/Raku has built in grammers that can do that idiomatically.
If you have a couple minutes, give this a glance. It will give you an idea.
https://andrewshitov.com/2018/10/31/a-simple-parser-in-perl-...
I am no expert in haskell either. But parsec is similar in concept.