|
@@ -13,6 +13,7 @@ import org.antlr.v4.runtime.tree.ParseTree;
|
|
|
import org.antlr.v4.runtime.tree.ParseTreeWalker;
|
|
import org.antlr.v4.runtime.tree.ParseTreeWalker;
|
|
|
|
|
|
|
|
import de.jplag.AbstractParser;
|
|
import de.jplag.AbstractParser;
|
|
|
|
|
+import de.jplag.ErrorConsumer;
|
|
|
import de.jplag.TokenList;
|
|
import de.jplag.TokenList;
|
|
|
import de.jplag.python3.grammar.Python3Lexer;
|
|
import de.jplag.python3.grammar.Python3Lexer;
|
|
|
import de.jplag.python3.grammar.Python3Parser;
|
|
import de.jplag.python3.grammar.Python3Parser;
|
|
@@ -23,6 +24,14 @@ public class Parser extends AbstractParser {
|
|
|
private TokenList tokens = new TokenList();
|
|
private TokenList tokens = new TokenList();
|
|
|
private String currentFile;
|
|
private String currentFile;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates the parser.
|
|
|
|
|
+ * @param errorConsumer is the consumer for any occurring errors.
|
|
|
|
|
+ */
|
|
|
|
|
+ public Parser(ErrorConsumer errorConsumer) {
|
|
|
|
|
+ super(errorConsumer);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public TokenList parse(File directory, String[] files) {
|
|
public TokenList parse(File directory, String[] files) {
|
|
|
tokens = new TokenList();
|
|
tokens = new TokenList();
|
|
|
errors = 0;
|
|
errors = 0;
|