diff options
Diffstat (limited to 'grammar/q_util.mli')
-rw-r--r-- | grammar/q_util.mli | 24 |
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 |