-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1496 from jplag/feature/cpp-module-names
Renamed cpp to c and cpp2 to cpp
- Loading branch information
Showing
36 changed files
with
268 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# JPlag C language module | ||
|
||
This module allows the use of JPlag with submissions in c. | ||
|
||
## Usage | ||
|
||
To parse C submissions run JPlag with: `<jplag> <options> c` or use the `-l c` options. | ||
To use the module from the API configure your `JPlagOption` object with `new CLanguage()` as 'Language' as described in the usage information in the [readme](https://github.com/jplag/JPlag#usage) and [in the wiki](https://github.com/jplag/JPlag/wiki/1.-How-to-Use-JPlag). | ||
|
||
## C++ | ||
|
||
This module might work with C++ submissions. However you should use the [cpp module](https://github.com/jplag/JPlag/tree/main/languages/cpp) for that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>de.jplag</groupId> | ||
<artifactId>languages</artifactId> | ||
<version>${revision}</version> | ||
</parent> | ||
<artifactId>c</artifactId> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.helger.maven</groupId> | ||
<artifactId>ph-javacc-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>javacc-gen</id> | ||
<goals> | ||
<goal>javacc</goal> | ||
</goals> | ||
<phase>generate-sources</phase> | ||
<configuration> | ||
<jdkVersion>21</jdkVersion> | ||
<javadocFriendlyComments>true</javadocFriendlyComments> | ||
<packageName>de.jplag.c</packageName> | ||
<sourceDirectory>src/main/javacc</sourceDirectory> | ||
<outputDirectory>${project.build.directory}/generated-sources/javacc</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package de.jplag.c; | ||
|
||
import de.jplag.TokenType; | ||
|
||
public enum CTokenType implements TokenType { | ||
C_BLOCK_BEGIN("BLOCK{"), | ||
C_BLOCK_END("}BLOCK"), | ||
C_QUESTIONMARK("COND"), | ||
C_ELLIPSIS("..."), | ||
C_ASSIGN("ASSIGN"), | ||
C_DOT("DOT"), | ||
C_ARROW("ARROW"), | ||
C_ARROWSTAR("ARROWSTAR"), | ||
C_AUTO("AUTO"), | ||
C_BREAK("BREAK"), | ||
C_CASE("CASE"), | ||
C_CATCH("CATCH"), | ||
C_CHAR("CHAR"), | ||
C_CONST("CONST"), | ||
C_CONTINUE("CONTINUE"), | ||
C_DEFAULT("DEFAULT"), | ||
C_DELETE("DELETE"), | ||
C_DO("DO"), | ||
C_DOUBLE("DOUBLE"), | ||
C_ELSE("ELSE"), | ||
C_ENUM("ENUM"), | ||
C_EXTERN("EXTERN"), | ||
C_FLOAT("FLOAT"), | ||
C_FOR("FOR"), | ||
C_FRIEND("FRIEND"), | ||
C_GOTO("GOTO"), | ||
C_IF("IF"), | ||
C_INLINE("INLINE"), | ||
C_INT("INT"), | ||
C_LONG("LONG"), | ||
C_NEW("NEW"), | ||
C_PRIVATE("PRIVATE"), | ||
C_PROTECTED("PROTECTED"), | ||
C_PUBLIC("PUBLIC"), | ||
C_REDECLARED("REDECLARED"), | ||
C_REGISTER("REGISTER"), | ||
C_RETURN("RETURN"), | ||
C_SHORT("SHORT"), | ||
C_SIGNED("SIGNED"), | ||
C_SIZEOF("SIZEOF"), | ||
C_STATIC("STATIC"), | ||
C_STRUCT("STRUCT"), | ||
C_CLASS("CLASS"), | ||
C_SWITCH("SWITCH"), | ||
C_TEMPLATE("TEMPLATE"), | ||
C_THIS("THIS"), | ||
C_TRY("TRY"), | ||
C_TYPEDEF("TYPEDEF"), | ||
C_UNION("UNION"), | ||
C_UNSIGNED("UNSIGNED"), | ||
C_VIRTUAL("VIRTUAL"), | ||
C_VOID("VOID"), | ||
C_VOLATILE("VOLATILE"), | ||
C_WHILE("WHILE"), | ||
C_OPERATOR("OPERATOR"), | ||
C_THROW("THROW"), | ||
C_ID("ID"), | ||
C_FUN("FUN"), | ||
C_DOTSTAR("DOTSTAR"), | ||
C_NULL("NULL"); | ||
|
||
private final String description; | ||
|
||
@Override | ||
public String getDescription() { | ||
return this.description; | ||
} | ||
|
||
CTokenType(String description) { | ||
this.description = description; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...main/java/de/jplag/cpp/NewlineStream.java → ...c/main/java/de/jplag/c/NewlineStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package de.jplag.cpp; | ||
package de.jplag.c; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...p/experimental/UnreachableCodeFilter.java → ...c/experimental/UnreachableCodeFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.