summaryrefslogtreecommitdiffstats
path: root/parsing
AgeCommit message (Collapse)Author
2014-04-30Fix precedence of extension nodes (#6386).Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14709 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29merge branch "safe-string"Damien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28Revert 14616, 14617. Go back to the original syntax for toplevel ↵Alain Frisch
directives, only allowing capitalized identifiers in addition to lowercase ones. Split #show into variants #show_val, #show_type, etc, and implement a generic #show which combines all the results. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14697 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23Remove Ast_helper.Convenience submodule. This is better located in the ↵Alain Frisch
ppx_tools package. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14664 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Sync with trunk.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14661 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Make Parsetree more uniform by keeping locations in all records which have ↵Alain Frisch
attributes. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14659 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22Synchronize with trunk.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14657 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17Add a hook in the lexer for an internal preprocessorFabrice Le Fessant
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14631 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17Allow keywords and capitalized longidents as toplevel directives.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14617 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16Support for toplevel primitives with multiple arguments.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14616 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16Doc.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Doc typo.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14603 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Doc.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14601 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Support for the let%foo syntax as structure item.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14600 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Doc.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14599 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Doc.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14598 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15Turn more sig/str items into records. Patch from Leo White.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14Fix syntax for floating attributes (disable until next bootstrap).Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14590 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14Fix syntax for floating attributes.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14589 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14Custom syntax for floating attributes: [@@@id].Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14588 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-14Synchronize with trunk.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@14587 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12fix some of the whitespace problems in the sourceDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12Added comments to parsetree.mliGabriel Scherer
(Patch by Yotam Barnoy) Specifically, I documented some more obscure features that weren't obvious from reading the existing comments. Discussion of these comments can be found on the mailing list at https://sympa.inria.fr/sympa/arc/caml-list/2014-04/msg00022.html git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14577 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-11parser.mly: minor mistake in position of a symbolGabriel Scherer
(Patch by Frédéric Bour) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14572 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-06PR#6270: remove need for -I directives to ocamldebug in common caseGabriel Scherer
(patch by Josh Watzman) Add absolute directory names to bytecode format for ocamldebug to use The need for a long list of -I directives makes interactively using ocamldebug a pain in the butt. Many folks have solved this with various `find` invocations or even Python wrappers, but those lead to other problems when it might include files you weren't expecting (or miss things you were). But all of this is really annoying since the tooling should be able to figure out itself, even heuristically, where your source files are -- gdb gets this right, why can't we? This patch implements one of the more important heuristics from gdb: you typically debug on the same machine you built on, so looking for the source files and built artifacts in the absolute paths where they were during compilation is a good first try. We write out absolute paths into a new structure at the beginning of the debug section and then automatically append those directories into the load path. This means mean that if you happen to be debugging on a machine where the original source and build artifacts are *not* available in their original absolute locations, things will work as before, using the standard load path mechanism. You can also explicitly use -I to prepend directories to the load path and override the defaults located by this new mechanism. I personally find this makes using ocamldebug much more pleasant :) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision ↵Damien Doligez
14525) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04Get rid of 'as' clause in inline records. Support re-export of sum types ↵Alain Frisch
with inline records. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14529 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01Allow to give an explicit name (and specify parameters) for inlined records.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14519 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01Remove debug.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14517 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-01Switch to t.A syntax for synthesized types. Allow the user to refer to such ↵Alain Frisch
as type. git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31Revert "PR#6270: remove need for -I directives to ocamldebug in common case ↵Gabriel Scherer
(patch by Josh Watzman)" There seems to be a problematic interaction with backtrace collection. To test this, make world.opt cd testsuite make one DIR=tests/backtrace/ This needs to be sorted out before the patch can go in again. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31PR#6270: remove need for -I directives to ocamldebug in common case (patch ↵Xavier Clerc
by Josh Watzman) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28Some preparation for record arguments.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14505 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28Pprintast: factorize handling of infix/prefix bindersGabriel Scherer
There was a bug with "external _pipe = ..." in otherlibs/threads/unix.ml where the identifier _pipe was wrongly detected as infix and reprinted as "external ( _pipe ) = ...", causing a syntax error. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14503 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26Get rid of some uses of implicit removal of optional arguments.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14495 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26More robust syntax (in case we add e.g. some 'open' statement before).Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26Remove spurious character from error message.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14492 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-24Ensure that record patterns don't miss any field in Ast_mapper (use of ↵Alain Frisch
optional arguments in Ast_helper makes it too easy to forget some fields). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14484 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21Factor out the grammar productions for functor parametersGabriel Scherer
(Patch by Jeremy Yallop) Functor parameters can occur in three contexts: (1) in functor bindings: module M (X : S) (Y : T) = ... (2) in anonymous functor expressionms: functor (X : S) (Y : T) -> ... (3) in signature expressions module type T = functor (X : S) (Y : T) -> ... This patch simplifies the grammar by using common productions (functor_arg, functor_args) to handle all three contexts, and by combining the productions for named and unnamed parameters. As a side effect, unnamed functor arguments are now available in functor bindings: module M (_ : S) (_ : T) = ... git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14478 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20Shorten syntax for functor signatures (patch by Thomas Gazagnaire)Gabriel Scherer
``` (* Optional naming of parameter implementation *) module type X = functor (X:S) -> ... module type X = functor (_:S) -> ... (* shortening of functor module signatures *) module type F = functor (X:S) -> functor (Y:S) -> ... module type F = functor (X:S) (Y:S) -> ... ``` For consistency reasons, this commits also add shortening of functor implementations: ``` (* shortening of functor implementations *) module F = functor (X:S) -> functor (Y:S) -> ... module F = functor (X:S) (Y:S) -> ... ``` git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-25Fix PR#6331Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14443 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-04PR#6054: add support for M.[ foo ], M.[| foo |], etc.Gabriel Scherer
(Patch by Kaustuv Chaudhuri) The following are now supported: M.[ foo ] abbreviation for M.([ foo ]) M.[| foo |] " " M.([| foo |]) M.{ foo } " " M.({ foo }) M.{< foo >} " " M.({< foo >}) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14431 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-30Add location to module and module type definitions. Improves #6311.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22PR#6165: Alterations to handling of \013 in source files breaking other toolsDamien Doligez
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14405 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-10Merge module-alias branch (cf. PR#6063)Jacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-17merge generative functorsJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-16#5808: allow simple patterns, not only identifiers, in 'let p : t = ...'.Alain Frisch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14362 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-02#6246: allow wildcard pattern as for-loop index. ==> Camlp4 will need to be ↵Alain Frisch
adapted. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-29Reports the beginning of the string literal in 'This comment contains an ↵Alain Frisch
unterminated string literal' errors. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14328 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-24merge trunk:14244 to fix bootstrapJacques Garrigue
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02