Commit 962a020e authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Work in progress with dune on parser.

parent 90b9a6d5
......@@ -34,7 +34,6 @@ let raise_loc_generic loc s = raise (Location (loc, `Full, Generic s))
let noloc = (`None,-1,-1)
let nopos = (-1,-1)
let viewport = ref (Html.create false)
let set_viewport v = viewport := v
let get_viewport () = !viewport
......@@ -44,7 +43,7 @@ let get_viewport () = !viewport
The clean solution is probably to have the real lexer
count the lines. *)
let get_line_start enc lb i =
let get_line_start _enc lb i =
let rec count line start = lexer
| '\n' | "\n\r" | '\r' ->
if (Ulexing.lexeme_start lb >= i) then (line, start)
......
(library
(name parser)
(package cduce)
(wrapped false)
(preprocess
(per_module
((action (run camlp4o -printer o %{lib:ulex:pa_ulex.cma} %{input-file})) cduce_loc ulexer parser)))
(libraries misc ulex camlp4 curl)
)
open Encodings
open Cduce_types
let pos_int = Types.interval (Intervals.right (Intervals.V.mk "1"))
let non_neg_int = Types.interval (Intervals.right (Intervals.V.mk "0"))
......
open Cduce_types
(** Some CDuce predefined types *)
val pos_int : Types.t (** 1 .. Inf *)
val non_neg_int : Types.t (** 0 .. Inf *)
val neg_int : Types.t (** -Inf .. -1 *)
val non_pos_int : Types.t (** -Inf .. 0 *)
val long_int : Types.t (** -9223372036854775808 .. 9223372036854775807 *)
val int_int : Types.t (** -2147483648 .. 2147483647 *)
val short_int : Types.t (** -32768 .. 32767 *)
val byte_int : Types.t (** -128 .. 127 *)
val caml_int : Types.t (** min_int .. max_int *)
val byte_int : Types.t (** 0 .. 255 *)
val pos_int : Types.t (* 1 .. Inf *)
val non_neg_int : Types.t (* 0 .. Inf *)
val neg_int : Types.t (* -Inf .. -1 *)
val non_pos_int : Types.t (* -Inf .. 0 *)
val long_int : Types.t (* -9223372036854775808 .. 9223372036854775807 *)
val int_int : Types.t (* -2147483648 .. 2147483647 *)
val short_int : Types.t (* -32768 .. 32767 *)
val byte_int : Types.t (* -128 .. 127 *)
val caml_int : Types.t (* min_int .. max_int *)
val byte_int : Types.t (* 0 .. 255 *)
val non_zero_int : Types.t
val intstr : Types.t
......
(library
(name typing)
(package cduce)
(wrapped false)
(libraries cduce_types parser)
)
open Cduce_types
type ext_info
let has_ext = ref false
......
open Cduce_types
type ext_info
val get: unit -> ext_info option
......
open Cduce_types
open Ident
type err = string -> exn
......
open Cduce_types
open Ident
type err = string -> exn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment