# parser: ensure the documented grammar matches grammar.y · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f8f1c6ac06636d816e5dff205d6713a337df387d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f8f1c6ac06636d816e5dff205d6713a337df387d

Requested commit: f8f1c6ac06636d816e5dff205d6713a337df387d

Commit: f8f1c6ac06636d816e5dff205d6713a337df387d

Tree: 567433e6e3321862260db5b610c33f87788b1f80

Author: Manlio Perillo

Committer: Veikka Tuominen

## Message

```
parser: ensure the documented grammar matches grammar.y

Move the parsing of Root from the parse function to the Parser.parseRoot
method.

Add an empty line between each rule, for consistency with grammar.y.

Ensure that normal doc-comments are always on the top, for consistency.

Add extract-grammar.zig to the tools directory; it is used to extract
the PEG grammar from parse.zig, so that it can be compared with
grammar.y.

```

## Parents

- [4b5fc5239c37fa3f49965188256a781c7b1277a3](https://git.cafe/gitcafe/zig/commit/4b5fc5239c37fa3f49965188256a781c7b1277a3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f8f1c6ac06636d816e5dff205d6713a337df387d?format=markdown)
