-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from 1c-syntax/feature/query_v3
Парсер и лексер запросов, вариант 3
- Loading branch information
Showing
18 changed files
with
1,995 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,4 @@ fabric.properties | |
\.idea/sonarlint-state\.xml | ||
|
||
\.idea/sonarlint\.xml | ||
**/antlr/.antlr/** |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/github/_1c_syntax/bsl/parser/BSLTokenizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* This file is a part of BSL Parser. | ||
* | ||
* Copyright © 2018-2020 | ||
* Alexey Sosnoviy <[email protected]>, Nikita Gryzlov <[email protected]>, Sergey Batanov <[email protected]> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* BSL Parser is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* BSL Parser is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with BSL Parser. | ||
*/ | ||
package com.github._1c_syntax.bsl.parser; | ||
|
||
import org.antlr.v4.runtime.CharStreams; | ||
|
||
public class BSLTokenizer extends Tokenizer<BSLParser.FileContext, BSLParser> { | ||
public BSLTokenizer(String content) { | ||
super(content, new BSLLexer(CharStreams.fromString(""), true), BSLParser.class); | ||
} | ||
|
||
@Override | ||
protected BSLParser.FileContext rootAST() { | ||
return parser.file(); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/github/_1c_syntax/bsl/parser/SDBLTokenizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* This file is a part of BSL Parser. | ||
* | ||
* Copyright © 2018-2020 | ||
* Alexey Sosnoviy <[email protected]>, Nikita Gryzlov <[email protected]>, Sergey Batanov <[email protected]> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* BSL Parser is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* BSL Parser is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with BSL Parser. | ||
*/ | ||
package com.github._1c_syntax.bsl.parser; | ||
|
||
import org.antlr.v4.runtime.CharStreams; | ||
|
||
public class SDBLTokenizer extends Tokenizer<SDBLParser.QueryPackageContext, SDBLParser> { | ||
public SDBLTokenizer(String content) { | ||
super(content, new SDBLLexer(CharStreams.fromString(""), true), SDBLParser.class); | ||
} | ||
|
||
@Override | ||
protected SDBLParser.QueryPackageContext rootAST() { | ||
return parser.queryPackage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.