sky 1c01e1de78 fork & optimize: 从github上获取官方源码,并进行了一些优化(不过不保证完全没问题) 3 سال پیش
..
src 1c01e1de78 fork & optimize: 从github上获取官方源码,并进行了一些优化(不过不保证完全没问题) 3 سال پیش
README.md 37dcfca09e [Swift] update Readme 4 سال پیش
pom.xml 28938211e1 created Swift language frontend skeleton by duplicating and adapting Kotlin frontend 4 سال پیش

README.md

JPlag Swift language frontend

The JPlag Swift frontend allows the use of JPlag with submissions in Swift.
It is based on the Swift ANTLR4 grammar, licensed under the Apache 2.0.

Swift specification compatibility

The underlying grammar definition is based on Swift 5.4.

If there are any major updates or fixes to the grammar1, they should surely be applied to this module as well.

Token Extraction

The choice of tokens is intended to be similar to the Java or C# frontends. It includes a range of nesting structures (class, method, control flow expressions) as well as variable declaration, object creation, assignment, and control flow altering keywords.

Usage

To use the Swift frontend, add the -l swift flag in the CLI, or use a JPlagOption object set to LanguageOption.SWIFT in the Java API as described in the usage information in the readme of the main project and in the wiki.


Footnotes

1 The grammar files are taken from grammar-v4, with the most recent modification in commit d9af329 from Sep 2022. They received some minor modifications to support identifying the end of do-blocks.