Skip to content

fix: correct TatSu grammar syntax in docs/use.rst (@@grammar[Calc] → @@grammar::Calc) - #434

Open
Jah-yee wants to merge 1 commit into
neogeny:mainfrom
Jah-yee:main
Open

Jah-yee wants to merge 1 commit into
neogeny:mainfrom
Jah-yee:main

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Fixes issue #432 — the documentation example in docs/use.rst uses the old TatSu grammar syntax @@grammar[Calc] which should be @@grammar::Calc.

Changes

  • docs/use.rst line 49: @@grammar[Calc] → @@grammar::Calc

Verification

The correct TatSu v2 grammar syntax uses double colon (::) for the @@grammar directive.

Thanks to the issue reporter for identifying this documentation error!

@Jah-yee

Jah-yee commented Oct 27, 2026

Copy link
Copy Markdown
Author

The docs/use.rst grammar example still uses the pre-v2 directive syntax @@grammar[Calc], which is only valid in TatSu v1 grammars — on the current v2 parser the bracket form is not accepted, so the example as written does not run.

This PR changes the single line to the v2 form @@grammar::Calc, matching the syntax used by the other grammars in the repository's own test suite and docs. The change is one line in one file, with no code or parser changes.

It addresses the documentation error reported in issue #432.

If you would rather the v1 syntax stay in the docs for historical reference, or if the snippet needs an accompanying note about the v1 -> v2 migration, say which and I will adjust the same commit.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant