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

Added match stmt support to python.lark #1016

Merged
merged 2 commits into from
Mar 6, 2022

Conversation

MegaIng
Copy link
Member

@MegaIng MegaIng commented Oct 9, 2021

Following from #1015

@erezsh
Copy link
Member

erezsh commented Oct 18, 2021

Do you have a complicated example of using match? It would be nice to add some tests now that the Python grammar is "official".

@@ -84,5 +84,4 @@ def test_earley_equals_lalr():
if __name__ == '__main__':
test_python_lib()
# test_earley_equals_lalr()
# python_parser3.parse(_read(sys.argv[1]) + '\n')

# python_parser3.parse(_read(sys.argv[1]) + '\n')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# python_parser3.parse(_read(sys.argv[1]) + '\n')
# python_parser3.parse(_read(sys.argv[1]) + '\n')

@joseph-e-k
Copy link
Contributor

May I ask what the status of this PR is? It's relevant to a project I'm working on, so if other people don't have time for it I might be able to take it on myself.

@erezsh
Copy link
Member

erezsh commented Mar 6, 2022

Hi @joseph-e-k , the only thing holding this PR is that there aren't any tests for it.

In general, we don't have many tests for the Python grammar yet, but I do run it on the standard library to validate. But the match keyword isn't used there. Anyway, we should start to have some tests for it, now that we have an "official" grammar.

@joseph-e-k
Copy link
Contributor

@erezsh, I have written some tests for the "match" statement (which pass, you'll be pleased to hear). Could you walk me through the process of actually contributing to this repo? The technicalities tend to be slightly different for each project.

So far I have cloned this repository locally, checked out this feature branch (MegaIng/match-python3), merged from master, and added the tests.

At this point, which of the following is appropriate?

  • Push to here
  • Push to MegaIng's fork
  • Make my own fork and submit a PR from there to here
  • Make my own fork and submit a PR from there to MegaIng
  • Something else?

@MegaIng
Copy link
Member Author

MegaIng commented Mar 6, 2022

@joseph-e-k I would suggest making a fork and opening a new PR to here (lark-parser/lark) . We can then either merge both of the PRs or just yours.

@erezsh erezsh merged commit 9be9ac5 into lark-parser:master Mar 6, 2022
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.

4 participants