From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA18164 for caml-redistribution; Tue, 14 Jan 1997 18:17:58 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA16912 for ; Tue, 14 Jan 1997 17:18:16 +0100 (MET) Received: from arthur.u-strasbg.fr (boos@arthur.u-strasbg.fr [130.79.6.103]) by nez-perce.inria.fr (8.7.6/8.7.3) with ESMTP id RAA27306 for ; Tue, 14 Jan 1997 17:18:14 +0100 (MET) Received: (from boos@localhost) by arthur.u-strasbg.fr (8.7.5/8.7.3) id RAA12012; Tue, 14 Jan 1997 17:19:19 +0100 Date: Tue, 14 Jan 1997 17:19:19 +0100 Message-Id: <199701141619.RAA12012@arthur.u-strasbg.fr> From: Christian Boos To: caml-list@inria.fr Subject: Negative float consts Sender: weis Hello caml-list, I recently found the syntax of negative float consts to be annoying. You have to write things like this: two_float_func 1.0 (-. 1.0) IMO, it is more pleasant to write instead: two_float_func 1.0 -1.0 so I tried the following change in the lexer: | '-'? ['0'-'9']+ '.' ['0'-'9']* (['e' 'E'] ['+' '-']? ['0'-'9']+)? { FLOAT (Lexing.lexeme lexbuf) } ... and everything worked well ! I think this could be an improvement in the readability of numerical programs. (an analog change may eventually be needed for int constants ?) -- Christian