have you tried writing reusable combinators with it yet? that is a big part how nom makes me productive when writing parsers
-
-
Replying to @dignifiedquire
I've never written or used a parser combinator before. Would love to know how it works out. Intuitively I would imagine using regex + thiserror + omnom would mostly provide the same functionality with equal-ish brevity?
2 replies 0 retweets 0 likes -
Replying to @yoshuawuyts @dignifiedquire
Basing this on having written a mime parser with omnom:https://github.com/yoshuawuyts/omnom/blob/master/examples/mime.rs …
2 replies 0 retweets 0 likes -
Replying to @yoshuawuyts
the other is, how can I parse from a String/Vec without allocating? the current api seems to force allocations
1 reply 0 retweets 1 like -
Replying to @dignifiedquire
That's a great q. So you don't have to allocate in most cases I think. Just need somewhere to read bytes into, but that can be reused. Could even only do parsing to find offsets and then use that as a backing store for values. More of a pattern tho.
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
right, with the skip variants you could do that, I guess that means you should probably add skip_until :)
1 reply 0 retweets 1 like -
-
Replying to @yoshuawuyts
trying to write a semver parser using it now, lets see how that goes
1 reply 0 retweets 1 like -
Replying to @dignifiedquire1 reply 0 retweets 0 likes
-
Replying to @yoshuawuyts
found some bugs in read-whilehttps://github.com/yoshuawuyts/omnom/pull/4 …
1 reply 0 retweets 1 like
Ohh, thanks! merged & published
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.