Commit 31538de9 authored by POTTIER Francois's avatar POTTIER Francois

Replace [IL.expr] with [string] in the .cmly API.

parent 6d1bd410
...@@ -27,6 +27,7 @@ module type GRAMMAR = sig ...@@ -27,6 +27,7 @@ module type GRAMMAR = sig
type lr1 = private int type lr1 = private int
type item = production * int type item = production * int
type ocamltype = string type ocamltype = string
type ocamlexpr = string
module Attribute : sig module Attribute : sig
type t type t
...@@ -73,7 +74,7 @@ module type GRAMMAR = sig ...@@ -73,7 +74,7 @@ module type GRAMMAR = sig
module Action : sig module Action : sig
type t type t
val expr : t -> IL.expr val expr : t -> ocamlexpr
val keywords : t -> Keyword.keyword list val keywords : t -> Keyword.keyword list
val filenames : t -> string list val filenames : t -> string list
end end
......
...@@ -15,7 +15,8 @@ type production = int ...@@ -15,7 +15,8 @@ type production = int
type lr0 = int type lr0 = int
type lr1 = int type lr1 = int
type ocamltype = string type ocamltype = string
type ocamlexpr = string
type attribute = { type attribute = {
a_label: string; a_label: string;
...@@ -51,7 +52,7 @@ type symbol = ...@@ -51,7 +52,7 @@ type symbol =
type identifier = string type identifier = string
type action = { type action = {
a_expr: IL.expr; a_expr: ocamlexpr;
a_keywords: Keyword.keyword list; a_keywords: Keyword.keyword list;
a_filenames: string list; a_filenames: string list;
} }
......
...@@ -81,6 +81,7 @@ module Make (G : sig val grammar : grammar end) : GRAMMAR = struct ...@@ -81,6 +81,7 @@ module Make (G : sig val grammar : grammar end) : GRAMMAR = struct
type lr1 = int type lr1 = int
type item = production * int type item = production * int
type ocamltype = string type ocamltype = string
type ocamlexpr = string
module Attribute = struct module Attribute = struct
......
...@@ -68,7 +68,7 @@ let symbol (sym : Symbol.t) : symbol = ...@@ -68,7 +68,7 @@ let symbol (sym : Symbol.t) : symbol =
let action (a : Action.t) : action = let action (a : Action.t) : action =
{ {
a_expr = Action.to_il_expr a; a_expr = Printer.string_of_expr (Action.to_il_expr a);
a_keywords = Keyword.KeywordSet.elements (Action.keywords a); a_keywords = Keyword.KeywordSet.elements (Action.keywords a);
a_filenames = Action.filenames a; a_filenames = Action.filenames a;
} }
......
# This is the list of modules that must go into MenhirSdk. # This is the list of modules that must go into MenhirSdk.
Keyword Keyword
Positions Positions
IL
IO IO
Version Version
Cmly_format Cmly_format
......
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