This commit is contained in:
Ulrich Wolffgang
2020-06-19 21:04:31 +02:00
parent 326b947b55
commit a082afbde8
3 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
<description>An ANTLR4-based parser and grammar for Visual Basic 6.0</description>
<groupId>io.github.uwol</groupId>
<artifactId>proleap-vb6-parser</artifactId>
<version>2.3.0</version>
<version>3.0.0</version>
<packaging>jar</packaging>
<licenses>
<license>
@@ -19,8 +19,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<antlr.version>4.7.2</antlr.version>
<slf4j.version>1.7.28</slf4j.version>
</properties>

View File

@@ -11,13 +11,13 @@ package io.proleap.vb6.asg.runner.impl;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -253,7 +253,7 @@ public class VbParserRunnerImpl implements VbParserRunner {
LOG.info("Parsing file {} with charset {}.", vbFile.getName(), charset);
final String vbCode = FileUtils.readFileToString(vbFile, charset);
final String vbCode = Files.readString(vbFile.toPath(), charset);
// determine the module name
final String moduleName = getModuleName(vbFile);

View File

@@ -16,11 +16,11 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.Trees;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
@@ -56,7 +56,7 @@ public class VbParseTestRunnerImpl implements VbParseTestRunner {
protected void doCompareParseTree(final File treeFile, final StartRuleContext startRule,
final VisualBasic6Parser parser) throws IOException {
final String treeFileData = FileUtils.readFileToString(treeFile, StandardCharsets.UTF_8);
final String treeFileData = Files.readString(treeFile.toPath(), StandardCharsets.UTF_8);
if (!StringUtils.isEmpty(treeFileData)) {
LOG.info("Comparing parse tree with file {}.", treeFile.getName());