Commit d15311b7 authored by POTTIER Francois's avatar POTTIER Francois

Ensure that the standard library is loaded first. This fixes the bug...

Ensure that the standard library is loaded first. This fixes the bug introduced by my incorrect refactoring in commit 6abe2316.
parent 6842ebf8
......@@ -62,10 +62,14 @@ let grammars : Syntax.partial_grammar list =
[Settings.stdlib_filename]. This file name can appear in generated
parsers, because Menhir produces # directives that point back to
source (.mly) files. *)
load_grammar_from_contents
Settings.stdlib_filename
Standard_mly.contents ::
grammars()
(* Note that the [let] construct below is required in order to ensure
that the standard library is read first. *)
let standard_library =
load_grammar_from_contents
Settings.stdlib_filename
Standard_mly.contents
in
standard_library :: grammars()
let () =
Time.tick "Lexing and parsing"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment