Commit Graph

24 Commits (144780b72994bad1740fce87d37aef29b74dcda0)

Author SHA1 Message Date
Pierre Weis 51eb3bad54 A lot of modifications: provision for unsigned numbers in binary
notation + addition of a new ``bof'' field in input buffers to detect that
no chars have ever been read + careful check and debugging of reading
from empty buffers + code review. Addition of stdib for reading from stdin.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-10-07 12:20:07 +00:00
Pierre Weis a96f8f0e87 Formats %B and %F.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-09-05 10:38:11 +00:00
Pierre Weis 6c15753d0f Revu le traitement de %S (les @c ne sont pas nécessaires vus les
guillemets délimiteurs).
Revu le traitement des blancs en fin de fichier et les formats à
indication de scanning erronées (format terminé par @).
Revu le type de kscanf.
Revu la documentation des indications de scanning.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5051 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-07-28 21:29:42 +00:00
Xavier Leroy 6970e8c7fa Identifier %x et %X; bug parsing entiers octal et hexa (PR#1260); 8 n'est pas un chiffre octal. Signe: Damien & Xavier
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-07-25 15:24:58 +00:00
Pierre Weis 4865d98f29 Errors in documentation + the error continuation now takes as argument
the exception that was raised during scanning instead of a string
explaining the problem + proper end of file detection.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4992 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-07-11 22:39:26 +00:00
Pierre Weis de4faabfce Exception Scan_failure gets a string argument only.
Failure exception is no more trapped for each convertion: it is
trapped instead in the main scanning loop.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-27 09:20:25 +00:00
Pierre Weis 17db5ace3e Introducing kscanf, the scanning function with an additional error continuation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4950 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-26 09:32:27 +00:00
Pierre Weis 0505570e3b Introducing a specific exception for formatted input functions.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4922 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-12 08:31:21 +00:00
Pierre Weis 2b74c8d0bd Le module Scanning est intégré dans Scanf.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4849 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-27 22:00:09 +00:00
Pierre Weis 817e451e48 Meilleurs messages d'erreur.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4843 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-27 08:51:23 +00:00
Pierre Weis b55d7dad58 Suppression de l'argument spc dans la fonction scan (le coeur de
fscanf): les espaces sont sautés lorsqu'on rencontre un espace dans la
chaîne de format.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4841 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-27 07:08:05 +00:00
Pierre Weis e9e7213c0c Implementation of escapes in Chars and Strings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-20 19:19:15 +00:00
Pierre Weis f13bd42464 Getting rid of one more Obj.magic :)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-12 18:41:07 +00:00
Pierre Weis 79eb51807f Getting rid of 2 Obj.magic(s). (By the way string_of_format =
%identity is safe.)
Adding formats C and S.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4803 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-12 17:57:36 +00:00
Pierre Weis d4b9ac8c8c Simplification + correcting scanning of booleans.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4802 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-11 12:06:22 +00:00
Pierre Weis 8c712bd5a9 Some bad_format where bad_input.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4800 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-09 21:07:44 +00:00
Pierre Weis 1bac650af9 Better evaluation strategy for scanf: before calling the function argument
scanning is saturated.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-09 19:37:07 +00:00
Pierre Weis c00140c75d Completing implementation of char sets into scanf.ml.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4798 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-09 18:26:44 +00:00
Pierre Weis d4fefff6fa Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4795 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-08 13:51:09 +00:00
Pierre Weis ba34bd8a63 Simplying once more.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4790 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 16:34:26 +00:00
Pierre Weis 8f79254242 Simplifying scanning of integers.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 16:31:33 +00:00
Pierre Weis 4912200a02 Reading nativeint int32 and int64 values.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4788 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 16:28:19 +00:00
Pierre Weis adf2b507bf Functions incompletely called.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 14:47:28 +00:00
Pierre Weis 01ca2d9ec2 Introducing a ``scanf'' facility in Objective Caml.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 07:41:12 +00:00