Skip to content

Document the new grammar #135

Closed
Closed

Description

@pablogsal

Now that we are in Beta3 and the release candidate is closer, we should start thinking about how we want to display the grammar in the documentation. Some initial discussion happened in the draft PR I opened here:

python#19969

Activity

  1. gvanrossum commented on Jun 12, 2020

    @gvanrossum

    My thought is that we may be better off doing it by hand. :-(

    Maybe we can collect the grammar fragments from the rest of the reference docs?

  2. pablogsal commented on Jun 12, 2020

    @pablogsal
    Author

    My thought is that we may be better off doing it by hand. :-(

    Yeah, the more I think about it the more I agree. Is a bit sad unfortunately because the duplicate work and the danger of keeping it out of date (lately we updated some of the grammar blocks in the reference docs were out of date IIRC).

    Maybe we can collect the grammar fragments from the rest of the reference docs?

    If we do that we would be free of having to explain PEG and how to read the PEG grammar but then not sure if we can sell it as "the official grammar" in the sense that the resulting grammar would be "untested".

    My gut feeling tells me that many of the people who would look at the grammar would likely want to reproduce it somehow or check some specific behaviour and for that it would be better to be as close as possible to the PEG one.

  3. gvanrossum commented on Jun 12, 2020

    @gvanrossum

    I think that people who want to reproduce exactly what we do should probably just read the source code of python.gram. What's more useful in the reference docs is probably something that qualifies as a complete grammar for users collected on one page. I recall that long ago when Pascal was my favorite language I couldn't afford the (only existing) Pascal book, but instead I had a photocopy of the grammar summary from an appendix of the book. I imagine there are still people who like that kind of thing.

  4. gvanrossum commented on Jul 25, 2020

    @gvanrossum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions