Updated
12 months
ago.
No love.
pyg will be a PEG parser library formed as an internal Python DSL. it will be used in cramex, a copycat of cram with expect support.
The surface is heading to resemble Boost.Spirit: grammars are composed using a vaguely (xBNF/PEG)-like syntax enabled through operator overloading.
>>> from pyg import Rule, chr_, int_
>>> n = Rule('number')
>>> o = Rule('operator')
>>> e = Rule('expression')
>>> e %= n >> o >> n
>>> o %= chr_('+-')
>>> n %= int_
>>> e.matches('42 + 69')
True, None
>>> e.matches('69')
True, None
>>> e.matches('42 69')
False, "Failed on line 1 column 3:\n42 69\n ^\n"
Looking for hackers with the skills:
python parsing peg
This project is part of:
Hack Week 10
Activity
Comments
-
over 7 years ago by rneuhauser | Reply
https://github.com/roman-neuhauser/py-impala - Import packages and modules from arbitrary directories and files
Similar Projects
openSUSE Leap release process improvements by lkocman
Goal:
I'd like to have the release proce...
Home assistant that doesn't spy on you - developer's edition by DKarakasilis
There are various home assistant solutions out ...
Try to write simple rope-base Python language-server for LSP protocol by mcepl
Future of tools supporting editors in dealing w...
Write a commandline client for the geekos by dheidler
There used to be a tool called tel
that would...