package jasmin

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

jasmin-compiler-v2025.06.1.tar.bz2
sha256=e92b42fa69da7c730b0c26dacf842a72b4febcaf4f2157a1dc18b3cce1f859fa

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