goodmami / pe

Fastest general-purpose parsing library for Python with a familiar API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add common patterns in code

goodmami opened this issue · comments

The documentation has some common patterns defined, but it would also be useful to have some defined in code. But until there's a feature to add external definitions (e.g., a parameter to pe.compile() or some kind of import syntax within a grammar), these patterns will only be useful for non-parsed grammars using operator primitives.

More inspiration:

  • Lark has some basics, like digits and whitespace (link)
  • PEG.js includes unicode categories (link)