Skip to content

Commit

Permalink
Исправление ошибки компиляции
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Jan 15, 2020
1 parent 0522ce5 commit 4bdaf03
Showing 1 changed file with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,8 @@ public class JMXBSLParserTest {

//@Benchmark
public void testCharStream() {
CommonTokenStream tokenStream = getTokenStream(content);

BSLParser parser = new BSLParser(tokenStream);
parser.file();


Tokenizer tokenizer = new Tokenizer(content);
tokenizer.getAst();
}

private CommonTokenStream getTokenStream(String inputString) {
Lexer lexer = new BSLLexer(null);
CharStream input;

try {
InputStream inputStream = IOUtils.toInputStream(inputString, StandardCharsets.UTF_8);

UnicodeBOMInputStream ubis = new UnicodeBOMInputStream(inputStream);
ubis.skipBOM();

CharStream inputTemp = CharStreams.fromStream(ubis, StandardCharsets.UTF_8);
input = new CaseChangingCharStream(inputTemp, true);
} catch (IOException e) {
throw new RuntimeException(e);
}

lexer.setInputStream(input);

CommonTokenStream tokenStream = new CommonTokenStream(lexer);
tokenStream.fill();
return tokenStream;
}
}

0 comments on commit 4bdaf03

Please sign in to comment.