Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar definition error and Peggy grammar file contrib #233

Open
kf6kjg opened this issue Sep 27, 2023 · 1 comment
Open

Grammar definition error and Peggy grammar file contrib #233

kf6kjg opened this issue Sep 27, 2023 · 1 comment

Comments

@kf6kjg
Copy link

kf6kjg commented Sep 27, 2023

I've written a first-pass rough draft of a Peggy-based grammar file. Attached for reference: libconfig.peg.txt

While drafting that file I found that the grammar definition for <float> in the docshas a glitch that makes it not pass the test file: the second condition of the regex requires the + or - prefix, thus a float specified as 1E6 fails unless it's declared as +1E6. Adding a simple ? to that clause fixes the problem.

For the second half of this question, where can I contribute the grammar to? I'd like to PR it into this repo, or a related one, so that it comes with the ecosystem. Alternatively I could publish it myself, but just feels like it'll just be another whiff of gas in the wide world.

@hyperrealm
Copy link
Owner

Hi, please open a pull request for these changes. There is a 'contrib' directory where you can put your grammar file. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants