ocaml-community / ISO8601.ml

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

add duration parsing #25

Open Swrup opened 7 months ago

Swrup commented 7 months ago

Hello,

This PR based on this draft adds duration parsing

zapashcanon commented 7 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 6 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 6 months ago

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