Commit Graph

188 Commits (8e801959e84e73219190dedad0b5b62b1f4f50a3)

Author SHA1 Message Date
Gabriel Scherer cfea1a430b
Merge pull request #2049 from hhugo/lexer3
Fixes in lexers
2018-09-17 17:48:41 +02:00
Sébastien Hinderer ba6362a07d Move config/Makefile to Makefile.config
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
2018-09-17 14:23:35 +02:00
Hugo Heuzard a28ad56b12 report error inside semantic action 2018-09-17 17:41:11 +08:00
Hugo Heuzard 7cad3edbe1 Sync ocamlex with the ocaml lexer 2018-09-17 17:41:11 +08:00
Pieter Goetschalckx 632df7c240 Allow quoted strings and octal/unicode character literals in ocamllex actions (#1912) 2018-09-17 06:49:31 +02:00
David Allsopp b069f692b4 Remove space from end of FLEXLINK_ENV 2018-09-07 08:34:53 +02:00
David Allsopp ad07b6d9b5 Use $(addprefix ...) and spacing adjustments 2018-09-07 08:34:53 +02:00
David Allsopp 4756a576f0 Move FLEXLINK_ENV definition to Makefile.common 2018-09-07 08:34:53 +02:00
David Allsopp 7676807940 Always use ROOTDIR in lex and ocamldoc Makefiles 2018-09-07 08:34:53 +02:00
David Allsopp c13c200f87 Standardise setting and use of OCAML_FLEXLINK
Some Makefiles were using export to set OCAML_FLEXLINK "globally" while
others set a variable FLEXLINK_ENV and set the environment explicitly.

All Makefiles now use FLEXLINK_ENV and also only invoke it on linking
commands (rather than, for example, all invocations of ocamlopt).
2018-09-07 08:34:53 +02:00
Gabriel Scherer cbb92d2817 remove unused ocamlyacc dependencies, never put it in boot/ 2018-09-01 23:17:06 +02:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
François Bobot da3f9f34f5 Use reraise_raw_backtrace in Misc.try_finally
And add labels ~always for previous cleanup function and
    ~exceptionally for new cleanup function in exceptional case
2018-07-25 17:58:32 +02:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
Gabriel Scherer f3aca2376f
Merge pull request #1821 from gasche/makefiles-consistent-opt-targets
Makefiles: consistently offer `allopt` and `opt.opt` targets
2018-06-24 00:46:50 +02:00
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
Gabriel Scherer a1bc562d8a makefiles: consistently offer *both* 'allopt' and 'opt.opt' targets
Some makefiles (lex, stdlib, otherlibs) would only offer allopt, while
others (ocamldoc, tools) only offered opt.opt. It is inconvenient to
have to remember which target name to use while going through various
repositories.
2018-06-07 09:54:13 +02:00
Sébastien Hinderer a2586680a0 Remove the Makefile.nt files 2018-05-25 00:36:56 +02:00
Luc Maranget 6dddb9d854
ocamllex: Exact check for the absence of memory instructions. (#1713)
* ocamllex: exact check for the absence of memory instructions.
Corrects  MPR#7760
Lexing automata come in two flavors
  (a) Ordinary DFA.
  (b) Extended DFA that additionally record positions from the buffer,
      so as to implement ocamlex 'as' construct.

For each entry, case (b) is selected when (1) there is come code to
record position in the lexer tables (2) the states that are reachable from
this entry may record positions in memory cell (as shown by the vector
of memory size being of non-zero size).

In case (b), a frech vector of memory cells is allocated and the new lexing
engine (ocaml_new_lex_engine) is called; in case (a) a simpler lexing engine
(ocaml_new_lex_engine) is called.

Example from the PR add as a regression test.
2018-04-11 09:59:23 +02:00
Alain Frisch 2d6ed01bd8
Fix bug introduced in #1585. (#1598) 2018-02-22 14:01:15 +01:00
alainfrisch ee400fffd8 Refactor. 2018-01-30 11:37:03 +01:00
alainfrisch cb5cd575b7 Move inlining decision to its own function. 2018-01-30 11:33:31 +01:00
alainfrisch 0f9714329d Avoid quoted strings, better indentation, limit scope of internal variables. 2018-01-30 11:22:47 +01:00
alainfrisch 7607904088 Emit indented code (patch from Frederic Bour) 2018-01-30 09:52:11 +01:00
alainfrisch e47b09c685 Do not update lex_start_p/lex_curr_p when lex_curr_p == Lexing.dummy_pos.
This allows the client code to disable update of those fields, which
accounts for a significant amount of time spend in the generated code.

Perhaps this should rather be controlled more statically (to avoid a
runtime check -- but it is very cheap), by some directive in the lexer
specification itself (global, or on each rule).
2018-01-26 16:57:28 +01:00
alainfrisch f96d68895a Optimize output of ocamllex -ml 2018-01-26 15:42:18 +01:00
Fourchaux 72cfdd56e9 Typos and basic grammar error fixing (#1280) 2017-08-10 11:59:23 +01:00
Sébastien Briais 0c9de3c93a Modify API of update. 2017-02-28 14:11:45 +01:00
Sébastien Briais 6a814bd73e Simplify code by using Map.update. 2017-02-28 14:11:45 +01:00
pierreweis 878318123f Cosmetic: removing spurious spaces in resulting lexer 2017-01-18 12:34:38 +01:00
David Allsopp d168db2c78 make alldepend 2016-12-14 13:14:21 +00:00
Hongbo Zhang bda66837a5 fix ocamllex -ml, works with -safe-string option (#750) 2016-08-26 09:11:55 +02:00
Damien Doligez 0b4fbc2b30 fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
alainfrisch 32f0e2120c Detect unused module declarations. 2016-07-18 10:35:19 +02:00
Sébastien Hinderer 50147913ac Call the '#' sign hash rather than sharp. 2016-05-09 16:34:40 +02:00
alainfrisch c1ead896a2 Pass -slash to ocamldep so that dependencies generated from a Windows system are closer to those generated from a Unix system. 2016-04-13 17:04:15 +02:00
David Allsopp cd729b2510 Fix faults arising from merging Makefile{,.nt}
Bootstrapping FlexDLL broken for lex and tools.
2016-04-06 19:30:56 +01:00
whitequark 08e20f247e lex/Makefile{,.nt}: merge. 2016-03-17 23:36:27 +01:00
Alain Frisch 0895d83a83 More warnings for ocamllex. 2016-03-15 22:47:37 +01:00
alainfrisch de857d6fb9 GPR#324: Make boot/ocamlc read directly byterun/primitives (patch by Francois Bobot). 2016-03-10 10:46:19 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
Damien Doligez ee8f71101b clean up whitespace and cut long lines 2016-02-17 13:36:27 +01:00
David Allsopp 81604e76f6 Minor corrections to clean targets 2016-01-25 15:08:03 +00:00
David Allsopp b46843fb69 Allow compilation using bootstrapped FlexDLL
Extend the previous patch allowing make -f Makefile.nt flexdll
install-flexdll not to require the install-flexdll stage.

OCAML_FLEXLINK is utilised as required to allow compilation of the entire
system using an in-tree compiled flexlink. The build process simply
required the flexdll target to appear before world.

opt.opt compiles a native code version of flexlink.exe as flexlink.opt.

install always installs flexlink.exe if it was compiled along with any
required .manifest files. It also installs the appropriate .o/.obj files
to $(INSTALL_LIBDIR).

At present, the bootstrapping is not extended to the Cygwin ports.
2016-01-15 17:07:12 +00:00
Damien Doligez 0225ca01e3 GC latency improvements 2015-12-21 14:27:46 +01:00
Damien Doligez 7cb9a80744 simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo 2015-11-06 16:25:05 +01:00
Gabriel Scherer f5d4a418f7 Ambiguous translation of french comments
(user 'octachron')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 20:41:43 +00:00
Gabriel Scherer 9a533a50cd make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:59 +00:00
Damien Doligez 4b83d53fbc update .depend and bootstrap compilers after 4.02 merge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 18:34:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00