Squash commits for public release
This commit is contained in:
24
utils/compilers/DevTreeCompiler/DevTreeCompiler.py
Normal file
24
utils/compilers/DevTreeCompiler/DevTreeCompiler.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from Parser.Parser import Parser
|
||||
from Generator.IRManager import IRManager
|
||||
from Generator.BinWriter import BinWriter
|
||||
from Generator.CWriter import CWriter
|
||||
from Generator.Compiler import Compiler
|
||||
import argparse
|
||||
|
||||
class DevTreeCompiler():
|
||||
|
||||
@staticmethod
|
||||
def compile(input_f, output_f):
|
||||
parser = Parser(input_f)
|
||||
irmng = IRManager(parser)
|
||||
compiler = Compiler(irmng)
|
||||
binw = BinWriter(output_f)
|
||||
binw.write(compiler.compile())
|
||||
|
||||
@staticmethod
|
||||
def to_c_arr(input_f):
|
||||
parser = Parser(input_f)
|
||||
irmng = IRManager(parser)
|
||||
compiler = Compiler(irmng)
|
||||
binw = CWriter()
|
||||
binw.write(compiler.compile())
|
||||
Reference in New Issue
Block a user