|
|
@@ -1,33 +1,69 @@
|
|
|
package jplag;
|
|
|
|
|
|
-
|
|
|
import java.io.*;
|
|
|
|
|
|
/**
|
|
|
- * One interface for all languages...
|
|
|
+ * Common interface for all languages. Each language-front end must provide a concrete language implementation.
|
|
|
*/
|
|
|
public interface Language {
|
|
|
- public String[] suffixes();
|
|
|
|
|
|
- public String name();
|
|
|
+ /**
|
|
|
+ * Suffixes for the files containing code of the language.
|
|
|
+ */
|
|
|
+ public String[] suffixes();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Descriptive name of the language.
|
|
|
+ */
|
|
|
+ public String name();
|
|
|
|
|
|
- public String getShortName();
|
|
|
+ /**
|
|
|
+ * Short name of the language used for CLI options.
|
|
|
+ */
|
|
|
+ public String getShortName();
|
|
|
|
|
|
- public int min_token_match();
|
|
|
+ /**
|
|
|
+ * Minimum number of tokens required for a match.
|
|
|
+ */
|
|
|
+ public int min_token_match();
|
|
|
|
|
|
- public Structure parse(File dir, String[] files);
|
|
|
+ /**
|
|
|
+ * Parses a set files in a directory.
|
|
|
+ */
|
|
|
+ public Structure parse(File dir, String[] files);
|
|
|
|
|
|
- public boolean errors();
|
|
|
+ /**
|
|
|
+ * Whether errors were found during the last {@link #parse}.
|
|
|
+ */
|
|
|
+ public boolean errors();
|
|
|
|
|
|
- public int errorsCount();
|
|
|
+ /**
|
|
|
+ * Number of errors found during the last {@link #parse}.
|
|
|
+ */
|
|
|
+ public int errorsCount();
|
|
|
|
|
|
- public boolean supportsColumns();
|
|
|
+ /**
|
|
|
+ * Determines whether the parser provide column information.
|
|
|
+ */
|
|
|
+ public boolean supportsColumns();
|
|
|
|
|
|
- public boolean isPreformated();
|
|
|
+ /**
|
|
|
+ * Determines whether JPlag should use a fixed-width font in its reports.
|
|
|
+ */
|
|
|
+ public boolean isPreformatted();
|
|
|
|
|
|
- public boolean usesIndex();
|
|
|
+ /**
|
|
|
+ * Determines whether tokens from the scanner are indexed.
|
|
|
+ */
|
|
|
+ public boolean usesIndex();
|
|
|
|
|
|
- public int noOfTokens();
|
|
|
+ /**
|
|
|
+ * Number of defined tokens in the scanner of the language.
|
|
|
+ */
|
|
|
+ public int noOfTokens();
|
|
|
|
|
|
- public String type2string(int type);
|
|
|
+ /**
|
|
|
+ * Convert a token type to a text representation.
|
|
|
+ */
|
|
|
+ public String type2string(int type);
|
|
|
}
|