From 597020b9829312a50c15784916f473da9e75efd0 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 26 Mar 2007 23:40:26 +0200 Subject: [PATCH] cosmetics. Signed-off-by: Pierre Habouzit --- tools/cpkg2c.mll | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/cpkg2c.mll b/tools/cpkg2c.mll index 0eccf47..b33cf84 100644 --- a/tools/cpkg2c.mll +++ b/tools/cpkg2c.mll @@ -22,11 +22,8 @@ module H = Hashtbl module B = Buffer - type 'a anchor = ('a * string * int) - + type 'a anchor = ('a * string * int) let t1 (a, _, _) = a - let t2 (_, a, _) = a - let t3 (_, _, a) = a let die lpos fpos s = output_string stderr (sprintf "%s:%d: %s\n" fpos lpos s); @@ -160,7 +157,6 @@ let sp = [' ''\t'] let typdecl = sp* ("const" sp+)? ident sp* (* }}} *) - (* entry point {{{ *) rule cLine lpos fpos buf = parse @@ -332,6 +328,8 @@ and ext_bodycode buf = parse (* }}} *) { +(* templating functions {{{ *) + let upper = String.uppercase let tplize tpl v = Str.global_replace (Str.regexp_string "$L") "L" ( @@ -550,6 +548,8 @@ int luaopen_%s(lua_State *L) ") in List.iter do_c_aux +(* }}} *) + let usage () = output_string stderr "usage: cpkg2c (-h | -c) file.cpkg\n"; exit 1 -- 2.20.1