This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
(executable
|
||||
(name identity_standalone)
|
||||
(libraries ppxlib)
|
||||
(modules identity_standalone))
|
||||
|
||||
(executable
|
||||
(name print_magic_number)
|
||||
(libraries astlib)
|
||||
(modules print_magic_number))
|
||||
|
||||
(cram
|
||||
(package ppxlib)
|
||||
(enabled_if
|
||||
(or
|
||||
(= %{system} linux)
|
||||
(= %{system} linux_elf)
|
||||
(= %{system} elf)
|
||||
(= %{system} linux_eabihf)
|
||||
(= %{system} linux_eabi)))
|
||||
(deps identity_standalone.exe print_magic_number.exe))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = Ppxlib.Driver.standalone ()
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
let magic_length = String.length Astlib.Config.ast_impl_magic_number
|
||||
let buf = Bytes.create magic_length
|
||||
let len = input stdin buf 0 magic_length
|
||||
let s = Bytes.sub_string buf 0 len
|
||||
let () = Printf.printf "Magic number: %s" s
|
||||
Binary file not shown.
|
|
@ -0,0 +1,10 @@
|
|||
Binary AST's of any by ppxlib supported OCaml version are supported.
|
||||
The version is preserved.
|
||||
|
||||
$ cat 408_binary_ast | ../print_magic_number.exe
|
||||
Magic number: Caml1999N025
|
||||
|
||||
$ ../identity_standalone.exe --intf 408_binary_ast -o transformed --dump-ast
|
||||
|
||||
$ ../print_magic_number.exe < transformed
|
||||
Magic number: Caml1999N025
|
||||
Loading…
Add table
Add a link
Reference in a new issue