package diffast-langs-verilog-parsing

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Make.MenhirInterpreterSource

include MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE with type token = token
Sourcetype token = token
Sourcetype production

A value of type production is (an index for) a production. The start productions (which do not exist in an .mly file, but are constructed by Menhir internally) are not part of this type.

Sourcetype 'a env

A value of type 'a env represents a configuration of the automaton: current state, stack, lookahead token, etc. The parameter 'a is the type of the semantic value that will eventually be produced if the parser succeeds.

In normal operation, the parser works with checkpoints: see the functions offer and resume. However, it is also possible to work directly with environments (see the functions pop, force_reduction, and feed) and to reconstruct a checkpoint out of an environment (see input_needed). This is considered advanced functionality; its purpose is to allow error recovery strategies to be programmed by the user.

Sourcetype '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

The type 'a checkpoint represents an intermediate or final state of the parser. An intermediate checkpoint is a suspension: it records the parser's current state, and allows parsing to be resumed. The parameter 'a is the type of the semantic value that will eventually be produced if the parser succeeds.

Accepted and Rejected are final checkpoints. Accepted carries a semantic value.

InputNeeded is an intermediate checkpoint. It means that the parser wishes to read one token before continuing.

Shifting is an intermediate checkpoint. It means that the parser is taking a shift transition. It exposes the state of the parser before and after the transition. The Boolean parameter tells whether the parser intends to request a new token after this transition. (It always does, except when it is about to accept.)

AboutToReduce is an intermediate checkpoint. It means that the parser is about to perform a reduction step. It exposes the parser's current state as well as the production that is about to be reduced.

HandlingError is an intermediate checkpoint. It means that the parser has detected an error and is currently handling it, in several steps.

offer allows the user to resume the parser after it has suspended itself with a checkpoint of the form InputNeeded env. offer expects the old checkpoint as well as a new token and produces a new checkpoint. It does not raise any exception.

Sourcetype strategy = [
  1. | `Legacy
  2. | `Simplified
]

The optional argument strategy influences the manner in which resume deals with checkpoints of the form HandlingError _. Its default value is `Legacy. It can be briefly described as follows:

  • If the error token is used only to report errors (that is, if the error token appears only at the end of a production, whose semantic action raises an exception) then the simplified strategy should be preferred. (This includes the case where the error token does not appear at all in the grammar.)
  • If the error token is used to recover after an error, or if perfect backward compatibility is required, the legacy strategy should be selected.

More details on strategies appear in the file Engine.ml.

Sourceval resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint

resume allows the user to resume the parser after it has suspended itself with a checkpoint of the form Shifting _, AboutToReduce _, or HandlingError _. resume expects the old checkpoint and produces a new checkpoint. It does not raise any exception.

A token supplier is a function of no arguments which delivers a new token (together with its start and end positions) every time it is called.

Sourceval lexer_lexbuf_to_supplier : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> supplier

A pair of a lexer and a lexing buffer can be turned into a supplier.

The functions offer and resume are sufficient to write a parser loop. One can imagine many variations (which is why we expose these functions in the first place!). Here, we expose a few variations of the main loop, ready for use.

Sourceval loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a

loop supplier checkpoint begins parsing from checkpoint, reading tokens from supplier. It continues parsing until it reaches a checkpoint of the form Accepted v or Rejected. In the former case, it returns v. In the latter case, it raises the exception Error. The optional argument strategy, whose default value is Legacy, is passed to resume and influences the error-handling strategy.

Sourceval loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer

loop_handle succeed fail supplier checkpoint begins parsing from checkpoint, reading tokens from supplier. It continues parsing until it reaches a checkpoint of the form Accepted v or HandlingError env (or Rejected, but that should not happen, as HandlingError _ will be observed first). In the former case, it calls succeed v. In the latter case, it calls fail with this checkpoint. It cannot raise Error.

This means that Menhir's error-handling procedure does not get a chance to run. For this reason, there is no strategy parameter. Instead, the user can implement her own error handling code, in the fail continuation.

Sourceval loop_handle_undo : ('a -> 'answer) -> ('a checkpoint -> 'a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer

loop_handle_undo is analogous to loop_handle, except it passes a pair of checkpoints to the failure continuation.

The first (and oldest) checkpoint is the last InputNeeded checkpoint that was encountered before the error was detected. The second (and newest) checkpoint is where the error was detected, as in loop_handle. Going back to the first checkpoint can be thought of as undoing any reductions that were performed after seeing the problematic token. (These reductions must be default reductions or spurious reductions.)

loop_handle_undo must initially be applied to an InputNeeded checkpoint. The parser's initial checkpoints satisfy this constraint.

Sourceval shifts : 'a checkpoint -> 'a env option

shifts checkpoint assumes that checkpoint has been obtained by submitting a token to the parser. It runs the parser from checkpoint, through an arbitrary number of reductions, until the parser either accepts this token (i.e., shifts) or rejects it (i.e., signals an error). If the parser decides to shift, then Some env is returned, where env is the parser's state just before shifting. Otherwise, None is returned.

It is desirable that the semantic actions be side-effect free, or that their side-effects be harmless (replayable).

The function acceptable allows testing, after an error has been detected, which tokens would have been accepted at this point. It is implemented using shifts. Its argument should be an InputNeeded checkpoint.

For completeness, one must undo any spurious reductions before carrying out this test -- that is, one must apply acceptable to the FIRST checkpoint that is passed by loop_handle_undo to its failure continuation.

This test causes some semantic actions to be run! The semantic actions should be side-effect free, or their side-effects should be harmless.

The position pos is used as the start and end positions of the hypothetical token, and may be picked up by the semantic actions. We suggest using the position where the error was detected.

Sourcetype 'a lr1state

The abstract type 'a lr1state describes the non-initial states of the LR(1) automaton. The index 'a represents the type of the semantic value associated with this state's incoming symbol.

Sourceval number : _ lr1state -> int

The states of the LR(1) automaton are numbered (from 0 and up).

Sourceval production_index : production -> int

production_index maps a production to its integer index.

Sourceval find_production : int -> production

find_production maps a production index to a production. Its argument must be a valid index; use with care.

An element is a pair of a non-initial state s and a semantic value v associated with the incoming symbol of this state. The idea is, the value v was pushed onto the stack just before the state s was entered. Thus, for some type 'a, the state s has type 'a lr1state and the value v has type 'a. In other words, the type element is an existential type.

The parser's stack is (or, more precisely, can be viewed as) a stream of elements. The functions top and pop offer access to this stream.

Sourceval top : 'a env -> element option

top env returns the parser's top stack element. The state contained in this stack element is the current state of the automaton. If the stack is empty, None is returned. In that case, the current state of the automaton must be an initial state.

Sourceval pop_many : int -> 'a env -> 'a env option

pop_many i env pops i cells off the automaton's stack. This is done via i successive invocations of pop. Thus, pop_many 1 is pop. The index i must be nonnegative. The time complexity is O(i).

Sourceval get : int -> 'a env -> element option

get i env returns the parser's i-th stack element. The index i is 0-based: thus, get 0 is top. If i is greater than or equal to the number of elements in the stack, None is returned. The time complexity is O(i).

Sourceval current_state_number : 'a env -> int

current_state_number env is (the integer number of) the automaton's current state. This works even if the automaton's stack is empty, in which case the current state is an initial state. This number can be passed as an argument to a message function generated by menhir --compile-errors.

Sourceval equal : 'a env -> 'a env -> bool

equal env1 env2 tells whether the parser configurations env1 and env2 are equal in the sense that the automaton's current state is the same in env1 and env2 and the stack is *physically* the same in env1 and env2. If equal env1 env2 is true, then the sequence of the stack elements, as observed via pop and top, must be the same in env1 and env2. Also, if equal env1 env2 holds, then the checkpoints input_needed env1 and input_needed env2 must be equivalent. The function equal has time complexity O(1).

positions env returns the start and end positions of the current lookahead token. In an initial state, a pair of twice the initial position is returned.

Sourceval env_has_default_reduction : 'a env -> bool

When applied to an environment taken from a checkpoint of the form AboutToReduce (env, prod), the function env_has_default_reduction tells whether the reduction that is about to take place is a default reduction.

Sourceval state_has_default_reduction : _ lr1state -> bool

state_has_default_reduction s tells whether the state s has a default reduction. This includes the case where s is an accepting state.

Sourceval pop : 'a env -> 'a env option

pop env returns a new environment, where the parser's top stack cell has been popped off. (If the stack is empty, None is returned.) This amounts to pretending that the (terminal or nonterminal) symbol that corresponds to this stack cell has not been read.

Sourceval force_reduction : production -> 'a env -> 'a env

force_reduction prod env should be called only if in the state env the parser is capable of reducing the production prod. If this condition is satisfied, then this production is reduced, which means that its semantic action is executed (this can have side effects!) and the automaton makes a goto (nonterminal) transition. If this condition is not satisfied, Invalid_argument _ is raised.

Sourceval input_needed : 'a env -> 'a checkpoint

input_needed env returns InputNeeded env. That is, out of an env that might have been obtained via a series of calls to the functions pop, force_reduction, feed, etc., it produces a checkpoint, which can be used to resume normal parsing, by supplying this checkpoint as an argument to offer.

This function should be used with some care. It could "mess up the lookahead" in the sense that it allows parsing to resume in an arbitrary state s with an arbitrary lookahead symbol t, even though Menhir's reachability analysis (menhir --list-errors) might well think that it is impossible to reach this particular configuration. If one is using Menhir's new error reporting facility, this could cause the parser to reach an error state for which no error message has been prepared.

Sourcetype _ nonterminal =
  1. | N_weight_specification : Ast.node nonterminal
  2. | N_variable_lvalue_list : Ast.node list nonterminal
  3. | N_variable_lvalue_conc_list : Ast.node list nonterminal
  4. | N_variable_lvalue : Ast.node nonterminal
  5. | N_variable_dimension_list_ : Ast.node list nonterminal
  6. | N_variable_dimension_list : Ast.node list nonterminal
  7. | N_variable_dimension : Ast.node nonterminal
  8. | N_variable_decl_expr : Ast.node nonterminal
  9. | N_variable_decl_assignment_list : Ast.node list nonterminal
  10. | N_variable_decl_assignment : Ast.node nonterminal
  11. | N_var_param_reset : unit nonterminal
  12. | N_var_local_param_reset : unit nonterminal
  13. | N_var_data_type : Ast.node nonterminal
  14. | N_value_range_list : Ast.node list nonterminal
  15. | N_value_range : Ast.node nonterminal
  16. | N_use_clause : Ast.node nonterminal
  17. | N_unique_priority_opt : Ast.node list nonterminal
  18. | N_udp_reg_declaration : Ast.node nonterminal
  19. | N_udp_ports_star : Ast.node nonterminal
  20. | N_udp_port_list : Ast.node list nonterminal
  21. | N_udp_port_declaration_list_ : Ast.node list nonterminal
  22. | N_udp_port_declaration_list : Ast.node nonterminal
  23. | N_udp_port_declaration : Ast.node nonterminal
  24. | N_udp_output_declaration : Ast.node nonterminal
  25. | N_udp_nonansi_declaration : Ast.node nonterminal
  26. | N_udp_input_declaration : Ast.node nonterminal
  27. | N_udp_initial_stmt : Ast.node nonterminal
  28. | N_udp_declaration_ports : Ast.node nonterminal
  29. | N_udp_declaration_port_list : Ast.node list nonterminal
  30. | N_udp_declaration : Ast.node nonterminal
  31. | N_udp_body : Ast.node nonterminal
  32. | N_udp_ansi_declaration : Ast.node nonterminal
  33. | N_type_reference : Ast.node nonterminal
  34. | N_type_declaration_ : Ast.node nonterminal
  35. | N_type_declaration : Ast.node nonterminal
  36. | N_trans_set : Ast.node nonterminal
  37. | N_trans_range_list : Ast.node nonterminal
  38. | N_trans_list : Ast.node list nonterminal
  39. | N_trans_item : Ast.node nonterminal
  40. | N_timing_check_event_control : Ast.node nonterminal
  41. | N_timing_check_event : Ast.node nonterminal
  42. | N_timing_check_condition : Ast.node nonterminal
  43. | N_timing_check2_ : Labels.TimingCheck.t nonterminal
  44. | N_timing_check2 : Ast.node nonterminal
  45. | N_timing_check1_ : Labels.TimingCheck.t nonterminal
  46. | N_timing_check1 : Ast.node nonterminal
  47. | N_timing_check0_ : Labels.TimingCheck.t nonterminal
  48. | N_timing_check0 : Ast.node nonterminal
  49. | N_timeunits_declaration : Ast.node nonterminal
  50. | N_timeskew_rest : Ast.node list nonterminal
  51. | N_tf_variable_identifier_list : Ast.node list nonterminal
  52. | N_tf_variable_identifier : Ast.node nonterminal
  53. | N_tf_port_list_part : Ast.node nonterminal
  54. | N_tf_port_list_opt : Ast.node list nonterminal
  55. | N_tf_port_list_list : Ast.node list nonterminal
  56. | N_tf_port_item_head : Ast.node list nonterminal
  57. | N_tf_port_item_dir : Ast.node nonterminal
  58. | N_tf_port_item_assignment : Ast.node nonterminal
  59. | N_tf_port_item : Ast.node list nonterminal
  60. | N_tf_port_declaration : Ast.node nonterminal
  61. | N_tf_part_pure_v : Ast.node list nonterminal
  62. | N_tf_part : Ast.node list nonterminal
  63. | N_tf_item_declaration_list : Ast.node list nonterminal
  64. | N_tf_item_declaration : Ast.node nonterminal
  65. | N_tf_id_scoped : Ast.node nonterminal
  66. | N_task_subroutine_call_no_method : Ast.node nonterminal
  67. | N_task_prototype : Ast.node nonterminal
  68. | N_task_kw : unit nonterminal
  69. | N_task_id : Ast.node nonterminal
  70. | N_task_declaration : Ast.node nonterminal
  71. | N_tagged_opt : Ast.node list nonterminal
  72. | N_system_timing_check : Ast.node nonterminal
  73. | N_system_t_call : Ast.node nonterminal
  74. | N_system_f_call : Ast.node nonterminal
  75. | N_systask : Labels.SystemTask.t nonterminal
  76. | N_svkw_arrayed_ : (string * Ast.node list) nonterminal
  77. | N_svkw_arrayed : Ast.node nonterminal
  78. | N_struct_union_member_list : Ast.node list nonterminal
  79. | N_struct_union_member : Ast.node nonterminal
  80. | N_string_literal : string nonterminal
  81. | N_strength_spec_opt : Ast.node list nonterminal
  82. | N_strength_spec : Ast.node nonterminal
  83. | N_strength : Ast.node nonterminal
  84. | N_streaming_concatenation : Ast.node nonterminal
  85. | N_stream_expression_list : Ast.node list nonterminal
  86. | N_stream_expression : Ast.node nonterminal
  87. | N_stream_concatenation : Ast.node nonterminal
  88. | N_stream_conc_or_expr_or_type : Ast.node list nonterminal
  89. | N_str_as_int : string nonterminal
  90. | N_stmt_non_block : Ast.node nonterminal
  91. | N_stmt_list : Ast.node list nonterminal
  92. | N_stmt_block_only : Ast.node nonterminal
  93. | N_stmt_block_act : Ast.node nonterminal
  94. | N_stmt_block : Ast.node nonterminal
  95. | N_stmt : Ast.node nonterminal
  96. | N_statement_item_non_block : Ast.node nonterminal
  97. | N_statement_item_block_act_case : Ast.node nonterminal
  98. | N_statement_item_block_act : Ast.node nonterminal
  99. | N_statement_item_block : Ast.node nonterminal
  100. | N_state_push : unit nonterminal
  101. | N_state_pop : unit nonterminal
  102. | N_state_dependent_path_declaration : Ast.node nonterminal
  103. | N_specparam_declaration : Ast.node nonterminal
  104. | N_specparam_assignment_list : Ast.node list nonterminal
  105. | N_specparam_assignment : Ast.node nonterminal
  106. | N_specify_terminal_descriptor : Ast.node nonterminal
  107. | N_specify_item_list : Ast.node list nonterminal
  108. | N_specify_item : Ast.node nonterminal
  109. | N_specify_block : Ast.node nonterminal
  110. | N_source_text : Ast.node nonterminal
  111. | N_solve_before_primary : Ast.node nonterminal
  112. | N_solve_before_list : Ast.node list nonterminal
  113. | N_solve_before : Ast.node nonterminal
  114. | N_sinc_or_dec_expression : Ast.node nonterminal
  115. | N_simple_type : Ast.node nonterminal
  116. | N_simple_path_declaration : Ast.node nonterminal
  117. | N_simple_immediate_assertion_statement : Ast.node nonterminal
  118. | N_signing : Ast.node nonterminal
  119. | N_showcancelled_declaration : Ast.node nonterminal
  120. | N_sexpr_scope : Ast.node nonterminal
  121. | N_sexpr_ok_lvalue : Ast.node nonterminal
  122. | N_sexpr : Ast.node nonterminal
  123. | N_setuphold_rest : Ast.node list nonterminal
  124. | N_sequential_entry_list : Ast.node list nonterminal
  125. | N_sequential_entry : Ast.node nonterminal
  126. | N_sequential_body : Ast.node nonterminal
  127. | N_sequence_port_list_opt : Ast.node list nonterminal
  128. | N_sequence_match_item_list : Ast.node list nonterminal
  129. | N_sequence_match_item : Ast.node nonterminal
  130. | N_sequence_formal_type_no_data_type : Ast.node nonterminal
  131. | N_sequence_declaration_head : string nonterminal
  132. | N_sequence_declaration_body : Ast.node nonterminal
  133. | N_sequence_declaration : Ast.node nonterminal
  134. | N_seq_block_head : Labels.Statement.t nonterminal
  135. | N_seq_block_act : Ast.node nonterminal
  136. | N_seq_block0_act : Ast.node nonterminal
  137. | N_seq_block0 : Ast.node nonterminal
  138. | N_seq_block : Ast.node nonterminal
  139. | N_select_expression : Ast.node nonterminal
  140. | N_select_condition : Ast.node nonterminal
  141. | N_select_bins_or_empty : Ast.node nonterminal
  142. | N_scalar_timing_check_condition : Ast.node nonterminal
  143. | N_rs_rule_list : Ast.node list nonterminal
  144. | N_rs_rule : Ast.node nonterminal
  145. | N_rs_production_list : Ast.node nonterminal
  146. | N_rs_prod_list : Ast.node list nonterminal
  147. | N_rs_prod : Ast.node nonterminal
  148. | N_rs_code_block_item_list : Ast.node list nonterminal
  149. | N_rs_code_block_item : Ast.node nonterminal
  150. | N_rs_code_block : Ast.node nonterminal
  151. | N_rs_case_item_list : Ast.node list nonterminal
  152. | N_rs_case_item : Ast.node nonterminal
  153. | N_repeat_range : Ast.node nonterminal
  154. | N_range_list_ : Ast.node list nonterminal
  155. | N_range_list : Ast.node list nonterminal
  156. | N_randsequence_statement : Ast.node nonterminal
  157. | N_random_qualifier_opt : Ast.node list nonterminal
  158. | N_random_qualifier : Ast.node nonterminal
  159. | N_pure : Ast.node nonterminal
  160. | N_pulsestyle_declaration : Ast.node nonterminal
  161. | N_ps_type : (Ast.node list * string) nonterminal
  162. | N_ps_id_etc : (Ast.node list * string) nonterminal
  163. | N_ps_covergroup_identifier : Ast.node nonterminal
  164. | N_property_statement_spec : Ast.node nonterminal
  165. | N_property_statement_case_if : Ast.node nonterminal
  166. | N_property_statement : Ast.node nonterminal
  167. | N_property_spec : Ast.node nonterminal
  168. | N_property_port_list : Ast.node list nonterminal
  169. | N_property_port_item_head : Ast.node list nonterminal
  170. | N_property_port_item_assignment : Ast.node nonterminal
  171. | N_property_port_item : Ast.node nonterminal
  172. | N_property_formal_type_no_data_type : Ast.node nonterminal
  173. | N_property_declaration_head : string nonterminal
  174. | N_property_declaration_body : Ast.node nonterminal
  175. | N_property_declaration : Ast.node nonterminal
  176. | N_property_case_item_list : Ast.node list nonterminal
  177. | N_property_case_item : Ast.node nonterminal
  178. | N_property_actual_arg : Ast.node nonterminal
  179. | N_program_item_list_opt : Ast.node list nonterminal
  180. | N_program_item_list : Ast.node list nonterminal
  181. | N_program_item : Ast.node nonterminal
  182. | N_program_generate_item : Ast.node nonterminal
  183. | N_program_declaration_head2 : ((Ast.node list * string) * Ast.node list) nonterminal
  184. | N_program_declaration_head : (Ast.node list * string) nonterminal
  185. | N_program_declaration : Ast.node nonterminal
  186. | N_production_list : Ast.node list nonterminal
  187. | N_production_item_list : Ast.node list nonterminal
  188. | N_production_item : Ast.node nonterminal
  189. | N_production_head : (Ast.node list * string * Ast.node list) nonterminal
  190. | N_production : Ast.node nonterminal
  191. | N_procedural_assertion_statement : Ast.node nonterminal
  192. | N_pragma_value : Ast.node nonterminal
  193. | N_pragma_expression_list : Ast.node list nonterminal
  194. | N_pragma_expression : Ast.node nonterminal
  195. | N_pp_token : unit nonterminal
  196. | N_pp_fragment : unit nonterminal
  197. | N_pp_content : unit nonterminal
  198. | N_pp_branch_ : unit nonterminal
  199. | N_pp_branch : unit nonterminal
  200. | N_port_sig : string nonterminal
  201. | N_port_id_list : Ast.node list nonterminal
  202. | N_port_direction_reset_ : Labels.PortDirection.t nonterminal
  203. | N_port_direction_reset : Ast.node nonterminal
  204. | N_port_direction_ : Labels.PortDirection.t nonterminal
  205. | N_port_direction : Ast.node nonterminal
  206. | N_port_dir_net_opt : Ast.node list nonterminal
  207. | N_port_declaration_ : Ast.node list nonterminal
  208. | N_port_declaration : Ast.node nonterminal
  209. | N_port_decl_net_opt : Ast.node list nonterminal
  210. | N_port_assign_expr_opt : Ast.node list nonterminal
  211. | N_port : Ast.node nonterminal
  212. | N_polarity_operator : Ast.node nonterminal
  213. | N_pinc_or_dec_expression : Ast.node nonterminal
  214. | N_pexpr_scope : Ast.node nonterminal
  215. | N_pexpr_ok_lvalue : Ast.node nonterminal
  216. | N_pexpr : Ast.node nonterminal
  217. | N_pev_inc_or_dec_expression : Ast.node nonterminal
  218. | N_pev_expr_scope : Ast.node nonterminal
  219. | N_pev_expr_ok_lvalue : Ast.node nonterminal
  220. | N_pev_expr : Ast.node nonterminal
  221. | N_pev_argument_list_opt : Ast.node list nonterminal
  222. | N_pev_args_expr_opt : Ast.node list nonterminal
  223. | N_pev_args_expr_list_opt : Ast.node list nonterminal
  224. | N_pev_args_dotted_list : Ast.node list nonterminal
  225. | N_pev_args_dotted : Ast.node nonterminal
  226. | N_pattern_no_expr : Ast.node nonterminal
  227. | N_pattern_member_list : Ast.node list nonterminal
  228. | N_pattern_list : Ast.node list nonterminal
  229. | N_pattern_key : Ast.node nonterminal
  230. | N_pattern : Ast.node nonterminal
  231. | N_path_list : Ast.node list nonterminal
  232. | N_path_delay_value : Ast.node nonterminal
  233. | N_path_delay_expression_list : Ast.node list nonterminal
  234. | N_path_declaration : Ast.node nonterminal
  235. | N_partial_pev_expr : Ast.partial nonterminal
  236. | N_partial_module_item_list : Ast.partial nonterminal
  237. | N_partial_list_of_ports : Ast.partial nonterminal
  238. | N_partial_gen_item_list : Ast.partial nonterminal
  239. | N_partial_expr : Ast.partial nonterminal
  240. | N_partial_ev_expr : Ast.partial nonterminal
  241. | N_partial_description_list : Ast.partial nonterminal
  242. | N_partial_cellpin_list : Ast.partial nonterminal
  243. | N_partial_case_item_list : Ast.partial nonterminal
  244. | N_partial_case_inside_item_list : Ast.partial nonterminal
  245. | N_partial_block_decl_stmt_list : Ast.partial nonterminal
  246. | N_parameter_value_assignment_opt_cellpin_list_head : unit nonterminal
  247. | N_parameter_port_declaration_head : Ast.node list nonterminal
  248. | N_parameter_override : Ast.node nonterminal
  249. | N_parameter_declaration_head : Ast.node list nonterminal
  250. | N_parameter_declaration : Ast.node nonterminal
  251. | N_param_port_decl_or_arg_list : Ast.node list nonterminal
  252. | N_param_port_decl_or_arg : Ast.node nonterminal
  253. | N_param_assignments : Ast.node nonterminal
  254. | N_param_assignment_list : Ast.node list nonterminal
  255. | N_param_assignment : Ast.node nonterminal
  256. | N_parallel_path_description : Ast.node nonterminal
  257. | N_parallel_edge_sensitive_path_description : Ast.node nonterminal
  258. | N_par_block_head : string nonterminal
  259. | N_par_block_act : Ast.node nonterminal
  260. | N_par_block0_act : Ast.node nonterminal
  261. | N_par_block0 : Ast.node nonterminal
  262. | N_par_block : Ast.node nonterminal
  263. | N_packed_signing_opt : (Ast.node list * Ast.node list) nonterminal
  264. | N_packed_dimension_list : Ast.node list nonterminal
  265. | N_packed_dimension : Ast.node nonterminal
  266. | N_package_scope_id_follows_opt : Ast.node list nonterminal
  267. | N_package_scope_id_follows : Ast.node nonterminal
  268. | N_package_or_generate_item_declaration : Ast.node nonterminal
  269. | N_package_item_list_opt : Ast.node list nonterminal
  270. | N_package_item_list : Ast.node list nonterminal
  271. | N_package_item : Ast.node nonterminal
  272. | N_package_import_item_obj : Ast.node nonterminal
  273. | N_package_import_item_list : Ast.node list nonterminal
  274. | N_package_import_item : Ast.node nonterminal
  275. | N_package_import_declaration_list_ : Ast.node list nonterminal
  276. | N_package_import_declaration_list : Ast.node list nonterminal
  277. | N_package_import_declaration_head : Ast.node nonterminal
  278. | N_package_import_declaration : Ast.node nonterminal
  279. | N_package_export_declaration : Ast.node nonterminal
  280. | N_package_declaration_head : (Ast.node list * string) nonterminal
  281. | N_package_declaration : Ast.node nonterminal
  282. | N_overload_proto_formal_list : Ast.node list nonterminal
  283. | N_overload_operator : Labels.OverloadOperator.t nonterminal
  284. | N_overload_declaration : Ast.node nonterminal
  285. | N_output_symbol : Ast.node nonterminal
  286. | N_operator_assignment : Ast.node nonterminal
  287. | N_open_value_range : Ast.node nonterminal
  288. | N_open_range_list : Ast.node list nonterminal
  289. | N_notifier_opt : Ast.node list nonterminal
  290. | N_non_port_program_item : Ast.node nonterminal
  291. | N_non_port_module_item : Ast.node nonterminal
  292. | N_non_integer_type : Labels.DataType.t nonterminal
  293. | N_next_state : Ast.node nonterminal
  294. | N_net_type_ : Labels.NetType.t nonterminal
  295. | N_net_type : Ast.node nonterminal
  296. | N_net_sig_list : Ast.node list nonterminal
  297. | N_net_sig : Ast.node nonterminal
  298. | N_net_scalared_opt : Ast.node list nonterminal
  299. | N_net_id : string nonterminal
  300. | N_net_declaration_head : (Lexing.position * Ast.node * Ast.node list * Ast.node list * Ast.node list) nonterminal
  301. | N_net_declaration : Ast.node nonterminal
  302. | N_net_decl_reset : unit nonterminal
  303. | N_net_decl_assignments : Ast.node nonterminal
  304. | N_net_data_type : Ast.node list nonterminal
  305. | N_nb_assign_postfix_opt : Ast.node list nonterminal
  306. | N_module_or_generate_item_declaration : Ast.node nonterminal
  307. | N_module_or_generate_item : Ast.node nonterminal
  308. | N_module_item_tail : unit nonterminal
  309. | N_module_item_list_opt : Ast.node list nonterminal
  310. | N_module_item_list : Ast.node list nonterminal
  311. | N_module_item : Ast.node nonterminal
  312. | N_module_declaration_head2 : (Labels.ModuleSpec.t * Ast.node list * string * Ast.node list * Ast.node list) nonterminal
  313. | N_module_declaration_head1 : ((Labels.ModuleSpec.t * Ast.node list * string) * Ast.node list) nonterminal
  314. | N_module_declaration_head : (Labels.ModuleSpec.t * Ast.node list * string) nonterminal
  315. | N_module_declaration_ : Ast.node nonterminal
  316. | N_module_declaration : Ast.node nonterminal
  317. | N_module_common_item : Ast.node nonterminal
  318. | N_modport_tf_port : Ast.node nonterminal
  319. | N_modport_simple_port : Ast.node nonterminal
  320. | N_modport_ports_decl_list : Ast.node list nonterminal
  321. | N_modport_ports_decl : Ast.node nonterminal
  322. | N_modport_item_list : Ast.node list nonterminal
  323. | N_modport_item : Ast.node nonterminal
  324. | N_modport_id_head : string nonterminal
  325. | N_modport_declaration : Ast.node nonterminal
  326. | N_mintypmax_without_paren : Ast.node nonterminal
  327. | N_min_type_max_opt : Ast.node list nonterminal
  328. | N_min_type_max : Ast.node nonterminal
  329. | N_method_prototype : Ast.node nonterminal
  330. | N_member_qual_reset_list_opt : Ast.node list nonterminal
  331. | N_member_qual_list : Ast.node list nonterminal
  332. | N_member_qual : Ast.node nonterminal
  333. | N_main : Ast.node nonterminal
  334. | N_loop_variable_list : Ast.node list nonterminal
  335. | N_loop_generate_construct : Ast.node nonterminal
  336. | N_local_parameter_declaration_head : Ast.node list nonterminal
  337. | N_local_parameter_declaration : Ast.node nonterminal
  338. | N_list_of_ports_opt : Ast.node list nonterminal
  339. | N_lifetime : Ast.node nonterminal
  340. | N_library_text : Ast.node nonterminal
  341. | N_library_map : Ast.node nonterminal
  342. | N_library_identifier_list : Ast.node list nonterminal
  343. | N_library_description_list : Ast.node list nonterminal
  344. | N_library_description : Ast.node nonterminal
  345. | N_library_declaration : Ast.node nonterminal
  346. | N_liblist_clause : Ast.node nonterminal
  347. | N_level_symbol : Ast.node nonterminal
  348. | N_level_input_list : Ast.node list nonterminal
  349. | N_let_port_list_opt : Ast.node list nonterminal
  350. | N_let_declaration_head : string nonterminal
  351. | N_let_declaration : Ast.node nonterminal
  352. | N_join_kw : unit nonterminal
  353. | N_interface_port_head : Ast.node nonterminal
  354. | N_interface_or_generate_item : Ast.node nonterminal
  355. | N_interface_item_list_opt : Ast.node list nonterminal
  356. | N_interface_item_list : Ast.node list nonterminal
  357. | N_interface_item : Ast.node nonterminal
  358. | N_interface_declaration_head2 : ((Ast.node list * string) * Ast.node list) nonterminal
  359. | N_interface_declaration_head : (Ast.node list * string) nonterminal
  360. | N_interface_declaration : Ast.node nonterminal
  361. | N_integral_number : string nonterminal
  362. | N_integer_vector_type : Labels.DataType.t nonterminal
  363. | N_integer_atom_type : Labels.DataType.t nonterminal
  364. | N_instname_paren : Ast.node nonterminal
  365. | N_instname_list : Ast.node list nonterminal
  366. | N_instname0 : (Label.t * Ast.node list) nonterminal
  367. | N_instname : (Label.t * Ast.node list) nonterminal
  368. | N_instance_name : Ast.node nonterminal
  369. | N_inst_name : Label.t nonterminal
  370. | N_inst_clause : Ast.node nonterminal
  371. | N_inside_kw : unit nonterminal
  372. | N_input_or_output_identifier : Ast.node nonterminal
  373. | N_initial_construct : Ast.node nonterminal
  374. | N_include_statement : Ast.node nonterminal
  375. | N_inc_or_dec_expression_non_mintypmax : Ast.node nonterminal
  376. | N_inc_or_dec_expression : Ast.node nonterminal
  377. | N_immediate_assertion_statement : Ast.node nonterminal
  378. | N_id_svkw_arrayed : Ast.node nonterminal
  379. | N_id_foreach_ : (string * Ast.node list) nonterminal
  380. | N_id_foreach : Ast.node nonterminal
  381. | N_id_dotted_rest : Ast.node list nonterminal
  382. | N_id_dotted_foreach_rest : Ast.node list nonterminal
  383. | N_id_dotted_foreach : Ast.node list nonterminal
  384. | N_id_dotted : Ast.node list nonterminal
  385. | N_id_class_sel : Ast.node nonterminal
  386. | N_id_class_foreach : Ast.node nonterminal
  387. | N_id_arrayed_ : (string * Ast.node list) nonterminal
  388. | N_id_arrayed : Ast.node nonterminal
  389. | N_id_any : string nonterminal
  390. | N_id_SV_keyword : string nonterminal
  391. | N_id : string nonterminal
  392. | N_hierarchical_identifier_list : Ast.node list nonterminal
  393. | N_hierarchical_identifier_bit : Ast.node nonterminal
  394. | N_hierarchical_identifier : Ast.node nonterminal
  395. | N_hierarchical_btf_identifier : Ast.node nonterminal
  396. | N_global : Ast.node nonterminal
  397. | N_genvar_iteration : Ast.node nonterminal
  398. | N_genvar_initialization : Ast.node nonterminal
  399. | N_genvar_identifier_list : Ast.node list nonterminal
  400. | N_genvar_identifier_decl : Ast.node nonterminal
  401. | N_genvar_declaration : Ast.node nonterminal
  402. | N_generate_region : Ast.node nonterminal
  403. | N_generate_item : Ast.node nonterminal
  404. | N_generate_block : Ast.node nonterminal
  405. | N_generate0 : unit nonterminal
  406. | N_gen_top_block : Ast.node list nonterminal
  407. | N_gen_item_list : Ast.node list nonterminal
  408. | N_gen_item_begin : Ast.node nonterminal
  409. | N_gate_keyword : Labels.Gate.t nonterminal
  410. | N_function_subroutine_call_no_method : Ast.node nonterminal
  411. | N_function_prototype : Ast.node nonterminal
  412. | N_function_kw : unit nonterminal
  413. | N_function_head_new : (Ast.node list * Ast.node) nonterminal
  414. | N_function_head : (Ast.node list * Ast.node * string) nonterminal
  415. | N_function_declaration : Ast.node nonterminal
  416. | N_function_data_type : Ast.node nonterminal
  417. | N_func_ref : Ast.node nonterminal
  418. | N_func_id_new : Ast.node nonterminal
  419. | N_func_id : Ast.node nonterminal
  420. | N_full_path_description : Ast.node nonterminal
  421. | N_full_edge_sensitive_path_description : Ast.node nonterminal
  422. | N_fork_kw : unit nonterminal
  423. | N_fork0 : unit nonterminal
  424. | N_for_step_opt : Ast.node list nonterminal
  425. | N_for_step_assignment : Ast.node nonterminal
  426. | N_for_step : Ast.node list nonterminal
  427. | N_for_initialization_item_list : Ast.node list nonterminal
  428. | N_for_initialization_item : Ast.node nonterminal
  429. | N_for_initialization : Ast.node nonterminal
  430. | N_foperator_assignment : Ast.node nonterminal
  431. | N_finc_or_dec_expression : Ast.node nonterminal
  432. | N_final_construct : Ast.node nonterminal
  433. | N_file_path_spec_list : Ast.node list nonterminal
  434. | N_file_path_spec : Ast.node nonterminal
  435. | N_file_path : string nonterminal
  436. | N_fexpr_scope : Ast.node nonterminal
  437. | N_fexpr_ok_lvalue : Ast.node nonterminal
  438. | N_fexpr_lvalue : Ast.node nonterminal
  439. | N_fexpr : Ast.node nonterminal
  440. | N_extern_tf_declaration : Ast.node nonterminal
  441. | N_extern_constraint_declaration : Ast.node nonterminal
  442. | N_extern : Ast.node nonterminal
  443. | N_expr_scope : Ast.node nonterminal
  444. | N_expr_or_data_type_list : Ast.node list nonterminal
  445. | N_expr_or_data_type : Ast.node nonterminal
  446. | N_expr_ok_lvalue : Ast.node nonterminal
  447. | N_expr_non_mintypmax_scope : Ast.node nonterminal
  448. | N_expr_non_mintypmax_ok_lvalue : Ast.node nonterminal
  449. | N_expr_non_mintypmax : Ast.node nonterminal
  450. | N_expr_lvalue : Ast.node nonterminal
  451. | N_expr : Ast.node nonterminal
  452. | N_expect_property_statement : Ast.node nonterminal
  453. | N_event_control : Ast.node nonterminal
  454. | N_event_base_flag_opt : Ast.node list nonterminal
  455. | N_ev_inc_or_dec_expression : Ast.node nonterminal
  456. | N_ev_expr_scope : Ast.node nonterminal
  457. | N_ev_expr_ok_lvalue : Ast.node nonterminal
  458. | N_ev_expr_list : Ast.node list nonterminal
  459. | N_ev_expr : Ast.node nonterminal
  460. | N_etc_inst0 : Ast.node nonterminal
  461. | N_etc_inst : Ast.node nonterminal
  462. | N_enum_name_range_opt : Ast.node list nonterminal
  463. | N_enum_name_list : Ast.node list nonterminal
  464. | N_enum_name_declaration : Ast.node nonterminal
  465. | N_enum_declaration : Ast.node nonterminal
  466. | N_enum_base_type_opt : Ast.node list nonterminal
  467. | N_end_kw : unit nonterminal
  468. | N_elaboration_system_task : Ast.node nonterminal
  469. | N_edge_symbol : Ast.node nonterminal
  470. | N_edge_sensitive_path_declaration : Ast.node nonterminal
  471. | N_edge_input_list : Ast.node list nonterminal
  472. | N_edge_indicator : Ast.node nonterminal
  473. | N_edge_identifier : Ast.node nonterminal
  474. | N_edge_descriptor_list : Ast.node list nonterminal
  475. | N_edge_descriptor : Ast.node nonterminal
  476. | N_edge_control_specifier : Ast.node nonterminal
  477. | N_dynamic_array_new : Ast.node nonterminal
  478. | N_dpi_tf_import_property_opt : Ast.node list nonterminal
  479. | N_dpi_import_label_opt : Ast.node list nonterminal
  480. | N_dpi_import_export : Ast.node nonterminal
  481. | N_dist_list : Ast.node list nonterminal
  482. | N_dist_item : Ast.node nonterminal
  483. | N_design_statement : Ast.node nonterminal
  484. | N_description_list : Ast.node list nonterminal
  485. | N_description : Ast.node nonterminal
  486. | N_delayed : Ast.node nonterminal
  487. | N_delay_value : Ast.node nonterminal
  488. | N_delay_or_event_control_opt : Ast.node list nonterminal
  489. | N_delay_expr : Ast.node nonterminal
  490. | N_delay_control : Ast.node nonterminal
  491. | N_defparam_assignment_list : Ast.node list nonterminal
  492. | N_defparam_assignment : Ast.node nonterminal
  493. | N_deffered_immediate_assertion_item : Ast.node nonterminal
  494. | N_deferred_immediate_assertion_statement : Ast.node nonterminal
  495. | N_default_skew : Ast.node nonterminal
  496. | N_default : Ast.node nonterminal
  497. | N_data_type_var : Ast.node nonterminal
  498. | N_data_type_or_void : Ast.node nonterminal
  499. | N_data_type : Ast.node nonterminal
  500. | N_data_declaration_var_head_class : Ast.node list nonterminal
  501. | N_data_declaration_var_head : Ast.node list nonterminal
  502. | N_data_declaration_var_class : Ast.node nonterminal
  503. | N_data_declaration_var : Ast.node nonterminal
  504. | N_data_declaration : Ast.node nonterminal
  505. | N_cycle_delay_range : Ast.node nonterminal
  506. | N_cycle_delay_const_range_expression : Ast.node nonterminal
  507. | N_cycle_delay : Ast.node nonterminal
  508. | N_current_state : Ast.node nonterminal
  509. | N_cross_item_list : Ast.node list nonterminal
  510. | N_cross_item : Ast.node nonterminal
  511. | N_coverpoints_list : Ast.node list nonterminal
  512. | N_covergroup_declaration_head : string nonterminal
  513. | N_covergroup_declaration : Ast.node nonterminal
  514. | N_coverage_spec_or_option_list_opt : Ast.node list nonterminal
  515. | N_coverage_spec_or_option_list : Ast.node list nonterminal
  516. | N_coverage_spec_or_option : Ast.node nonterminal
  517. | N_coverage_option : Ast.node nonterminal
  518. | N_coverage_event_opt : Ast.node list nonterminal
  519. | N_cover_point : Ast.node nonterminal
  520. | N_cover_cross : Ast.node nonterminal
  521. | N_continuous_assign : Ast.node nonterminal
  522. | N_constraint_static_opt : Ast.node list nonterminal
  523. | N_constraint_set : Ast.node nonterminal
  524. | N_constraint_expression_list : Ast.node list nonterminal
  525. | N_constraint_expression : Ast.node nonterminal
  526. | N_constraint_block_item_list : Ast.node list nonterminal
  527. | N_constraint_block_item : Ast.node nonterminal
  528. | N_constraint_block : Ast.node nonterminal
  529. | N_constant_range : Ast.node nonterminal
  530. | N_const_or_range_expression : Ast.node nonterminal
  531. | N_const_opt : Ast.node list nonterminal
  532. | N_const_expr : Ast.node nonterminal
  533. | N_const : Ast.node nonterminal
  534. | N_config_rule_statement_list_opt : Ast.node list nonterminal
  535. | N_config_rule_statement_list : Ast.node list nonterminal
  536. | N_config_rule_statement : Ast.node nonterminal
  537. | N_config_declaration : Ast.node nonterminal
  538. | N_conditional_generate_construct : Ast.node nonterminal
  539. | N_concurrent_assertion_statement : Ast.node nonterminal
  540. | N_concurrent_assertion_item : Ast.node nonterminal
  541. | N_compiler_directive_full : Ast.node nonterminal
  542. | N_compiler_directive : Ast.node nonterminal
  543. | N_comma_notifier_opt : Ast.node list nonterminal
  544. | N_combinational_entry_list : Ast.node list nonterminal
  545. | N_combinational_entry : Ast.node nonterminal
  546. | N_combinational_body : Ast.node nonterminal
  547. | N_colon_config : Ast.node nonterminal
  548. | N_clocking_skew : Ast.node nonterminal
  549. | N_clocking_item_list_opt : Ast.node list nonterminal
  550. | N_clocking_item_list : Ast.node list nonterminal
  551. | N_clocking_item : Ast.node nonterminal
  552. | N_clocking_head : (Ast.node list * string) nonterminal
  553. | N_clocking_event : Ast.node nonterminal
  554. | N_clocking_direction : Ast.node nonterminal
  555. | N_clocking_declaration : Ast.node nonterminal
  556. | N_clocking_decl_assign_list : Ast.node list nonterminal
  557. | N_clocking_decl_assign : Ast.node nonterminal
  558. | N_class_virtual_opt : Ast.node list nonterminal
  559. | N_class_type_without_id : Ast.node list nonterminal
  560. | N_class_type_list_colon_id_follows : Ast.node list nonterminal
  561. | N_class_type_list : Ast.node list nonterminal
  562. | N_class_type : Ast.node nonterminal
  563. | N_class_scope_without_id : Ast.node list nonterminal
  564. | N_class_scope_type : (Ast.node list * string) nonterminal
  565. | N_class_scope_id_follows : Ast.node list nonterminal
  566. | N_class_scope_id : Ast.node nonterminal
  567. | N_class_property : Ast.node nonterminal
  568. | N_class_new : Ast.node nonterminal
  569. | N_class_method : Ast.node nonterminal
  570. | N_class_item_qualifier : Ast.node nonterminal
  571. | N_class_item_list_opt : Ast.node list nonterminal
  572. | N_class_item_list : Ast.node list nonterminal
  573. | N_class_item : Ast.node nonterminal
  574. | N_class_extends_opt : Ast.node list nonterminal
  575. | N_class_declaration_head : (Ast.node list * Ast.node list * string) nonterminal
  576. | N_class_declaration : Ast.node nonterminal
  577. | N_class_constructor_prototype : Ast.node nonterminal
  578. | N_class_constraint : Ast.node nonterminal
  579. | N_checker_port_list_opt : Ast.node list nonterminal
  580. | N_checker_or_generate_item_list_opt : Ast.node list nonterminal
  581. | N_checker_or_generate_item_list : Ast.node list nonterminal
  582. | N_checker_or_generate_item_declaration : Ast.node nonterminal
  583. | N_checker_or_generate_item : Ast.node nonterminal
  584. | N_checker_instantiation_head : (string * Ast.node) nonterminal
  585. | N_checker_instantiation_ : Ast.node nonterminal
  586. | N_checker_instantiation : Ast.node nonterminal
  587. | N_checker_head : string nonterminal
  588. | N_checker_generate_item : Ast.node nonterminal
  589. | N_checker_declaration : Ast.node nonterminal
  590. | N_cellpin_list : Ast.node list nonterminal
  591. | N_cellpin_item_list : Ast.node list nonterminal
  592. | N_cellpin_item : Ast.node nonterminal
  593. | N_cell_name_list : Ast.node list nonterminal
  594. | N_cell_name : Ast.node nonterminal
  595. | N_cell_clause : Ast.node nonterminal
  596. | N_cate_list : Ast.node list nonterminal
  597. | N_casting_type : Ast.node nonterminal
  598. | N_case_start0 : Ast.node nonterminal
  599. | N_case_start : Ast.node nonterminal
  600. | N_case_pattern_list_opt : Ast.node list nonterminal
  601. | N_case_pattern_head0 : (Ast.node * Lexing.position) nonterminal
  602. | N_case_pattern_head : (Ast.node * Lexing.position) nonterminal
  603. | N_case_item_list : Ast.node list nonterminal
  604. | N_case_item : Ast.node nonterminal
  605. | N_case_inside_list_opt : Ast.node list nonterminal
  606. | N_case_inside_item_list : Ast.node list nonterminal
  607. | N_case_inside_item : Ast.node nonterminal
  608. | N_case_inside_head0 : (Ast.node * Lexing.position) nonterminal
  609. | N_case_inside_head : (Ast.node * Lexing.position) nonterminal
  610. | N_case_generate_item_list : Ast.node list nonterminal
  611. | N_case_generate_item : Ast.node nonterminal
  612. | N_case_cond_list_ : Ast.node list nonterminal
  613. | N_case_cond_list : Ast.node list nonterminal
  614. | N_case_attr_opt : Ast.node list nonterminal
  615. | N_c_loop_generate_construct : Ast.node nonterminal
  616. | N_c_generate_region : Ast.node nonterminal
  617. | N_c_generate_item : Ast.node nonterminal
  618. | N_c_generate_block : Ast.node nonterminal
  619. | N_c_gen_top_block : Ast.node list nonterminal
  620. | N_c_gen_item_list : Ast.node list nonterminal
  621. | N_c_gen_item_begin : Ast.node nonterminal
  622. | N_c_conditional_generate_construct : Ast.node nonterminal
  623. | N_c_case_generate_item_list : Ast.node list nonterminal
  624. | N_c_case_generate_item : Ast.node nonterminal
  625. | N_boolean_abbrev : Ast.node nonterminal
  626. | N_block_item_declaration_list : Ast.node list nonterminal
  627. | N_block_item_declaration : Ast.node nonterminal
  628. | N_block_event_expression_term : Ast.node nonterminal
  629. | N_block_event_expression : Ast.node nonterminal
  630. | N_block_decl_stmt_list : Ast.node list nonterminal
  631. | N_bit_select_opt : Ast.node list nonterminal
  632. | N_bins_selection_or_option_semi_list : Ast.node list nonterminal
  633. | N_bins_selection_or_option : Ast.node nonterminal
  634. | N_bins_selection : Ast.node nonterminal
  635. | N_bins_or_options_list : Ast.node list nonterminal
  636. | N_bins_or_options : Ast.node nonterminal
  637. | N_bins_or_empty : Ast.node nonterminal
  638. | N_bins_keyword : Labels.BinsSpec.t nonterminal
  639. | N_bins_expression : Ast.node nonterminal
  640. | N_bind_target_instance_list : Ast.node list nonterminal
  641. | N_bind_target_instance : Ast.node nonterminal
  642. | N_bind_instantiation : Ast.node nonterminal
  643. | N_bind_directive : Ast.node nonterminal
  644. | N_begin_kw : unit nonterminal
  645. | N_begin0 : unit nonterminal
  646. | N_attribute_instances : Ast.node nonterminal
  647. | N_attribute_instance_list_opt : Ast.node list nonterminal
  648. | N_attribute_instance_list : Ast.node list nonterminal
  649. | N_attribute_instance : Ast.node nonterminal
  650. | N_attr_spec_list : Ast.node list nonterminal
  651. | N_attr_spec : Ast.node nonterminal
  652. | N_assignment_pattern : Ast.node nonterminal
  653. | N_assign_list : Ast.node list nonterminal
  654. | N_assign : Ast.node nonterminal
  655. | N_assertion_variable_declaration_list : Ast.node list nonterminal
  656. | N_assertion_variable_declaration : Ast.node nonterminal
  657. | N_assertion_item_declaration : Ast.node nonterminal
  658. | N_assertion_item : Ast.node nonterminal
  659. | N_array_method_no_root : Ast.node nonterminal
  660. | N_array_method_name_no_id : Labels.Expression.t nonterminal
  661. | N_argument_list_opt : Ast.node list nonterminal
  662. | N_args_expr_opt : Ast.node list nonterminal
  663. | N_args_expr_list_opt : Ast.node list nonterminal
  664. | N_args_expr_list : Ast.node list nonterminal
  665. | N_args_dotted_list : Ast.node list nonterminal
  666. | N_args_dotted : Ast.node nonterminal
  667. | N_any_range : Ast.node nonterminal
  668. | N_anonymous_program_item_list_opt : Ast.node list nonterminal
  669. | N_anonymous_program_item_list : Ast.node list nonterminal
  670. | N_anonymous_program_item : Ast.node nonterminal
  671. | N_anonymous_program : Ast.node nonterminal
  672. | N_always_construct : Ast.node nonterminal
  673. | N_alias_eq_list : Ast.node list nonterminal
  674. | N_action_block : Ast.node nonterminal
  675. | N__pev_expr : Ast.node nonterminal
  676. | N__id_SV_keyword : string nonterminal
  677. | N__expr : Ast.node nonterminal
  678. | N__ev_expr : Ast.node 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
Sourcetype 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol

The type 'a symbol represents a terminal or nonterminal symbol. It is the disjoint union of the types 'a terminal and 'a nonterminal.

Sourcetype xsymbol =
  1. | X : 'a symbol -> xsymbol

The type xsymbol is an existentially quantified version of the type 'a symbol. This type is useful in situations where 'a is not statically known.

Sourcetype item = production * int

An LR(0) item is a pair of a production prod and a valid index i into this production. That is, if the length of rhs prod is n, then i is comprised between 0 and n, inclusive.

The following are total ordering functions.

Sourceval compare_terminals : _ terminal -> _ terminal -> int
Sourceval compare_nonterminals : _ nonterminal -> _ nonterminal -> int
Sourceval compare_symbols : xsymbol -> xsymbol -> int
Sourceval compare_productions : production -> production -> int
Sourceval compare_items : item -> item -> int
Sourceval incoming_symbol : 'a lr1state -> 'a symbol

incoming_symbol s is the incoming symbol of the state s, that is, the symbol that the parser must recognize before (has recognized when) it enters the state s. This function gives access to the semantic value v stored in a stack element Element (s, v, _, _). Indeed, by case analysis on the symbol incoming_symbol s, one discovers the type 'a of the value v.

Sourceval items : _ lr1state -> item list

items s is the set of the LR(0) items in the LR(0) core of the LR(1) state s. This set is not epsilon-closed. This set is presented as a list, in an arbitrary order.

lhs prod is the left-hand side of the production prod. This is always a non-terminal symbol.

Sourceval rhs : production -> xsymbol list

rhs prod is the right-hand side of the production prod. This is a (possibly empty) sequence of (terminal or nonterminal) symbols.

Sourceval nullable : _ nonterminal -> bool

nullable nt tells whether the non-terminal symbol nt is nullable. That is, it is true if and only if this symbol produces the empty word epsilon.

Sourceval first : _ nonterminal -> _ terminal -> bool

first nt t tells whether the FIRST set of the nonterminal symbol nt contains the terminal symbol t. That is, it is true if and only if nt produces a word that begins with t.

Sourceval xfirst : xsymbol -> _ terminal -> bool

xfirst is analogous to first, but expects a first argument of type xsymbol instead of _ terminal.

Sourceval foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a

foreach_terminal enumerates the terminal symbols, including error.

Sourceval foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a

foreach_terminal_but_error enumerates the terminal symbols, excluding error.

feed symbol startp semv endp env causes the parser to consume the (terminal or nonterminal) symbol symbol, accompanied with the semantic value semv and with the start and end positions startp and endp. Thus, the automaton makes a transition, and reaches a new state. The stack grows by one cell. This operation is permitted only if the current state (as determined by env) has an outgoing transition labeled with symbol. Otherwise, Invalid_argument _ is raised.