Skip to content

Commit

Permalink
Переезд на antlr 4.13.1 (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
theshadowco authored Apr 16, 2024
1 parent fe550f7 commit c9c7731
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ gen/
/.idea/misc.xml
*.tokens
/.idea/inspectionProfiles/Project_Default.xml
/.idea/material_theme_project_new.xml
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 1 addition & 2 deletions src/main/antlr/BSLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/antlr/BSLMethodDescriptionLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/antlr/SDBLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void parseVariableDescription2() {

@Test
void parseVariableDescription3() {
var exampleString = "// Описание переменной\n// Устарела. см. НоваяПеременная";
var exampleString = "// Устарела. см. НоваяПеременная\n// Описание переменной";
var tokens = getTokensFromString(exampleString);
var variableDescription = BSLDescriptionReader.parseVariableDescription(tokens);

Expand All @@ -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();
}

Expand Down

0 comments on commit c9c7731

Please sign in to comment.