This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/flap/src/elf/elf.ml
2023-10-04 15:40:22 +02:00

37 lines
590 B
OCaml

(** The ELF binary format. *)
module AST = ElfAST
let name = "elf"
type ast = AST.t
let parse lexer_init input =
SyntacticAnalysis.process
~lexer_init
~lexer_fun:RetrolixLexer.token
~parser_fun:RetrolixParser.program
~input
let no_parser () =
Error.global_error
"during source analysis"
"There is no parser for ELF in flap."
let parse_filename _ =
no_parser ()
let extension =
".elf"
let executable_format =
true
let parse_string _ =
no_parser ()
let print_ast (buf : ast) =
Buffer.contents buf
include ElfInterpreter
include ElfTypechecker