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

docs(core): extend the grammar definition #103

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lukeribchester
Copy link

@lukeribchester lukeribchester commented Feb 7, 2024

This pull request extends the Pact grammar definition documented in Semantics.md.

Draft: The current definition is approximately complete based on the current Pact 5 parser implementation, but contains a few minor issues which are visible when testing against the Pact test files. These issues will be documented, discussed, and fixed here before merging this pull request.

To Do

  • Finalise operators.

Pull Request Checklist

This document reformats `Semantics.md` without changing its content.

Signed-off-by: Luke Gareth Ribchester <[email protected]>
@jmcardon
Copy link
Member

jmcardon commented Feb 8, 2024

Hey @lukeribchester, thanks for the PR! Looks good so far, let me know what issues come up, because the current parser spec works against all the test files.

@jmcardon jmcardon closed this Feb 8, 2024
@jmcardon jmcardon reopened this Feb 8, 2024
Signed-off-by: Luke Gareth Ribchester <[email protected]>
@lukeribchester
Copy link
Author

Hey @lukeribchester, thanks for the PR! Looks good so far, let me know what issues come up, because the current parser spec works against all the test files.

Hey @jmcardon, thank you and apologies for my delayed reply. I've further refined the grammar definition based on my experiences working with it for the IntelliJ Platform plugin release, and I've separated most special characters from the identifier token definition into their respective definitions and categories. My parser now functions correctly against all test files except for fv-syntax-regression.repl — where individual % and @ symbols raise syntax errors. My understanding is that neither of these are operators in Pact nor Lisp. I could classify them as identifiers but that feels weird. What do you recommend?

@lukeribchester
Copy link
Author

This is currently in use in version 0.2.0 of the Pact plugin for the IntelliJ Platform if you wish to check it out — it's the first release with native language support.

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.

2 participants