Signed-off-by: Pierre Habouzit <madcoder@debian.org>
module H = Hashtbl
module B = Buffer
module H = Hashtbl
module B = Buffer
- type 'a anchor = ('a * string * int)
-
+ type 'a anchor = ('a * string * int)
- let t2 (_, a, _) = a
- let t3 (_, _, a) = a
let die lpos fpos s =
output_string stderr (sprintf "%s:%d: %s\n" fpos lpos s);
let die lpos fpos s =
output_string stderr (sprintf "%s:%d: %s\n" fpos lpos s);
let typdecl = sp* ("const" sp+)? ident sp*
(* }}} *)
let typdecl = sp* ("const" sp+)? ident sp*
(* }}} *)
(* entry point {{{ *)
rule cLine lpos fpos buf = parse
(* entry point {{{ *)
rule cLine lpos fpos buf = parse
+(* templating functions {{{ *)
+
let upper = String.uppercase
let tplize tpl v =
Str.global_replace (Str.regexp_string "$L") "L" (
let upper = String.uppercase
let tplize tpl v =
Str.global_replace (Str.regexp_string "$L") "L" (
let usage () =
output_string stderr "usage: cpkg2c (-h | -c) file.cpkg\n";
exit 1
let usage () =
output_string stderr "usage: cpkg2c (-h | -c) file.cpkg\n";
exit 1