npeg has very nice features:

  * A complete documentation with clear code.
  * Peg generation at compile time.
  * AST captures to build an Abstract Syntax Tree while matching the grammar.
  * Nim code embedding in the rules.
  * Debugging and tracing functions, with the nice grammar tree view.



Unfortunately, it has two _missing features_ that prevent me using instead of 
spending my time trying to debug my Nim's pegs grammar:

  * It has its own grammar syntax for rules that does not follow (E)BNF like 
Nim's pegs. People are somewhat more used to EBNF syntax, with postfix 
occurrence patterns, assumed sequences, etc. Existing rules would have to be 
rewritten and debugged to work with npeg.
  * It does not support Unicode, meaning being able to parse UTF-8 strings 
using Runes and Unicode-aware built-in macros, like pegs does, for instance 
with \white (=any Unicode whitespace character).



If you were to make it API compatible with Nim's pegs, it would be a great 
replacement for the pegs module.

Reply via email to