-
Notifications
You must be signed in to change notification settings - Fork 328
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
Add Rust frontend #585
Add Rust frontend #585
Conversation
# Conflicts: # pom.xml
# Conflicts: # README.md # jplag.cli/pom.xml # jplag/src/main/java/de/jplag/options/LanguageOption.java # pom.xml
# Conflicts: # README.md
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.
Just a few issues and questions...
jplag.frontend.rust/src/main/java/de/jplag/rust/JplagRustListener.java
Outdated
Show resolved
Hide resolved
jplag.frontend.rust/src/main/java/de/jplag/rust/JplagRustListener.java
Outdated
Show resolved
Hide resolved
jplag.frontend.rust/src/main/java/de/jplag/rust/JplagRustListener.java
Outdated
Show resolved
Hide resolved
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.
General remarks without checking the actual tokenization
jplag.frontend.rust/src/main/java/de/jplag/rust/RustTokenConstants.java
Outdated
Show resolved
Hide resolved
jplag.frontend.rust/src/main/java/de/jplag/rust/ParserState.java
Outdated
Show resolved
Hide resolved
jplag.frontend.rust/src/main/java/de/jplag/rust/ParserState.java
Outdated
Show resolved
Hide resolved
jplag.frontend.rust/src/main/java/de/jplag/rust/ParserState.java
Outdated
Show resolved
Hide resolved
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.
Only one minor comment at one class
jplag.frontend.rust/src/main/java/de/jplag/rust/grammar/RustLexerBase.java
Outdated
Show resolved
Hide resolved
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.
Looks good, now this PR only depends on the token printer changes.
The code smells are acceptable for my part. Should be ready to merge. |
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.
@robinmaisch one final request: Could you update the newly added language table in the project readme? Either here or in a separate PR.
Kudos, SonarCloud Quality Gate passed! |
Ah, sure! There you go. |
This PR introduces a Rust frontend to JPlag. Its design is similar to the other frontends based on ANTLR4.
Some challenges regarding the syntax of Rust and its formulation in the ANTLR4 grammar are discussed in the README.
To the best of my understanding, it now produces consistent, correct TokenLists. Still, this frontend may very well be subject to further redesign in the future.
Adressing #345 and completing the set of frontends proposed there.