Commit a86834b3 authored by POTTIER Francois's avatar POTTIER Francois

Renamed [tokenprefix] to [tokendata], with a slightly more abstract spec.

parent 8646c2d9
...@@ -180,6 +180,9 @@ let tctoken = ...@@ -180,6 +180,9 @@ let tctoken =
let ttoken = let ttoken =
TypApp (tctoken, []) TypApp (tctoken, [])
let tokendata =
tokenprefix
let tctokengadt = let tctokengadt =
tokenprefix tctokengadt tokenprefix tctokengadt
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
val ttoken: IL.typ val ttoken: IL.typ
(* [tokendata] maps the name of a token to a data constructor of the [token]
type. (If [--external-tokens] is set, then it prefixes its argument with an
appropriate OCaml module name. Otherwise, it is the identity.) *)
val tokendata: string -> string
(* This is the conventional name of the [terminal] type, a.k.a. the token (* This is the conventional name of the [terminal] type, a.k.a. the token
GADT. This is an indexed type (i.e., it has one type parameter). Its data GADT. This is an indexed type (i.e., it has one type parameter). Its data
constructors carry zero value arguments. If [--external-tokens] is set, constructors carry zero value arguments. If [--external-tokens] is set,
...@@ -27,11 +33,6 @@ val ttoken: IL.typ ...@@ -27,11 +33,6 @@ val ttoken: IL.typ
val ttokengadt: IL.typ -> IL.typ val ttokengadt: IL.typ -> IL.typ
(* If [--external-tokens] is set, then [tokenprefix] prefixes its argument
with an appropriate OCaml module name. Otherwise, it is the identity. *)
val tokenprefix: string -> string
(* These are the definitions of the types of tokens, for use by the code (* These are the definitions of the types of tokens, for use by the code
generators. This can be a list of zero, one, or two types. Indeed, this generators. This can be a list of zero, one, or two types. Indeed, this
list is empty when [--external-tokens] is set. Otherwise, it contains just list is empty when [--external-tokens] is set. Otherwise, it contains just
......
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