Bug corrected in (negative) range scanning.
Line numbers are counted for you in next_char.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
analysis of the char ranges and the repetitive computation of the
corresponding characteristic function); hence, analysis and creation
of char range predicates has been completely rewritten.
Char range predicates now use bit strings instead of vectors;
predicate computation is a memo function such that scanning ranges is
no more just a matter of expensive predicate calculation (performed
again and again for each scanf call). In addition, trivial and very
common char ranges (one, two, or threee characters only) are treated
specially and more efficiently.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5884 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Roberto). An unused function is suppressed. The Objective Caml `_'
convention for numbers is used and documented.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5690 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
The function end_of_input was wrong in case of a buffer for which both
beginning_of_input and end_of_input conditions were true (e.g. in case
of an empty string or an empty file).
Better error reporting for characters out of the given range.
Reminiscent of the printf semantics, %! matches the end of input
condition.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Introduction of two new functions Scanning.from_file and
Scanning.from_file_bin to alleviate this problem.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5506 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Implementation de la semantique des espaces conforme a la doc (seul le
caractère 32 est reconnu pour appeler skip_spaces).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5207 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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
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
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
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
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