Commit 95ce24fa authored by Pietro Abate's avatar Pietro Abate

[r2003-05-26 22:36:48 by cvscast] Cosmetique

Original author: cvscast
Date: 2003-05-26 22:36:48+00:00
parent 52640d75
let symbols = ref []
let define s =
try
let i = String.index s '=' in
symbols :=
(String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1)) ::
!symbols
with Not_found ->
failwith ("Invalid symbol definition :" ^ s)
let i =
try String.index s '='
with Not_found -> failwith ("Invalid symbol definition :" ^ s) in
symbols :=
(String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1)) ::
!symbols
let expr _ s =
try List.assoc s !symbols
with Not_found ->
failwith ("No definition for symbol " ^ s)
with Not_found -> failwith ("No definition for symbol " ^ s)
let _ =
Quotation.add "symbol" (Quotation.ExStr expr);
Pcaml.add_option "-symbol" (Arg.String define)
Pcaml.add_option "-symbol" (Arg.String define)
"<symbol=value> Define a symbol"
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