diff --git a/more_math/Parser/antlr_router.py b/more_math/Parser/antlr_router.py index e865583..f3b48de 100644 --- a/more_math/Parser/antlr_router.py +++ b/more_math/Parser/antlr_router.py @@ -3,12 +3,12 @@ import importlib.metadata def get_antlr_modules(): if importlib.metadata.version("antlr4-python3-runtime").startswith("4.9"): - from .legacy.MathExprLexer import MathExprLexer - from .legacy.MathExprParser import MathExprParser - from .legacy.MathExprVisitor import MathExprVisitor + from .grammer.legacy.MathExprLexer import MathExprLexer + from .grammer.legacy.MathExprParser import MathExprParser + from .grammer.legacy.MathExprVisitor import MathExprVisitor else: - from .grammer.MathExprLexer import MathExprLexer - from .grammer.MathExprParser import MathExprParser - from .grammer.MathExprVisitor import MathExprVisitor + from .grammer.modern.MathExprLexer import MathExprLexer + from .grammer.modern.MathExprParser import MathExprParser + from .grammer.modern.MathExprVisitor import MathExprVisitor return MathExprLexer, MathExprParser, MathExprVisitor diff --git a/more_math/Parser/compile.ps1 b/more_math/Parser/compile.ps1 index 76cf10b..ab52abb 100644 --- a/more_math/Parser/compile.ps1 +++ b/more_math/Parser/compile.ps1 @@ -56,8 +56,8 @@ $ErrorActionPreference = 'Stop' $ParserDir = $PSScriptRoot $NodeRoot = Split-Path (Split-Path $ParserDir -Parent) -Parent $GrammarFile = Join-Path $ParserDir 'MathExpr.g4' -$GrammarOutDir = Join-Path $ParserDir 'grammer' -$LegacyOutDir = Join-Path $ParserDir 'legacy' +$GrammarOutDir = Join-Path $ParserDir 'grammer/modern' +$LegacyOutDir = Join-Path $ParserDir 'grammer/legacy' $WebDir = Join-Path $NodeRoot 'web' $PySymbolsPath = Join-Path $ParserDir 'inbuilt_symbols.py' $JsSymbolsPath = Join-Path $WebDir 'inbuilt_symbols.js' diff --git a/more_math/Parser/legacy/MathExpr.interp b/more_math/Parser/grammer/legacy/MathExpr.interp similarity index 100% rename from more_math/Parser/legacy/MathExpr.interp rename to more_math/Parser/grammer/legacy/MathExpr.interp diff --git a/more_math/Parser/grammer/MathExpr.tokens b/more_math/Parser/grammer/legacy/MathExpr.tokens similarity index 100% rename from more_math/Parser/grammer/MathExpr.tokens rename to more_math/Parser/grammer/legacy/MathExpr.tokens diff --git a/more_math/Parser/legacy/MathExprLexer.interp b/more_math/Parser/grammer/legacy/MathExprLexer.interp similarity index 100% rename from more_math/Parser/legacy/MathExprLexer.interp rename to more_math/Parser/grammer/legacy/MathExprLexer.interp diff --git a/more_math/Parser/legacy/MathExprLexer.py b/more_math/Parser/grammer/legacy/MathExprLexer.py similarity index 100% rename from more_math/Parser/legacy/MathExprLexer.py rename to more_math/Parser/grammer/legacy/MathExprLexer.py diff --git a/more_math/Parser/grammer/MathExprLexer.tokens b/more_math/Parser/grammer/legacy/MathExprLexer.tokens similarity index 100% rename from more_math/Parser/grammer/MathExprLexer.tokens rename to more_math/Parser/grammer/legacy/MathExprLexer.tokens diff --git a/more_math/Parser/legacy/MathExprListener.py b/more_math/Parser/grammer/legacy/MathExprListener.py similarity index 100% rename from more_math/Parser/legacy/MathExprListener.py rename to more_math/Parser/grammer/legacy/MathExprListener.py diff --git a/more_math/Parser/legacy/MathExprParser.py b/more_math/Parser/grammer/legacy/MathExprParser.py similarity index 100% rename from more_math/Parser/legacy/MathExprParser.py rename to more_math/Parser/grammer/legacy/MathExprParser.py diff --git a/more_math/Parser/legacy/MathExprVisitor.py b/more_math/Parser/grammer/legacy/MathExprVisitor.py similarity index 100% rename from more_math/Parser/legacy/MathExprVisitor.py rename to more_math/Parser/grammer/legacy/MathExprVisitor.py diff --git a/more_math/Parser/grammer/MathExpr.interp b/more_math/Parser/grammer/modern/MathExpr.interp similarity index 100% rename from more_math/Parser/grammer/MathExpr.interp rename to more_math/Parser/grammer/modern/MathExpr.interp diff --git a/more_math/Parser/legacy/MathExpr.tokens b/more_math/Parser/grammer/modern/MathExpr.tokens similarity index 100% rename from more_math/Parser/legacy/MathExpr.tokens rename to more_math/Parser/grammer/modern/MathExpr.tokens diff --git a/more_math/Parser/grammer/MathExprLexer.interp b/more_math/Parser/grammer/modern/MathExprLexer.interp similarity index 100% rename from more_math/Parser/grammer/MathExprLexer.interp rename to more_math/Parser/grammer/modern/MathExprLexer.interp diff --git a/more_math/Parser/grammer/MathExprLexer.py b/more_math/Parser/grammer/modern/MathExprLexer.py similarity index 100% rename from more_math/Parser/grammer/MathExprLexer.py rename to more_math/Parser/grammer/modern/MathExprLexer.py diff --git a/more_math/Parser/legacy/MathExprLexer.tokens b/more_math/Parser/grammer/modern/MathExprLexer.tokens similarity index 100% rename from more_math/Parser/legacy/MathExprLexer.tokens rename to more_math/Parser/grammer/modern/MathExprLexer.tokens diff --git a/more_math/Parser/grammer/MathExprListener.py b/more_math/Parser/grammer/modern/MathExprListener.py similarity index 100% rename from more_math/Parser/grammer/MathExprListener.py rename to more_math/Parser/grammer/modern/MathExprListener.py diff --git a/more_math/Parser/grammer/MathExprParser.py b/more_math/Parser/grammer/modern/MathExprParser.py similarity index 100% rename from more_math/Parser/grammer/MathExprParser.py rename to more_math/Parser/grammer/modern/MathExprParser.py diff --git a/more_math/Parser/grammer/MathExprVisitor.py b/more_math/Parser/grammer/modern/MathExprVisitor.py similarity index 100% rename from more_math/Parser/grammer/MathExprVisitor.py rename to more_math/Parser/grammer/modern/MathExprVisitor.py