From 72a15e590c758a80bc00695b60bf907452a16c3f Mon Sep 17 00:00:00 2001 From: mcDandy Date: Sun, 1 Nov 2026 15:42:35 +0100 Subject: [PATCH] move grammer --- more_math/Parser/antlr_router.py | 12 ++++++------ more_math/Parser/compile.ps1 | 4 ++-- .../Parser/{ => grammer}/legacy/MathExpr.interp | 0 .../Parser/grammer/{ => legacy}/MathExpr.tokens | 0 .../Parser/{ => grammer}/legacy/MathExprLexer.interp | 0 .../Parser/{ => grammer}/legacy/MathExprLexer.py | 0 .../Parser/grammer/{ => legacy}/MathExprLexer.tokens | 0 .../Parser/{ => grammer}/legacy/MathExprListener.py | 0 .../Parser/{ => grammer}/legacy/MathExprParser.py | 0 .../Parser/{ => grammer}/legacy/MathExprVisitor.py | 0 .../Parser/grammer/{ => modern}/MathExpr.interp | 0 .../{legacy => grammer/modern}/MathExpr.tokens | 0 .../Parser/grammer/{ => modern}/MathExprLexer.interp | 0 .../Parser/grammer/{ => modern}/MathExprLexer.py | 0 .../{legacy => grammer/modern}/MathExprLexer.tokens | 0 .../Parser/grammer/{ => modern}/MathExprListener.py | 0 .../Parser/grammer/{ => modern}/MathExprParser.py | 0 .../Parser/grammer/{ => modern}/MathExprVisitor.py | 0 18 files changed, 8 insertions(+), 8 deletions(-) rename more_math/Parser/{ => grammer}/legacy/MathExpr.interp (100%) rename more_math/Parser/grammer/{ => legacy}/MathExpr.tokens (100%) rename more_math/Parser/{ => grammer}/legacy/MathExprLexer.interp (100%) rename more_math/Parser/{ => grammer}/legacy/MathExprLexer.py (100%) rename more_math/Parser/grammer/{ => legacy}/MathExprLexer.tokens (100%) rename more_math/Parser/{ => grammer}/legacy/MathExprListener.py (100%) rename more_math/Parser/{ => grammer}/legacy/MathExprParser.py (100%) rename more_math/Parser/{ => grammer}/legacy/MathExprVisitor.py (100%) rename more_math/Parser/grammer/{ => modern}/MathExpr.interp (100%) rename more_math/Parser/{legacy => grammer/modern}/MathExpr.tokens (100%) rename more_math/Parser/grammer/{ => modern}/MathExprLexer.interp (100%) rename more_math/Parser/grammer/{ => modern}/MathExprLexer.py (100%) rename more_math/Parser/{legacy => grammer/modern}/MathExprLexer.tokens (100%) rename more_math/Parser/grammer/{ => modern}/MathExprListener.py (100%) rename more_math/Parser/grammer/{ => modern}/MathExprParser.py (100%) rename more_math/Parser/grammer/{ => modern}/MathExprVisitor.py (100%) 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