package morbig

  1. Overview
  2. Docs

Module Morbig.ScriptsSource

Sourceval is_other_script : string -> bool

is_other_script s returns true when the file with name s starts with a magic string that indicates a script other than posix shell, otherwise it returns false. Raises Sys_error when the file cannot be opened.

Sourceval is_elf : string -> bool

is_elf s returns true when the file with name s starts with the magic number for ELF, otherwise it returns false. Raises Sys_error when the file cannot be opened.

Sourceval parse_file : string -> CST.program

parse_file s attempts to parse the file with name s, and returns its concrete syntax tree.

Sourceval parse_string : string -> string -> CST.program

parse_string s c attempts to parse the file with name s whose contents is c, and returns its concrete syntax tree.

OCaml

Innovation. Community. Security.