Ingy dot Net
2012-07-01 00:19:43 UTC
Greetings,
I got the 10 year itch to hack on Inline today. Nick Patch and I wrote an
Inline::C parser in Pegex. I commited it to the 'pegex' branch here:
https://github.com/ingydotnet/inline-pm/tree/pegex
It passes an initial test: C/xt/pegex.t
ParsePegex should be nearly as fast as ParseRegExp and is more beautiful
and maintainable than ParseRecescent.
See:
https://github.com/ingydotnet/inline-pm/blob/pegex/C/lib/Inline/C/ParsePegex.pm#L35
As you can see Pegex separates the Grammar from the AST building code, both
of which are fairly simple. Nick and I paired on this today and we found a
couple bugs in Pegex that keep the grammar from being even more readable.
I'll try to fix them soon.
Looking over the code base, it's obvious that Inline could be brought up to
date with Modern Perl. I'm willing to put some effort into that. Rob, do
you have the cycles to manage a new release over the couple months? (I
would probably do all my refactorings on branches, and let you integrate
and manage it).
Anyone who is interested, I started #inline on irc.perl.org to discuss it.
Cheers, Ingy
NOTE: This is the first Inline code contribution by Ingy döt Net! :D
I got the 10 year itch to hack on Inline today. Nick Patch and I wrote an
Inline::C parser in Pegex. I commited it to the 'pegex' branch here:
https://github.com/ingydotnet/inline-pm/tree/pegex
It passes an initial test: C/xt/pegex.t
ParsePegex should be nearly as fast as ParseRegExp and is more beautiful
and maintainable than ParseRecescent.
See:
https://github.com/ingydotnet/inline-pm/blob/pegex/C/lib/Inline/C/ParsePegex.pm#L35
As you can see Pegex separates the Grammar from the AST building code, both
of which are fairly simple. Nick and I paired on this today and we found a
couple bugs in Pegex that keep the grammar from being even more readable.
I'll try to fix them soon.
Looking over the code base, it's obvious that Inline could be brought up to
date with Modern Perl. I'm willing to put some effort into that. Rob, do
you have the cycles to manage a new release over the couple months? (I
would probably do all my refactorings on branches, and let you integrate
and manage it).
Anyone who is interested, I started #inline on irc.perl.org to discuss it.
Cheers, Ingy
NOTE: This is the first Inline code contribution by Ingy döt Net! :D