diff --git a/.gitignore b/.gitignore index 09fe72ea..03160137 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ gen/ /.idea/misc.xml *.tokens /.idea/inspectionProfiles/Project_Default.xml +/.idea/material_theme_project_new.xml diff --git a/README.md b/README.md index fdeceec4..3ce9b0cb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # BSL Parser -[![Build Status](https://travis-ci.org/1c-syntax/bsl-parser.svg?branch=master)](https://travis-ci.org/1c-syntax/bsl-parser) -[![JitPack](https://jitpack.io/v/1c-syntax/bsl-parser.svg)](https://jitpack.io/#1c-syntax/bsl-parser) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=1c-syntax_bsl-parser&metric=alert_status)](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-parser) [![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=1c-syntax_bsl-parser&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-parser) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=1c-syntax_bsl-parser&metric=coverage)](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-parser) diff --git a/build.gradle.kts b/build.gradle.kts index 1a0c3a23..4dce03d3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -45,15 +45,15 @@ gitVersioning.apply { val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG dependencies { - antlr("com.tunnelvisionlabs", "antlr4", "4.9.0") + antlr("org.antlr", "antlr4", "4.13.1") - implementation("io.github.1c-syntax", "bsl-parser-core", "0.1.0") + implementation("io.github.1c-syntax", "bsl-parser-core", "0.2.0") // stat analysis compileOnly("com.google.code.findbugs", "jsr305", "3.0.2") // testing - testImplementation("io.github.1c-syntax", "bsl-parser-testing", "0.1.1") + testImplementation("io.github.1c-syntax", "bsl-parser-testing", "0.2.0") testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1") testImplementation("org.junit.jupiter", "junit-jupiter-engine", "5.10.1") testImplementation("org.junit.jupiter", "junit-jupiter-params", "5.10.1") diff --git a/src/main/antlr/BSLLexer.g4 b/src/main/antlr/BSLLexer.g4 index f3be374d..bcff9500 100644 --- a/src/main/antlr/BSLLexer.g4 +++ b/src/main/antlr/BSLLexer.g4 @@ -29,8 +29,7 @@ channels { @members { public BSLLexer(CharStream input, boolean crAwareCostructor) { super(input); - _interp = new CRAwareLexerATNSimulator(this, _ATN); - validateInputStream(_ATN, input); + _interp = new CRAwareLexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); } } diff --git a/src/main/antlr/BSLMethodDescriptionLexer.g4 b/src/main/antlr/BSLMethodDescriptionLexer.g4 index 2738a4cf..104d0edd 100644 --- a/src/main/antlr/BSLMethodDescriptionLexer.g4 +++ b/src/main/antlr/BSLMethodDescriptionLexer.g4 @@ -27,8 +27,7 @@ lexer grammar BSLMethodDescriptionLexer; @members { public BSLMethodDescriptionLexer(CharStream input, boolean crAwareCostructor) { super(input); - _interp = new CRAwareLexerATNSimulator(this, _ATN); - validateInputStream(_ATN, input); + _interp = new CRAwareLexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); } } diff --git a/src/main/antlr/SDBLLexer.g4 b/src/main/antlr/SDBLLexer.g4 index 4aaa75ca..b1792b23 100644 --- a/src/main/antlr/SDBLLexer.g4 +++ b/src/main/antlr/SDBLLexer.g4 @@ -27,8 +27,7 @@ lexer grammar SDBLLexer; @members { public SDBLLexer(CharStream input, boolean crAwareCostructor) { super(input); - _interp = new CRAwareLexerATNSimulator(this, _ATN); - validateInputStream(_ATN, input); + _interp = new CRAwareLexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache); } } diff --git a/src/test/java/com/github/_1c_syntax/bsl/parser/description/BSLDescriptionReaderTest.java b/src/test/java/com/github/_1c_syntax/bsl/parser/description/BSLDescriptionReaderTest.java index 289befec..20b70089 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/parser/description/BSLDescriptionReaderTest.java +++ b/src/test/java/com/github/_1c_syntax/bsl/parser/description/BSLDescriptionReaderTest.java @@ -432,7 +432,7 @@ void parseVariableDescription2() { @Test void parseVariableDescription3() { - var exampleString = "// Описание переменной\n// Устарела. см. НоваяПеременная"; + var exampleString = "// Устарела. см. НоваяПеременная\n// Описание переменной"; var tokens = getTokensFromString(exampleString); var variableDescription = BSLDescriptionReader.parseVariableDescription(tokens); @@ -445,7 +445,7 @@ void parseVariableDescription3() { assertThat(variableDescription.getLink()).isEmpty(); assertThat( - Objects.equals(variableDescription.getSimpleRange(), create(1, 32))) + Objects.equals(variableDescription.getSimpleRange(), create(1, 22))) .isTrue(); }