Commit 26f36898 authored by fpottier's avatar fpottier

Added an artificial dependency.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/menhir@328 0f8b5475-4b4e-0410-85a8-ee3154a6bfe7
parent dfd16851
...@@ -26,3 +26,24 @@ subdirectory. This is done simply by typing: ...@@ -26,3 +26,24 @@ subdirectory. This is done simply by typing:
(or, equivalently, make -f GNUmakefile). (or, equivalently, make -f GNUmakefile).
ABOUT THE MODULE ORDERING
-------------------------
Some toplevel modules have side effects and must be executed in the
following order:
Settings parses the command line
PreFront reads the grammar description files
TokenType deals with --only-tokens and exits
Front deals with --depend, --infer, --only-preprocess, and exits
Grammar performs a number of analyses of the grammar
Lr0 constructs the LR(0) automaton
Slr determines whether the grammar is SLR
Lr1 constructs the LR(1) automaton
Conflict performs default conflict resolution and explains conflicts
Invariant performs a number of analyses of the automaton
Interpret deals with --interpret and exits
Back produces the output and exits
A few artificial dependencies have been added in the code in order
to ensure that this ordering is respected by ocamlbuild.
...@@ -77,22 +77,6 @@ engine tableFormat tableInterpreter convert ...@@ -77,22 +77,6 @@ engine tableFormat tableInterpreter convert
# A list of the modules that must be linked into the Menhir executable. # A list of the modules that must be linked into the Menhir executable.
# Some of these modules have side effects and must be executed in the
# following order:
# Settings parses the command line
# PreFront reads the grammar description files
# TokenType deals with --only-tokens and exits
# Front deals with --depend, --infer, --only-preprocess, and exits
# Grammar performs a number of analyses of the grammar
# Lr0 constructs the LR(0) automaton
# Slr determines whether the grammar is SLR
# Lr1 constructs the LR(1) automaton
# Conflict performs default conflict resolution and explains conflicts
# Invariant performs a number of analyses of the automaton
# Interpret deals with --interpret and exits
# Back produces the output and exits
MODULES := menhirLib Fix stringSet stringMap mark compressedBitSet \ MODULES := menhirLib Fix stringSet stringMap mark compressedBitSet \
unionFind tarjan patricia misc option \ unionFind tarjan patricia misc option \
breadth listMonad dot installation version settings time \ breadth listMonad dot installation version settings time \
......
module TT = TokenType (* artificial dependency; ensures that [TokenType] runs first *)
(* Start where [PreFront] left off. *) (* Start where [PreFront] left off. *)
let grammar = let grammar =
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
in each of the automaton's states. *) in each of the automaton's states. *)
open Grammar open Grammar
open Conflict (* artificial dependency; ensures that [Conflict] runs first *) module C = Conflict (* artificial dependency; ensures that [Conflict] runs first *)
(* ------------------------------------------------------------------------ *) (* ------------------------------------------------------------------------ *)
(* Compute a lower bound on the height of the stack at every state. At the (* Compute a lower bound on the height of the stack at every state. At the
......
open Grammar open Grammar
open Slr (* artificial dependency; ensures that [Slr] runs first *) module S = Slr (* artificial dependency; ensures that [Slr] runs first *)
(* This module constructs an LR(1) automaton by following Pager's method, that (* This module constructs an LR(1) automaton by following Pager's method, that
is, by merging states on the fly when they are weakly compatible. *) is, by merging states on the fly when they are weakly compatible. *)
......
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