ocaml-community / ISO8601.ml

Parser and printer for date-times in ISO8601
https://ocaml-community.github.io/ISO8601.ml
MIT License
29 stars 13 forks source link

add duration parsing #25

Open Swrup opened 9 months ago

Swrup commented 9 months ago

Hello,

This PR based on this draft adds duration parsing

zapashcanon commented 9 months ago

Hi,

Could you describe what is left to do ?

After a first quick look: could you use a more modern Menhir syntax ? Using $1 instead of named values is hard to read IMO.

sagotch commented 8 months ago

Hi,

Could you describe what is left to do ?

After a first quick look: could you use a more modern Menhir syntax ? Using $1 instead of named values is hard to read IMO.

Regarding how trivial the parser is, shouldn't it directly de implemented in the lexer, which would avoid the menhir dependency? Introducing this new dependency is not really a problem, but I find it to be overkill for what it does.

Swrup commented 8 months ago

that would be nice, but I don't know how to do it in just ocamllex