package archetype

  1. Overview
  2. Docs
include MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE with type token = token
type token = token
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
val lexer_lexbuf_to_supplier : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer
val loop_handle_undo : ('a -> 'answer) -> ('a checkpoint -> 'a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> MenhirLib.IncrementalEngine.position -> bool
type 'a lr1state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
type _ terminal =
  1. | T_error : unit terminal
  2. | T_XOR : unit terminal
  3. | T_WITH_METADATA : unit terminal
  4. | T_WITH : unit terminal
  5. | T_WHILE : unit terminal
  6. | T_WHEN : unit terminal
  7. | T_VIEW : unit terminal
  8. | T_VARIABLE : unit terminal
  9. | T_VAR : unit terminal
  10. | T_UTZ : string terminal
  11. | T_UNPACK : unit terminal
  12. | T_UNIT : unit terminal
  13. | T_UNDERSCORE : unit terminal
  14. | T_TZ_EXPR : string terminal
  15. | T_TZ : string terminal
  16. | T_TYPE : unit terminal
  17. | T_TRUE : unit terminal
  18. | T_TRANSITION : unit terminal
  19. | T_TRANSFER : unit terminal
  20. | T_TO : unit terminal
  21. | T_TICKET : unit terminal
  22. | T_THEN : unit terminal
  23. | T_STRING_EXT : string terminal
  24. | T_STRING : string terminal
  25. | T_STATE_IS : unit terminal
  26. | T_STATES : unit terminal
  27. | T_SOURCED : unit terminal
  28. | T_SORTED : unit terminal
  29. | T_SOME : unit terminal
  30. | T_SLASHPERCENT : unit terminal
  31. | T_SLASH : unit terminal
  32. | T_SET : unit terminal
  33. | T_SEMI_COLON : unit terminal
  34. | T_SELF_CONTRACT : unit terminal
  35. | T_SELF : unit terminal
  36. | T_SAPLING_TRANSACTION : unit terminal
  37. | T_SAPLING_STATE : unit terminal
  38. | T_RPAREN : unit terminal
  39. | T_RIGHT : unit terminal
  40. | T_RETURN : unit terminal
  41. | T_REQUIRE_ENTRYPOINT : unit terminal
  42. | T_REQUIRE : unit terminal
  43. | T_RECORD : unit terminal
  44. | T_RBRACKET : unit terminal
  45. | T_RBRACE : unit terminal
  46. | T_QUESTIONIS : unit terminal
  47. | T_QUESTIONEQUAL : unit terminal
  48. | T_QUESTIONDOT : unit terminal
  49. | T_QUESTIONCOLONEQUAL : unit terminal
  50. | T_QUESTION : unit terminal
  51. | T_PLUSEQUAL : unit terminal
  52. | T_PLUS : unit terminal
  53. | T_PIPE_GREATER_GREATER : unit terminal
  54. | T_PIPEEQUAL : unit terminal
  55. | T_PIPE : unit terminal
  56. | T_PIDENT : string terminal
  57. | T_PERCENT_LIT : string terminal
  58. | T_PERCENT : unit terminal
  59. | T_PARTITION : unit terminal
  60. | T_OTHERWISE : unit terminal
  61. | T_OR : unit terminal
  62. | T_OPTION : unit terminal
  63. | T_ONCHAIN : unit terminal
  64. | T_OFFCHAIN : unit terminal
  65. | T_NUMBER_FR : Big_int.big_int terminal
  66. | T_NUMBERNAT : Big_int.big_int terminal
  67. | T_NUMBERINT : Big_int.big_int terminal
  68. | T_NO_TRANSFER : unit terminal
  69. | T_NOT : unit terminal
  70. | T_NONE : unit terminal
  71. | T_NEQUAL : unit terminal
  72. | T_NAMESPACE : unit terminal
  73. | T_MULTEQUAL : unit terminal
  74. | T_MULT : unit terminal
  75. | T_MTZ : string terminal
  76. | T_MINUSEQUAL : unit terminal
  77. | T_MINUS : unit terminal
  78. | T_MICHELSON : unit terminal
  79. | T_MATCH_DETACH : unit terminal
  80. | T_MATCH : unit terminal
  81. | T_MAP : unit terminal
  82. | T_MAKE_SET : unit terminal
  83. | T_MAKE_MAP : unit terminal
  84. | T_MAKE_LIST : unit terminal
  85. | T_MAKE_EVENT : unit terminal
  86. | T_MAKE_BIG_MAP : unit terminal
  87. | T_MAKE_ASSET : unit terminal
  88. | T_LPAREN : unit terminal
  89. | T_LIST : unit terminal
  90. | T_LET : unit terminal
  91. | T_LESS_LESS_PIPE : unit terminal
  92. | T_LESS_EQUAL_GREATER : unit terminal
  93. | T_LESSEQUAL : unit terminal
  94. | T_LESS : unit terminal
  95. | T_LEFT : unit terminal
  96. | T_LBRACKET : unit terminal
  97. | T_LBRACE : unit terminal
  98. | T_LAMBDA_MICHELSON : unit terminal
  99. | T_LAMBDA : unit terminal
  100. | T_ITERABLE_BIG_MAP : unit terminal
  101. | T_ITER : unit terminal
  102. | T_IS : unit terminal
  103. | T_INVALID_EXPR : unit terminal
  104. | T_INVALID_EFFECT : unit terminal
  105. | T_INVALID_DECL : unit terminal
  106. | T_INITIALIZED : unit terminal
  107. | T_INITIAL : unit terminal
  108. | T_IN : unit terminal
  109. | T_IMPORT : unit terminal
  110. | T_IMPLY : unit terminal
  111. | T_IF : unit terminal
  112. | T_IDENTIFIED : unit terminal
  113. | T_IDENT : string terminal
  114. | T_GREATEREQUAL : unit terminal
  115. | T_GREATER : unit terminal
  116. | T_GLOBAL_CONSTANT : unit terminal
  117. | T_GET_ENTRYPOINT : unit terminal
  118. | T_GETTER : unit terminal
  119. | T_FUNCTION : unit terminal
  120. | T_FROM : unit terminal
  121. | T_FOR : unit terminal
  122. | T_FOLD : unit terminal
  123. | T_FALSE : unit terminal
  124. | T_FAIL_IF : unit terminal
  125. | T_FAILSOME : unit terminal
  126. | T_FAILEXPR : unit terminal
  127. | T_FAIL : unit terminal
  128. | T_EVENT : unit terminal
  129. | T_EQUAL : unit terminal
  130. | T_EOF : unit terminal
  131. | T_ENUM : unit terminal
  132. | T_ENTRY : unit terminal
  133. | T_END : unit terminal
  134. | T_EMIT : unit terminal
  135. | T_ELSE : unit terminal
  136. | T_EFFECT : unit terminal
  137. | T_DURATION : string terminal
  138. | T_DO_REQUIRE : unit terminal
  139. | T_DO_FAIL_IF : unit terminal
  140. | T_DOT : unit terminal
  141. | T_DONE : unit terminal
  142. | T_DO : unit terminal
  143. | T_DIVEQUAL : unit terminal
  144. | T_DIV : unit terminal
  145. | T_DETACH : unit terminal
  146. | T_DECIMAL : string terminal
  147. | T_DATE : string terminal
  148. | T_CONTRACT : unit terminal
  149. | T_CONSTANT : unit terminal
  150. | T_CONST : unit terminal
  151. | T_COMMA : unit terminal
  152. | T_COLONEQUAL : unit terminal
  153. | T_COLONCOLON : unit terminal
  154. | T_COLON : unit terminal
  155. | T_CALL_VIEW : unit terminal
  156. | T_CALLED : unit terminal
  157. | T_CALL : unit terminal
  158. | T_BYTES_G2 : string terminal
  159. | T_BYTES_G1 : string terminal
  160. | T_BYTES_FR : string terminal
  161. | T_BYTES : string terminal
  162. | T_BY : unit terminal
  163. | T_BIG_MAP : unit terminal
  164. | T_BEGIN : unit terminal
  165. | T_ASSET_VIEW : unit terminal
  166. | T_ASSET_VALUE : unit terminal
  167. | T_ASSET_KEY : unit terminal
  168. | T_ASSET_CONTAINER : unit terminal
  169. | T_ASSET : unit terminal
  170. | T_AS : unit terminal
  171. | T_ARCHETYPE : unit terminal
  172. | T_ANY : unit terminal
  173. | T_ANNOTATION : string terminal
  174. | T_AND : unit terminal
  175. | T_AMPEQUAL : unit terminal
  176. | T_AGGREGATE : unit terminal
  177. | T_ADDRESS_TO_CONTRACT : unit terminal
  178. | T_ADDRESS : string terminal
  179. | T_ACCEPT_TRANSFER : unit terminal
type _ nonterminal =
  1. | N_view_decl : ParseTree.declaration_unloc nonterminal
  2. | N_vc_decl_VARIABLE_ : (ParseTree.lident * ParseTree.type_t * ParseTree.expr option) nonterminal
  3. | N_vc_decl_CONSTANT_ : (ParseTree.lident * ParseTree.type_t * ParseTree.expr option) nonterminal
  4. | N_variable : ParseTree.declaration_unloc nonterminal
  5. | N_type_s_unloc : ParseTree.type_r nonterminal
  6. | N_type_r : ParseTree.type_r nonterminal
  7. | N_type_decl : ParseTree.declaration_unloc nonterminal
  8. | N_transition_to_item : (ParseTree.lident * ParseTree.expr option * ParseTree.expr option) nonterminal
  9. | N_transition : ParseTree.declaration_unloc nonterminal
  10. | N_state_is_unloc : (ParseTree.lident * ParseTree.expr option) nonterminal
  11. | N_start_expr : ParseTree.expr nonterminal
  12. | N_sourcedby_unloc : (ParseTree.expr * ParseTree.expr option) nonterminal
  13. | N_snl2_COMMA_ident_ : ParseTree.lident list nonterminal
  14. | N_snl2_COMMA_expr_ : ParseTree.expr list nonterminal
  15. | N_snl_SEMI_COLON_rf_WITH__ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list nonterminal
  16. | N_snl_SEMI_COLON_rf_OTHERWISE__ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list nonterminal
  17. | N_snl_SEMI_COLON_mich_node_ : ParseTree.micheline_t list nonterminal
  18. | N_snl_SEMI_COLON_field_ : ParseTree.field list nonterminal
  19. | N_snl_SEMI_COLON_cf_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list nonterminal
  20. | N_snl_COMMA_type_t_ : ParseTree.type_t list nonterminal
  21. | N_snl_COMMA_simple_expr_ : ParseTree.expr list nonterminal
  22. | N_snl_COMMA_parameter_ : ParseTree.parameter list nonterminal
  23. | N_snl_COMMA_function_arg_ : ParseTree.args nonterminal
  24. | N_snl_COMMA_expr_ : ParseTree.expr list nonterminal
  25. | N_snl_COLON_simple_expr_ : ParseTree.expr list nonterminal
  26. | N_sl_SEMI_COLON_field_ : ParseTree.field list nonterminal
  27. | N_sl_COMMA_simple_expr_ : ParseTree.expr list nonterminal
  28. | N_sl_COMMA_function_arg_ : ParseTree.args nonterminal
  29. | N_simple_expr_r : ParseTree.expr_unloc nonterminal
  30. | N_separated_nonempty_list_SEMI_COLON_recupdate_item_ : (ParseTree.lident * ParseTree.expr) list nonterminal
  31. | N_separated_nonempty_list_SEMI_COLON_record_item_ : ParseTree.record_item list nonterminal
  32. | N_separated_nonempty_list_SEMI_COLON_record_expr_ : ParseTree.expr list nonterminal
  33. | N_separated_nonempty_list_MULT_type_s_ : ParseTree.type_t list nonterminal
  34. | N_separated_nonempty_list_COMMA_ident_ : ParseTree.lident list nonterminal
  35. | N_rf_unloc_WITH_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) nonterminal
  36. | N_rf_unloc_OTHERWISE_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) nonterminal
  37. | N_rf_WITH_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced nonterminal
  38. | N_rf_OTHERWISE_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced nonterminal
  39. | N_recupdate_item : (ParseTree.lident * ParseTree.expr) nonterminal
  40. | N_record_item : ParseTree.record_item nonterminal
  41. | N_record : ParseTree.declaration_unloc nonterminal
  42. | N_pname : ParseTree.pname nonterminal
  43. | N_order_operations : ParseTree.expr_unloc nonterminal
  44. | N_order_operation : ParseTree.expr_unloc nonterminal
  45. | N_option_with_effect_ : ParseTree.expr option nonterminal
  46. | N_option_tentry_postfix_ : (ParseTree.lident * ParseTree.expr) option nonterminal
  47. | N_option_state_is_ : (ParseTree.lident * ParseTree.expr option) Location.loced option nonterminal
  48. | N_option_sourcedby_ : (ParseTree.expr * ParseTree.expr option) Location.loced option nonterminal
  49. | N_option_require_value_ : ParseTree.expr option nonterminal
  50. | N_option_require_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list option nonterminal
  51. | N_option_record_position_ : ParseTree.expr option nonterminal
  52. | N_option_prefix_EQUAL_enum_body__ : ParseTree.enum_decl option nonterminal
  53. | N_option_paren_separated_nonempty_list_COMMA_ident___ : ParseTree.lident list option nonterminal
  54. | N_option_parameter_init_ : ParseTree.expr option nonterminal
  55. | N_option_otherwise_section_ : ParseTree.expr option nonterminal
  56. | N_option_function_return_ : ParseTree.type_t option nonterminal
  57. | N_option_failif_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list option nonterminal
  58. | N_option_effect_ : ParseTree.expr option nonterminal
  59. | N_option_default_value_ : ParseTree.expr option nonterminal
  60. | N_option_constants_ : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list option nonterminal
  61. | N_option_calledby_ : (ParseTree.expr * ParseTree.expr option) Location.loced option nonterminal
  62. | N_option_asset_options_ : ParseTree.asset_option list option nonterminal
  63. | N_option_asset_fields_ : ParseTree.field list option nonterminal
  64. | N_option_app_args_ : ParseTree.expr list option nonterminal
  65. | N_option_SEMI_COLON_ : unit option nonterminal
  66. | N_nonempty_list_type_tuple_ : ParseTree.type_t list nonterminal
  67. | N_nonempty_list_transition_to_item_ : ParseTree.transition nonterminal
  68. | N_nonempty_list_mich_argument_ : ParseTree.micheline_t list nonterminal
  69. | N_nonempty_list_loc_pattern__ : ParseTree.pattern list nonterminal
  70. | N_nonempty_list_ident_ : ParseTree.lident list nonterminal
  71. | N_nonempty_list_declaration_ : ParseTree.archetype_unloc nonterminal
  72. | N_nonempty_list_branch_ : ParseTree.branch list nonterminal
  73. | N_nonempty_list_asset_option_ : ParseTree.asset_option list nonterminal
  74. | N_namespace : ParseTree.declaration_unloc nonterminal
  75. | N_mich_node : ParseTree.micheline_t nonterminal
  76. | N_mich_argument : ParseTree.micheline_t nonterminal
  77. | N_main : ParseTree.archetype nonterminal
  78. | N_loption_separated_nonempty_list_SEMI_COLON_recupdate_item__ : (ParseTree.lident * ParseTree.expr) list nonterminal
  79. | N_loption_separated_nonempty_list_SEMI_COLON_record_item__ : ParseTree.record_item list nonterminal
  80. | N_literal : ParseTree.literal nonterminal
  81. | N_list_mich_annot_ : string list nonterminal
  82. | N_list_function_item_ : ParseTree.s_function Location.loced list nonterminal
  83. | N_list_enum_option_ : ParseTree.enum_option list nonterminal
  84. | N_list_enum_cdecl_ : ParseTree.enum_decl nonterminal
  85. | N_list_asset_post_option_ : ParseTree.asset_post_option list nonterminal
  86. | N_import : ParseTree.declaration_unloc nonterminal
  87. | N_implementation_archetype : ParseTree.archetype_unloc nonterminal
  88. | N_getter_simple : ParseTree.declaration_unloc nonterminal
  89. | N_getter : ParseTree.declaration_unloc nonterminal
  90. | N_function_item : ParseTree.s_function Location.loced nonterminal
  91. | N_function_decl : ParseTree.declaration_unloc nonterminal
  92. | N_field_r : ParseTree.field_unloc nonterminal
  93. | N_expr_r : ParseTree.expr_unloc nonterminal
  94. | N_event : ParseTree.declaration_unloc nonterminal
  95. | N_enum_option : ParseTree.enum_option nonterminal
  96. | N_enum_cdecl : (ParseTree.lident * ParseTree.type_t list * ParseTree.enum_option list) nonterminal
  97. | N_enum_body : ParseTree.enum_decl nonterminal
  98. | N_enum : ParseTree.declaration_unloc nonterminal
  99. | N_entry_simple : ParseTree.declaration_unloc nonterminal
  100. | N_entry_properties : ParseTree.entry_properties nonterminal
  101. | N_entry : ParseTree.declaration_unloc nonterminal
  102. | N_effect : ParseTree.expr nonterminal
  103. | N_declaration_r : ParseTree.declaration_unloc nonterminal
  104. | N_constant : ParseTree.declaration_unloc nonterminal
  105. | N_cfs : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced list nonterminal
  106. | N_cf_unloc : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) nonterminal
  107. | N_cf : (ParseTree.lident * ParseTree.expr * ParseTree.expr option) Location.loced nonterminal
  108. | N_calledby_unloc : (ParseTree.expr * ParseTree.expr option) nonterminal
  109. | N_branch : ParseTree.branch nonterminal
  110. | N_boption_CONST_ : bool nonterminal
  111. | N_asset_post_option : ParseTree.asset_post_option nonterminal
  112. | N_asset_option : ParseTree.asset_option nonterminal
  113. | N_asset_init : ParseTree.init_asset nonterminal
  114. | N_asset : ParseTree.declaration_unloc nonterminal
  115. | N_archetype_r : ParseTree.archetype_unloc nonterminal
  116. | N_archetype : ParseTree.declaration_unloc nonterminal
include MenhirLib.IncrementalEngine.INSPECTION with type 'a lr1state := 'a lr1state with type production := production with type 'a terminal := 'a terminal with type 'a nonterminal := 'a nonterminal with type 'a env := 'a env
include MenhirLib.IncrementalEngine.SYMBOLS with type 'a terminal := 'a terminal with type 'a nonterminal := 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type item = production * int
val compare_terminals : _ terminal -> _ terminal -> int
val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : production -> production -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a lr1state -> 'a symbol
val items : _ lr1state -> item list
val lhs : production -> xsymbol
val rhs : production -> xsymbol list
val nullable : _ nonterminal -> bool
val first : _ nonterminal -> _ terminal -> bool
val xfirst : xsymbol -> _ terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
OCaml

Innovation. Community. Security.