move grammer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user