Robin Maisch 1644cd10fc Make R and Kotlin frontends more consistent 4 лет назад
..
src 1644cd10fc Make R and Kotlin frontends more consistent 4 лет назад
README.md 63e9f00a40 Rename package and artifactId 'R' to 'rlang' 4 лет назад
pom.xml 1644cd10fc Make R and Kotlin frontends more consistent 4 лет назад

README.md

JPlag R language frontend

The JPlag R frontend allows the use of JPlag with submissions in R.
It was in part adapted from a JPLag fork by CodeGra-de.

R specification compatibility

The underlying grammar definition was first created in June 2013, when R 3.0.1 was current. The latest commit is from April 2018, when R 3.5.0 was just released. Whether the grammar has been made to comply with any specific version of the R specification is unclear. Even if some parsing errors occur, the parser should be able to recover and still produce a valid analysis.

Token Extraction

The choice of tokens is based directly on the CodeGra-de version, whereas the extraction process itself contains some fixes.

Like in other frontends, e.g. for Java and C#, the tokens account for the beginning and the end of control flow structures, for control flow keywords, and some kinds of expressions. As R is very different from other programming languages in JPlag, it remains to be seen whether the R frontend can hold up to the others.

Usage

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