Could ergonomics for simple use cases be improved? #257
benhutchison
started this conversation in
General
Replies: 1 comment 1 reply
-
Thanks for the comment! Yes, at some point I'd like to build a few out of the box As a teacher I'm always a bit torn about this, because while you're right that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I came to Parsely because I was noticing a proliferation of different libraries that do some kind of parsing, and many seem to be subsets of what Parsely can do. I thought, if I'm going to invest time, let's just learn the general parser combinator approach rather than lots of little DSLs that each invent their own abstraction that's really a parser.
And overall it's been a good experience in that I succeeded in getting Parsely to do what I need.
But. Feels there are definitely ways that Parsely could make simple DSL tasks more ergonomic and require half, or a quarter, the setup code.
In my case, Im parsing a series of lines which are commands. Basically, I have whitespace separators, some soft-keywords, commas, and everything else I want to treat as captured strings (identifiers).
That requires fiddling around with a lexer, but there's only one that comes out of the box, with heaps of dials, and by default it won't recognise any identifiers. I found that disappointing... what about some common, sensible defaults?
When you're new, this kind of know-how is expensive to acquire, and honestly, I don't want to become any sort of expert on lexing yet. Just give me something that will (probably) work, preconfigured at a simple name.
Beta Was this translation helpful? Give feedback.
All reactions