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.0.tar.bz2
sha256=dec62a3cd0cd42cfe96ec64b3cd3961e0e8a09fb92ceb64175cffb54fde50e40

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