Commit Graph

61 Commits (8db1b59233ab1127f7d634b06f975bbc4beaea08)

Author SHA1 Message Date
Hugo Heuzard 9eca3e4519 Parse arbitrary precision integers ..
.. and allow any letter in [g-zG-Z] as modifier (previously 'l','L','n')
Also allow modifier for floats
This give more freedom to ppx rewritters (what about a ppx for zarith)

Checks are performed when translating from Parsetree to Typedtree.
Invalid_literal is raised if the modifier is not recognized ([lLn]?)
Integer_overflow is raised as before.

Lexer: use g-zG-Z for integer literal modifier

Lexer: Allow modifier on float

Clean wrt previous commits

Lexer: use named substring

Cleanup

typo

doc

fix after rebase

rebase on  trunk

Update typecore.ml

Fix printast.ml
2015-12-03 17:20:48 +01:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Jacques Garrigue a09fb037ac add refuted cases, syntax is 'pat -> _'
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 01:55:52 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Gabriel Scherer 5893536b14 add Color module Misc
(Simon Cruanes)

We use bold magenta for warnings, because it works on terminals with
white background.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:49 +00:00
Gabriel Scherer 41e0ecf2ef PR#6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 11:18:29 +00:00
Gabriel Scherer 81e8d5bdbb Cmm arithmetic optimisations.
Constant additions and tagging operations are moved out of
subexpressions when possible. Often they can be merged.

From Stephen Dolan:
  https://github.com/ocaml/ocaml/pull/17

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15820 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-07 11:32:12 +00:00
Gabriel Scherer f15f4f3ed8 PR6695: Make sure the compiler only uses ASCII string functions.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Gabriel Scherer 843f152505 simplify the spellcheck functions
- expose the core spellchecking functionality in Misc rather than Typetexp
- remove the too high-order (yet insufficiently parametric)
  Typetexp.spellcheck from the public interface
- rewrite the spellchecking functions for variants and fields in
  Typecore from the Misc functions rather than reusing
  Typetexp.spellcheck

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:16 +00:00
Alain Frisch 8c075ad80a Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-27 16:43:24 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch e7ba464587 Add intel_proc.mli, get rid of arch64 bool ref, move StringSet/StringMap to misc.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15159 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:35:10 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Fabrice Le Fessant 504e86d722 Revert r13746 (demanded by Xavier)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 17:54:20 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Fabrice Le Fessant f9bd5f13a0 Experimental OCAMLCOMPPARAM for ocamlc/ocamlopt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 19:13:24 +00:00
Jacques Garrigue c425ae1ce8 Fix PR#5985; compute injectivity of types but no new syntax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13634 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-30 05:26:57 +00:00
Gabriel Scherer e92b63fc21 PR#5957,PR#5920,PR#5925: LongString module to workaround 32bits string size limitations during bytecode linking (patch by Benoit Vaugon and Chet Murthy)
In PR#5925, Benoît Vaugon initially proposed the LongString module to
solve an issue with bytecode blocks of size > Sys.max_string_length on
32 bits architecture (16Mio). In PR#5957, Chet Murthy made small
changes to also fix the problem of debug information going above this
16Mio limit.

The LongString module should be reusable in other parts of the
compiler, should new 32bit-string-length issues arise.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:07:00 +00:00
Alain Frisch e7546ca216 PR#5768: On 'unbound identifier' errors, use spell-checking to suggest names present in the environment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-16 13:54:24 +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
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Damien Doligez 5b14388ad0 refactoring the "read n bytes from a channel into a new string" idiom
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-23 19:54:44 +00:00
Damien Doligez b28b11541f fix try_finally in case the finally function raises an exception
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12129 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-06 12:56:08 +00:00
Alain Frisch 350f214671 More clever algorithm to detect unused (recursive) type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:20:53 +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
Nicolas Pouillard 81cfc29b31 Better handling of multiple extensions (foo.d.cmo, foo.p.cmx...)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-23 13:44:51 +00:00
Xavier Leroy 63c1789b5e Fusion des modifs faites sur la branche release jusqu'a la release 3.08.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-07-13 12:25:21 +00:00
Xavier Leroy 6f34fbb120 Revu chop_extension_if_any
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6399 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-06-13 12:48:25 +00:00
Damien Doligez 43b02185d7 ajout option -stypes; depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5478 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-04-02 01:32:09 +00:00
Xavier Leroy 6000e08ee6 find_in_path_uncap: essayer d'abord le nom en minuscules, puis le nom initial. Ca preserve la compatibilite totale avec 3.06 et corrige partiellement le PR#1572
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5426 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-10 14:07:23 +00:00
Xavier Leroy 0d78a56015 Permettre de placer les sources du module Foo dans Foo.ml aussi bien que dans foo.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-03 17:20:39 +00:00
Xavier Leroy a970ebdb7e Retour en arriere sur le trait Foo.ml ou foo.ml comme source du module Foo: sur un file system case-insensitive, cela fait produire a ocamldep des dependances que make ne comprend pas
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-07 13:08:04 +00:00
Xavier Leroy bae0f5d56e Chercher les infos sur le module Foo dans les fichiers Foo.{cmi,cmx} et foo.{cmi,cmx} (PR#1177)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4896 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-07 07:35:38 +00:00
Xavier Leroy 04ebbbfdc6 Ajout rev_split_words
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4783 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 13:16:28 +00:00
Xavier Leroy 71cf31f0e2 Ajout du packaging d'unites de compilation (option -pack)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-02-08 16:55:44 +00:00
Daniel de Rauglaudre fe0f46244c Added Misc.chop_extension_if_any for the case when the input filename does
not have any extension.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4327 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-01-28 17:25:26 +00:00
Luc Maranget f825892b07 bug 785 (debordement entier cmmgen)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-01-10 15:52:40 +00:00
Pierre Weis 2116da4220 Getting rid of obsolete boolean operators & and or
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3359 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-12-28 13:07:42 +00:00
Jacques Garrigue 447c79eade deplace expand_directory dans Misc, pour generaliser -I +package
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-12-28 05:02:43 +00:00
Pierre Weis cb681720ea Suppression de fonctions sur les listes redondantes car deja definies
dans la librairie standard. Attention Misc.for_all2 et List.for_all2
ont des semantiques tres legerement differentes. Il est donc hasardeux
de supprimer Misc.for_all2 sans une analyse précise de toutes ses
utilisations!


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3340 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-11-22 13:51:07 +00:00
Xavier Leroy 8599d817b4 Ajout split_last
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2878 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-28 15:47:13 +00:00
Jacques Garrigue 296fc05470 Merge olabl branch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-30 16:07:38 +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
Xavier Leroy a0257345ce Ajout de list_remove (a mettre dans List?)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-04 10:32:27 +00:00
Damien Doligez 0a04952276 Change: Filename.is_absolute -> not Filename.is_implicit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1618 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-06-16 17:09:14 +00:00
Damien Doligez 03ec746bf1 deTABisation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1563 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1997-05-19 15:42:21 +00:00
Xavier Leroy 4cb01ac06f Misc.lowercase -> String.uncapitalize
Misc.capitalize -> String.capitalize


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-10-31 16:03:49 +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