How can I create a standalone parser for floating-point values? e.g.,
val double: Parsley[Double] = ???
I'm porting my Advent of Code solutions over to Scala and building a foundation for this year's Advent of Code. So, I would like to have a simple parser for floating-point values on-hand, just in case.
Hello!
How can I create a standalone parser for floating-point values? e.g.,
I'm porting my Advent of Code solutions over to Scala and building a foundation for this year's Advent of Code. So, I would like to have a simple parser for floating-point values on-hand, just in case.
I see that I could create a parser for floating-point values by creating a lexer (as described here https://github.com/j-mie6/Parsley/wiki/Building-a-Parser-for-Haskell#lexing), but this feels a bit over-kill for my use-case.
Is this the best way to approach this with Parsley or is there a simpler way?
Thank you!