-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-116991: Improve pygen --help
for python
subparser
#116992
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving it and for the help! I personally started from CPython repository which contains folder Grammar
with only python.gram
. It would be nice to have python_in_c.gram
and python_in_python.gram
which makes the picture clear from the very beginning. But this is only my path. Maybe other paths could be improved as well. I didn't see it is well highlighted in Dev Guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
"python", | ||
help=( | ||
"Generate Python code, needs grammar definition with Python actions, " | ||
"see `we-like-parsers/pegen`, start with `data/python.gram`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should mention that repo. The input for the parser can be any grammar other than the general Python one. We use to generate the meta parser for example. I think linking to another repo it's actually more confusing.
This is also an internal tool without external user guarantees.
I would be on improving the help to mention a bit of this but I still prefer not to link against the original repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, how about this?
I've merged a simple version of |
pegen --help
should mention that it needs different grammar files #116991