move common code to __init__
This commit is contained in:
parent
eb9ca0ed3c
commit
59cf66506f
4 changed files with 95 additions and 96 deletions
|
@ -2,8 +2,7 @@ from arpeggio.cleanpeg import ParserPEG
|
|||
from typing import List, Tuple, Sequence, Optional, Union
|
||||
import arpeggio
|
||||
|
||||
from common import grammar, ParseError, JobShopProblem, JobShopVisitor
|
||||
#from . import JobShopProblem
|
||||
from . import grammar, ParseError, JobShopProblem, JobShopVisitor
|
||||
|
||||
class JobShop1Visitor(JobShopVisitor):
|
||||
"""instanciated for semantic analysis of parse_tree"""
|
||||
|
@ -45,7 +44,7 @@ def parse_jobshop1_file(filename: Union[str, bytes]) -> List[JobShopProblem]:
|
|||
|
||||
|
||||
def main():
|
||||
print(parse_jobshop1_file("inputdata/jobshop1.txt"))
|
||||
print(parse_jobshop1_file("../inputdata/jobshop1.txt"))
|
||||
|
||||
parser = ParserPEG(grammar, "job_shop1", skipws=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue