Skip to content

Commit 3c78c75

Browse files
committed
regenerate.sh
1 parent 5fc4be9 commit 3c78c75

15 files changed

+31
-431
lines changed

petab/math/PetabMathExprLexer.g4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Lexer grammar for PEtab math expressions
2+
// run `regenerate.sh` to regenerate the lexer
13
lexer grammar PetabMathExprLexer;
24

35

petab/math/PetabMathExprParser.g4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Parser grammar for PEtab math expressions
2+
// run `regenerate.sh` to regenerate the parser
13
parser grammar PetabMathExprParser;
24

35
options { tokenVocab=PetabMathExprLexer; }

petab/math/PetabMathExprParserListener.py

Lines changed: 0 additions & 228 deletions
This file was deleted.

petab/math/SympyVisitor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from antlr4 import *
44
from antlr4.error.ErrorListener import ErrorListener
55

6-
from .PetabMathExprLexer import PetabMathExprLexer
7-
from .PetabMathExprParser import PetabMathExprParser
8-
from .PetabMathExprParserVisitor import PetabMathExprParserVisitor
6+
from ._generated.PetabMathExprLexer import PetabMathExprLexer
7+
from ._generated.PetabMathExprParser import PetabMathExprParser
8+
from ._generated.PetabMathExprParserVisitor import PetabMathExprParserVisitor
99

1010
_trig_funcs = {
1111
"sin": sp.sin,

petab/math/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
"""Functions for parsing and evaluating mathematical expressions."""
2-
3-
# To regenerate parser, lexer, and visitor, run:
4-
# pip install antlr4-tools
5-
# antlr4 -v 4.13.1 -Dlanguage=Python3 -visitor \
6-
# PetabMathExprParser.g4 PetabMathExprLexer.g4
7-
# requires antlr4-python3-runtime==4.13.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)