-
Notifications
You must be signed in to change notification settings - Fork 12
Adopt new structure for proper grammar generation #60
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
base: main
Are you sure you want to change the base?
Conversation
Remove tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for putting this together. I think the repository is in a much better shape with your changes. I have some small comments, but all of those can also be performed later. From my tests, the parser generation for each language appears to work as expected.
Thanks a lot for the quick answers. I guess we could merge this very soon. The main hindrance are the merge conflicts. Can you resolve them @gravemalte |
Sure I will resolve them. Next week I have some time to do the rest. |
Makes sense. I asked @jagalindo and @rotkiv93 for further reviews as they appear to be the main users/developers for the Python and JS parsers respectively. |
This PR makes sense to me. I'd agree on having different readmes for different targets if needed. We just got the uvl org in pypi, so we cab move the pypi package to the shared org. The organization seems right to me. What do you think @rotkiv93? |
I checked our JS version, and we need to change the package.json file in order to be able to build the grammar properly. We need to change this line: Line 7 in bfecb77
With this command: Also, we checked and the grammar doesnt compile properly with older antlr4 versions, for example, v4.7.2 does not work properly, we should put a disclaimer somewher (probably in the JS README) |
I will change this thanks for pointing out. Speaking of JS, I have a question about the export statement in the index.js. |
@gravemalte You are right—it's weird to have it like this. There's no problem with deleting it from the |
I resolved all the conflicts and addressed the comments. But please test this again. I tried to run the test suite from @MiriamGaus in PR Universal-Variability-Language/java-fm-metamodel#15 with my changes, but two tests are failing. I don't know if they failed before. One is about the math expression that a result is wrong, the other is about the |
In the old version the test on the |
@MiriamGaus I will merge now your changes in my branch and try again. |
@MiriamGaus the Expression fixed the math error like you said, but the ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JS part LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd try to investigate if there is any mechanism to update automatically the version numbers so it doesn't crash in the ci actions.
This PR is a draft/suggestion PR. Collaboration with @MiriamGaus and @coemgen1992.
We discovered that this repository is in a very poor state, both in terms of documentation and dependencies. While we want to promote UVL, achieving this requires a proper structure and good understandability of the repository. Currently, the information in the README is outdated, the dependencies are outdated, and it is difficult to generate parsers for different languages. The CI (as far as I know) is not working properly. For these reasons, we decided to clean up the entire repository and document it thoroughly.
This effort introduces changes to the structure, the documentation, and the grammar files. I have split the grammar into lexer- and parser-relevant files to ensure modular behavior when generating UVL for different programming languages. Additionally, integrating new languages is now easier than ever. The CI can easily generate the parser/lexer, and in the future, we plan to introduce a proper test environment.
The tests will be moved to a new repository, and we will integrate them as a git submodule
Please provide feedback and bear with us if you encounter any mistakes.