Closed yhirose closed 2 years ago
Yes of course you can use it and because it's basically your hardcoded grammar in peglib.h
in peg
format it's already your.
Another interesting addition would be to have in cpp-peglib
a function to dump the grammar as C++
code/calls like it's used inpeglib.h
here https://github.com/yhirose/cpp-peglib/blob/fed85fe14d0d2cf83fc649a72bd55a50f28439b2/peglib.h#L3229 (chpeg
has --bytecodec
option).
Also there is this collection of grammars https://github.com/ChrisHixon/chpeg/issues/20 and others that can be made available.
Thanks for the fine contribution. Also I made a separate issue for the dump function. That sounds a very good idea, so that I can generate the latest cpp-peglib parser grammar at any time.
Also there is this collection of grammars ChrisHixon/chpeg#20 and others that can be made available.
That's wonderful as well. Please send me pull requests whenever you feel the grammars are complete and stable. They can be very good references for others. Please make sure to include your credit (like your copyright statement and original credits if exist) and a license statement (such as MIT) in each grammar file, because I would like to respect rights of the authors. :)
I just added cpp-peglib
to https://en.wikipedia.org/wiki/Comparison_of_parser_generators
@mingodad, I am impressed with the PEG grammar for cpp-peglib parser you showed in some previous issues. Is it possible for you to contribute it to this project? That could be very useful when I enhance cpp-peglib parser syntax. If it's ok, could you send a pull request which puts the grammar file in
grammar
folder? (Could the file name be likecpp-peglib.peg
?) Thanks for consideration!