package herdtools7

  1. Overview
  2. Docs

Builds an AST.t from some files.

type token = Tokens.token
type ast_type = [
  1. | `Opn
  2. | `Ast
]
type version = [
  1. | `ASLv0
  2. | `ASLv1
]
type version_selector = [
  1. | `ASLv0
  2. | `ASLv1
  3. | `Any
]
type parser_config = {
  1. allow_no_end_semicolon : bool;
  2. allow_double_underscore : bool;
  3. allow_unknown : bool;
}
val default_parser_config : parser_config

The default parser configuration. It sets the following: allow_no_end_semicolon = false allow_double_underscore = false allow_unknown = false

val from_file_result : ?ast_type:ast_type -> ?parser_config:parser_config -> version -> string -> AST.t Error.result
val from_file : ?ast_type:ast_type -> ?parser_config:parser_config -> version -> string -> AST.t
val from_lexer_lexbuf : ?ast_type:ast_type -> ?parser_config:parser_config -> version -> 'a -> Lexing.lexbuf -> AST.t Error.result
val from_file_multi_version : ?ast_type:ast_type -> ?parser_config:parser_config -> version_selector -> string -> AST.t Error.result
val stdlib : AST.t Lazy.t
val with_stdlib : AST.t -> AST.t
val is_stdlib_name : AST.identifier -> bool
val with_primitives : ?loc:unit AST.annotated -> (AST.func * 'a) list -> AST.t -> AST.t
OCaml

Innovation. Community. Security.