Skip to content

Commit

Permalink
Переезд на оригинальный antlr 4.13.1
Browse files Browse the repository at this point in the history
Нарушена обратная совместимость
  • Loading branch information
theshadowco committed Apr 16, 2024
2 parents 9147679 + c9c7731 commit 1513001
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 21 deletions.
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
groups:
freefair:
patterns:
- "io.freefair.*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
cp -R temp/site/. public/dev/en
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4.0.0
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
Expand Down
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
18 changes: 9 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ plugins {
`java-library`
antlr
signing
id("org.sonarqube") version "4.4.1.3373"
id("org.sonarqube") version "5.0.0.4638"
id("org.cadixdev.licenser") version "0.6.1"
id("me.qoomon.git-versioning") version "6.4.3"
id("io.freefair.javadoc-links") version "8.4"
id("io.freefair.javadoc-utf-8") version "8.4"
id("com.github.ben-manes.versions") version "0.50.0"
id("io.freefair.javadoc-links") version "8.6"
id("io.freefair.javadoc-utf-8") version "8.6"
id("com.github.ben-manes.versions") version "0.51.0"
id("me.champeau.gradle.jmh") version "0.5.3"
id("io.freefair.maven-central.validate-poms") version "8.4"
id("ru.vyarus.pom") version "2.2.2"
id("io.freefair.maven-central.validate-poms") version "8.6"
id("ru.vyarus.pom") version "3.0.0"
id("io.codearte.nexus-staging") version "0.30.0"
}

Expand Down 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 1513001

Please sign in to comment.