aboutsummaryrefslogtreecommitdiffhomepage
path: root/grammar/q_util.mli
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-03-19 18:20:51 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-03-19 18:39:06 +0100
commita559727d0a219db79d4230cccc2b4e73c8fc30c8 (patch)
tree092efdd7d6d828d2d49978962c43089237f256d2 /grammar/q_util.mli
parentf329e1e63eb29958c4cc0d7bddfdb84a754351d2 (diff)
EXTEND macros use their own internal representations.
Diffstat (limited to 'grammar/q_util.mli')
-rw-r--r--grammar/q_util.mli24
1 files changed, 20 insertions, 4 deletions
diff --git a/grammar/q_util.mli b/grammar/q_util.mli
index c84e9d140..7d4cc0200 100644
--- a/grammar/q_util.mli
+++ b/grammar/q_util.mli
@@ -8,9 +8,25 @@
open Compat (* necessary for camlp4 *)
+type argument_type =
+| ListArgType of argument_type
+| OptArgType of argument_type
+| PairArgType of argument_type * argument_type
+| ExtraArgType of string
+
+type user_symbol =
+| Ulist1 : user_symbol -> user_symbol
+| Ulist1sep : user_symbol * string -> user_symbol
+| Ulist0 : user_symbol -> user_symbol
+| Ulist0sep : user_symbol * string -> user_symbol
+| Uopt : user_symbol -> user_symbol
+| Umodifiers : user_symbol -> user_symbol
+| Uentry : string -> user_symbol
+| Uentryl : string * int -> user_symbol
+
type extend_token =
| ExtTerminal of string
-| ExtNonTerminal of Extend.user_symbol * string
+| ExtNonTerminal of user_symbol * string
val mlexpr_of_list : ('a -> MLast.expr) -> 'a list -> MLast.expr
@@ -28,8 +44,8 @@ val mlexpr_of_option : ('a -> MLast.expr) -> 'a option -> MLast.expr
val mlexpr_of_ident : string -> MLast.expr
-val mlexpr_of_prod_entry_key : (string -> MLast.expr) -> Extend.user_symbol -> MLast.expr
+val mlexpr_of_prod_entry_key : (string -> MLast.expr) -> user_symbol -> MLast.expr
-val type_of_user_symbol : Extend.user_symbol -> Genarg.argument_type
+val type_of_user_symbol : user_symbol -> argument_type
-val parse_user_entry : string -> string -> Extend.user_symbol
+val parse_user_entry : string -> string -> user_symbol