m4rw3r / chomp

A fast monadic-style parser combinator designed to work on stable Rust.
Apache License 2.0
243 stars 19 forks source link

Implement alternative `parse!` macro using compiler plugin #34

Open m4rw3r opened 8 years ago

m4rw3r commented 8 years ago

The purpose of this would be to avoid the macro recursion limit (even though library users can increase the limit if need be) but mainly to provide good error messages for syntax errors. The intention is NOT to replace the existing parse! macro at this point.

Possible ways of implementing this

libmacro

A crate in the standard distribution. It is intended to be stabilized and become part of stable Rust. Will require nightly until stable enough.

syntex

Separate library working as a macro-preprocessor. Can work on stable. The downside here is that any errors still present in the generated code will not point back to the original code which might make debugging errors not directly related to parse! syntax annoying.