Commit Graph

35 Commits (a0ddc6ff30b42951cefde852ba2cca5966ef928f)

Author SHA1 Message Date
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Gabriel Scherer d22b112968 ocamllex: user-definable refill actions (patch by Frédéric Bour)
The patch introduces a new "refill" action. It's optional and if
unused the lexer specification and behavior are unchanged.

When specified, it allows the user to control the way the lexer is
refilled. For example, an appropriate refill handler could perform the
blocking operations of refilling under a concurrency monad such as Lwt
or Async, to work better in a cooperative concurrency setting.

To make use of this feature, add

  refill {refill_function}

between the header and the first rule.

[refill_function] is a function which will be invoked by the lexer
immediately before refilling the buffer. The function will receive as
arguments the continuation to invoke to resume the lexing, and the
current lexing buffer.

More precisely, it's a function of type:

  (Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'a

where the first argument is the continuation which captures the
processing ocamllex would usually perform (refilling the buffer, then
calling the lexing function again), and the result type ['a] should
unify with the result types of all rules.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14461 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-14 15:39:32 +00:00
Damien Doligez 7844495624 Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
  svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:12:37 +00:00
Damien Doligez c63f9e0957 fix a few problems with whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-09 22:38:52 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Damien Doligez 1b8095f404 PR#4940: get rid of naked end-of-lines in string constants + add warning 29
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-07 15:15:07 +00:00
Luc Maranget 5ca2e4ee42 ocamllex: as bound variables with position in .mll file
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7815 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 16:44:16 +00:00
Luc Maranget 04d8e3c2b8 vague bug: prefixer uen variable par __ocaml_lex
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6112 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-02-12 17:29:04 +00:00
Damien Doligez d200cf6df1 PR#1803
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5815 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-08-29 17:33:45 +00:00
Damien Doligez 5d1ade1ad6 PR#1776 (suite)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-07-31 13:40:13 +00:00
Damien Doligez 25cea4adbe gestion des locations avec -ml; meilleur parenthesage pour -dtypes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-07-26 21:06:21 +00:00
Damien Doligez 9b2b75c14e PR#1776
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5746 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-07-26 19:13:15 +00:00
Luc Maranget 513ae1bbfe esthetique
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5329 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-12-10 09:14:30 +00:00
Luc Maranget 11392c1894 arguments supplementaires pour les lexers ocamllex
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5323 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-12-09 10:44:46 +00:00
Damien Doligez 123fb9f713 changement des locations, deuxieme tranche
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-02 22:36:46 +00:00
Luc Maranget e143b9faf5 upgrade pa_ocamllex, new feature included
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5205 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-10-30 17:20:04 +00:00
Luc Maranget c417b82d9e nouveau ocamllex
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5193 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-10-28 16:46:50 +00:00
Xavier Leroy fd8846fecd Portage Cygwin
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-08-10 09:58:08 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Damien Doligez 62dcdbce7c Ajout de ";;" a la fin de l'output pour qu'on puisse mettre une expression
dans le postlude.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-10-15 18:37:55 +00:00
Xavier Leroy 3e3d57a3e4 Detection des debordements de tables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-05-26 09:56:41 +00:00
Xavier Leroy 56fafddd87 Generation de messages # lineno
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1930 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-04-23 08:24:50 +00:00
Xavier Leroy 0954f07be7 Lexing: ne pas sauver l'etat courant dans le lexbuf pendant un refill,
mais le repasser explicitement en resultat/argument de lex_engine.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1362 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-03-10 13:57:06 +00:00
Xavier Leroy 6063edc759 Mise a jour pour Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1217 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-12-10 14:45:58 +00:00
Xavier Leroy fa45b038f6 Retour en arriere sur le traitement des fins de lignes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1216 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-12-10 10:42:07 +00:00
Xavier Leroy 29fdaf2ba9 Utiliser le mode texte pour copier les morceaux de l'entree vers la
sortie (evite les \r\r\n a la fin des lignes sous Windows).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1213 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-12-03 15:51:53 +00:00
Xavier Leroy c03503a770 Refill effectue differemment: plus de callback C -> ML, mais iteration
dans le code ML genere par ocamllex.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@845 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-05-28 12:42:15 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Xavier Leroy 22bc127a92 csllex utilise un automate a pile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@667 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-02-25 14:45:47 +00:00
Xavier Leroy e0adbdd1f4 Ajout d'un trailer dans les fichiers .mll.
Nettoyages.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@224 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-25 13:54:14 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 61bd8ace6b Passage a la version bootstrappee (franchissement du Rubicon)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-04 10:15:53 +00:00