From 57b9a5cbce7f231f0f80f51baae5a2acd7d5b99e Mon Sep 17 00:00:00 2001 From: volodya-lombrozo Date: Tue, 24 Dec 2024 15:17:01 +0300 Subject: [PATCH] feat(#3742): add Dr- prefix --- eo-parser/src/main/java/org/eolang/parser/EoSyntax.java | 8 ++++---- eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java | 4 ++-- .../errors/{EoParserErrors.java => DrEoParserErrors.java} | 6 +++--- .../errors/{ParsingErrors.java => DrParsingErrors.java} | 8 ++++---- .../java/org/eolang/parser/errors/UnderlinedMessage.java | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename eo-parser/src/main/java/org/eolang/parser/errors/{EoParserErrors.java => DrEoParserErrors.java} (95%) rename eo-parser/src/main/java/org/eolang/parser/errors/{ParsingErrors.java => DrParsingErrors.java} (91%) diff --git a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java index 301c34309c..f902da37cc 100644 --- a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java +++ b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java @@ -38,8 +38,8 @@ import org.cactoos.text.Joined; import org.cactoos.text.Split; import org.cactoos.text.TextOf; -import org.eolang.parser.errors.EoParserErrors; -import org.eolang.parser.errors.ParsingErrors; +import org.eolang.parser.errors.DrEoParserErrors; +import org.eolang.parser.errors.DrParsingErrors; import org.xembly.Directives; import org.xembly.Xembler; @@ -107,7 +107,7 @@ public EoSyntax(final String nme, final Input ipt) { */ public XML parsed() throws IOException { final List lines = this.lines(); - final ParsingErrors spy = new ParsingErrors(lines); + final DrParsingErrors spy = new DrParsingErrors(lines); final EoLexer lexer = new EoIndentLexer(this.normalize()); lexer.removeErrorListeners(); lexer.addErrorListener(spy); @@ -115,7 +115,7 @@ public XML parsed() throws IOException { new CommonTokenStream(lexer) ); parser.removeErrorListeners(); - final EoParserErrors eospy = new EoParserErrors(lines); + final DrEoParserErrors eospy = new DrEoParserErrors(lines); parser.addErrorListener(eospy); final XeEoListener xel = new XeEoListener(this.name); new ParseTreeWalker().walk(xel, parser.program()); diff --git a/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java b/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java index 1923be8107..62ab106d10 100644 --- a/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java +++ b/eo-parser/src/main/java/org/eolang/parser/PhiSyntax.java @@ -32,7 +32,7 @@ import org.antlr.v4.runtime.tree.ParseTreeWalker; import org.cactoos.Text; import org.cactoos.io.InputStreamOf; -import org.eolang.parser.errors.ParsingErrors; +import org.eolang.parser.errors.DrParsingErrors; import org.xembly.Directive; import org.xembly.Directives; import org.xembly.Xembler; @@ -92,7 +92,7 @@ public PhiSyntax( @Override public XML parsed() throws IOException { final XePhiListener xel = new XePhiListener(this.name); - final ParsingErrors spy = new ParsingErrors(this.input); + final DrParsingErrors spy = new DrParsingErrors(this.input); final PhiLexer lexer = new PhiLexer( CharStreams.fromStream( new InputStreamOf(this.input) diff --git a/eo-parser/src/main/java/org/eolang/parser/errors/EoParserErrors.java b/eo-parser/src/main/java/org/eolang/parser/errors/DrEoParserErrors.java similarity index 95% rename from eo-parser/src/main/java/org/eolang/parser/errors/EoParserErrors.java rename to eo-parser/src/main/java/org/eolang/parser/errors/DrEoParserErrors.java index 7fc1117e4c..378e4f2fa9 100644 --- a/eo-parser/src/main/java/org/eolang/parser/errors/EoParserErrors.java +++ b/eo-parser/src/main/java/org/eolang/parser/errors/DrEoParserErrors.java @@ -43,7 +43,7 @@ * Accumulates all parsing errors related to EO parser. * @since 0.50 */ -public final class EoParserErrors extends BaseErrorListener implements Iterable { +public final class DrEoParserErrors extends BaseErrorListener implements Iterable { /** * Errors accumulated. @@ -59,7 +59,7 @@ public final class EoParserErrors extends BaseErrorListener implements Iterable< * Ctor. * @param src The source in lines */ - public EoParserErrors(final List src) { + public DrEoParserErrors(final List src) { this(new ArrayList<>(0), new Lines(src)); } @@ -68,7 +68,7 @@ public EoParserErrors(final List src) { * @param errors Errors accumulated * @param lines The source in lines */ - private EoParserErrors(final List errors, final Lines lines) { + private DrEoParserErrors(final List errors, final Lines lines) { this.errors = errors; this.lines = lines; } diff --git a/eo-parser/src/main/java/org/eolang/parser/errors/ParsingErrors.java b/eo-parser/src/main/java/org/eolang/parser/errors/DrParsingErrors.java similarity index 91% rename from eo-parser/src/main/java/org/eolang/parser/errors/ParsingErrors.java rename to eo-parser/src/main/java/org/eolang/parser/errors/DrParsingErrors.java index a3c9f3985a..6cffbd2322 100644 --- a/eo-parser/src/main/java/org/eolang/parser/errors/ParsingErrors.java +++ b/eo-parser/src/main/java/org/eolang/parser/errors/DrParsingErrors.java @@ -39,7 +39,7 @@ * * @since 0.30.0 */ -public final class ParsingErrors extends BaseErrorListener implements Iterable { +public final class DrParsingErrors extends BaseErrorListener implements Iterable { /** * Errors accumulated. @@ -55,7 +55,7 @@ public final class ParsingErrors extends BaseErrorListener implements Iterable(lines)); } @@ -63,7 +63,7 @@ public ParsingErrors(final Text... lines) { * Ctor. * @param src The source in lines */ - public ParsingErrors(final List src) { + public DrParsingErrors(final List src) { this(new ArrayList<>(0), new Lines(src)); } @@ -72,7 +72,7 @@ public ParsingErrors(final List src) { * @param errors Errors accumulated * @param lines The source in lines */ - private ParsingErrors(final List errors, final Lines lines) { + private DrParsingErrors(final List errors, final Lines lines) { this.errors = errors; this.lines = lines; } diff --git a/eo-parser/src/main/java/org/eolang/parser/errors/UnderlinedMessage.java b/eo-parser/src/main/java/org/eolang/parser/errors/UnderlinedMessage.java index 75182aa61f..64a6943bd9 100644 --- a/eo-parser/src/main/java/org/eolang/parser/errors/UnderlinedMessage.java +++ b/eo-parser/src/main/java/org/eolang/parser/errors/UnderlinedMessage.java @@ -41,7 +41,7 @@ *

* @since 0.50 * @todo #3332:30min Add more decorators for the error message. - * For example, {@link ParsingErrors} currently contains logic related to the message formatting. + * For example, {@link DrParsingErrors} currently contains logic related to the message formatting. * It's better to create a separate class for this purpose. */ final class UnderlinedMessage {