3 ms·
> I need a simple parser and found this https://package.elm-lang.org/packages/elm-tools/parser/latest/ https://package.elm-lang.org/packages/elm-tools/parser/la
by kccqzy 7y ago
> I need a simple parser and found this https://package.elm-lang.org/packages/elm-tools/parser/latest/ https://package.elm-lang.org/packages/elm-tools/parser/lates...
> I guess if you have a CS degree you can understand how that parser works, I couldn’t. The community tried to help me on the forums but you are supposed to know a lot of key functional concepts to even understand their answers.
Have you tried writing a simple parser (i.e. just recursive descent) yourself in another language like Python? If so, you'll find the approach of using parser combinators in your Elm example rather superior. If you do not currently understand the foundational concepts of writing a parser, perhaps you should understand them before starting to write a parser.
Or perhaps consider this. Can you get by without writing a parser? If the grammar you're trying to parse is well-known you might find an existing parser; if the grammar is extremely simple you might just use a few string manipulation functions to get the job done.