3 ms·
Something could be based on the "Rosie Pattern Language"[0]. There is already a parser for en_US/en_EU dates[1], which should be simple to extend to date ranges
by Lanzaa 4y ago
Something could be based on the "Rosie Pattern Language"[0]. There is already a parser for en_US/en_EU dates[1], which should be simple to extend to date ranges.
Another option would be using Tree-sitter[2]. It would be overall similar to using the Rosie Pattern Language, but Tree-sitter seems to have a more active community.
I wouldn't be surprised if one could write an automated Tree-sitter to Rosie Pattern Language translator.
[0]: https://gitlab.com/rosie-pattern-language/rosie/-/blob/master/doc/raisondetre.md https://gitlab.com/rosie-pattern-language/rosie/-/blob/maste...
[1]: https://gitlab.com/rosie-pattern-language/rosie/blob/master/rpl/date.rpl https://gitlab.com/rosie-pattern-language/rosie/blob/master/...
[2]: https://tree-sitter.github.io/tree-sitter/ https://tree-sitter.github.io/tree-sitter/