package jasmin

  1. Overview
  2. Docs
Compiler for High-Assurance and High-Speed Cryptography

Install

dune-project
 Dependency

Authors

Maintainers

Sources

jasmin-compiler-v2026.03.1.tar.bz2
sha256=78e9f92963403f1ed9f95326f26725532c43956f10fcc47d11ac94c66a236f52

doc/src/jasmin.jasmin/parseio.ml.html

Source file parseio.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(* -------------------------------------------------------------------- *)
open Utils

(* -------------------------------------------------------------------- *)
let lexbuf_from_function = fun name f ->
  let lexbuf = Lexing.from_function f in
  Lexing.set_filename lexbuf name;
  lexbuf

(* -------------------------------------------------------------------- *)
let parse_program ?(name = "") (inc : IO.input) =
  let lexbuf = lexbuf_from_function name @@ fun buf n ->
  try IO.input inc buf 0 n with IO.No_more_input -> 0 in
  Parser.module_ Lexer.main lexbuf