mecha icon indicating copy to clipboard operation
mecha copied to clipboard

A parser combinator library for Zig

Results 11 mecha issues
Sort by recently updated
recently updated
newest added

Is it supported to build documentation from doc comments?

Hi I am very interested in using mecha for a toy language. I have never used a parser combinator before and as such am struggling with how to use it....

Would be super nice to have a function that parses delimiter separated values (dsv) into a type. Api would be something like this: ``` pub fn dsv(comptime T: type, comptime...

Allows using the built-in package manager

From reading the code, it's unclear how I'm supposed to define a function as when I want to use `map`. For instance, if I have this parser: ```zig const if_statement...

I'm trying to write a very simple arithmetic expression parser. I'm not even trying to have any specific operator precedence yet, just going left to right. I'm ending up in...

There is a use case for this library, where the parser should report, where it failed. Since that would allow for some "graceful" failing. Instead of crashing, there is some...

Oneof(stringparser, combine)

Greetings - and thank you for this awesome module! Amazing demonstration of the power of Zig comptime! I built a "peek" parser that does not consume anything, but checks to...

See https://docs.rs/nom/latest/nom/bytes/complete/fn.escaped_transform.html for reference. This allows the parser to return a unescaped version of an string. E.g. "\\n" ->"\n" Maybe also adding `escaped` function would be great.