Commit 20e29e92 authored by POTTIER Francois's avatar POTTIER Francois

Removed the parameter [raw_stretch_action] of the printer,

  which was always [false].
The field [stretch_raw_content] is still required (for ocamltypes) because
there is one place where we use it (a call to [stretch true] in printer.ml)
and it is NOT identical to [stretch_content] (there is padding and
parentheses). Perhaps one could find a way of removing it. For now
I'll just be dumb and leave it alone.
parent 00f14e8a
......@@ -164,7 +164,6 @@ let pkeywords action =
let print f action =
let module P = Printer.Make (struct let f = f
let locate_stretches = None
let raw_stretch_action = false
end)
in
P.expr action.expr
......
......@@ -19,7 +19,6 @@ let write program =
[menhir foo/bar.mly] and [cd foo && menhir bar.mly] will produce
different files. Nevertheless, this seems useful/reasonable. *)
Some filename
let raw_stretch_action = false
end) in
P.program program
......
......@@ -183,7 +183,6 @@ let write grammar () =
let module P = Printer.Make (struct
let f = ml
let locate_stretches = Some mlname
let raw_stretch_action = false
end) in
P.program (program grammar);
close_out ml
......
......@@ -172,7 +172,6 @@ let write grammar () =
let module P = Printer.Make (struct
let f = mli
let locate_stretches = None
let raw_stretch_action = false
end) in
P.interface (interface grammar);
close_out mli
......
......@@ -9,10 +9,6 @@ module Make (X : sig
val f: out_channel
(* If [raw_stretch_action] is set, then we print the semantic actions
as they are found into the original source code. *)
val raw_stretch_action: bool
(* This controls the way we print Objective Caml stretches (types and
semantic actions). We either surround them with #line directives
(for better error reports if the generated code is ill - typed) or
......@@ -356,7 +352,7 @@ and exprk k f e =
| EVar v ->
var f v
| ETextual action ->
stretch (X.raw_stretch_action) f action
stretch false f action
| EUnit ->
fprintf f "()"
| EIntConst k ->
......
......@@ -6,10 +6,6 @@ module Make (X : sig
val f: out_channel
(* If [raw_stretch_action] is set, then we print the semantic actions
as they are found into the original source code. *)
val raw_stretch_action: bool
(* This controls the way we print Objective Caml stretches (types and
semantic actions). We either surround them with #line directives
(for better error reports if the generated code is ill-typed) or
......
......@@ -111,7 +111,6 @@ let produce_tokentypes grammar =
let module P =
Printer.Make (struct
let f = open_out (Settings.base ^ ".mli")
let raw_stretch_action = false
let locate_stretches = None
end)
in
......@@ -121,7 +120,6 @@ let produce_tokentypes grammar =
let module P =
Printer.Make (struct
let f = open_out (Settings.base ^ ".ml")
let raw_stretch_action = false
let locate_stretches = None
end)
in
......
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