DattebayoCompiler module

class Compiler.DattebayoCompiler.DattebayoCompiler(file='')

Bases: object

check_code()

Pass the code file form .dtb to check lexer and syntax

check_lexer(line)

Apply the lexer in the .dtb code file

Parameters

line – each line of .dtb file

check_syntax(line)

Apply the syntax interpreter in the .dtb code file

Parameters

line – each line of .dtb file

close_file()

Close read file

log(class_obj, function_obj, msg)

Custom log

Parameters
  • class_obj – the class object

  • function_obj – function of this object

  • msg – the log message

print_lexer_output()

Print all tokens read in the Lexer class

read_file(file)

Read .dtb file based on name

Parameters

file – File .dtb to be read