package morbig

  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 : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.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_While : unit terminal
  3. | T_WORD : CST.word terminal
  4. | T_Uppersand : unit terminal
  5. | T_Until : unit terminal
  6. | T_Then : unit terminal
  7. | T_Semicolon : unit terminal
  8. | T_Rparen : unit terminal
  9. | T_Rbrace : unit terminal
  10. | T_Pipe : unit terminal
  11. | T_OR_IF : unit terminal
  12. | T_NEWLINE : unit terminal
  13. | T_NAME : CST.name terminal
  14. | T_Lparen : unit terminal
  15. | T_Lbrace : unit terminal
  16. | T_LESSGREAT : unit terminal
  17. | T_LESSAND : unit terminal
  18. | T_LESS : unit terminal
  19. | T_In : unit terminal
  20. | T_If : unit terminal
  21. | T_IO_NUMBER : CST.io_number terminal
  22. | T_INTENDED_ERROR : unit terminal
  23. | T_GREATAND : unit terminal
  24. | T_GREAT : unit terminal
  25. | T_For : unit terminal
  26. | T_Fi : unit terminal
  27. | T_Esac : unit terminal
  28. | T_Else : unit terminal
  29. | T_Elif : unit terminal
  30. | T_EOF : unit terminal
  31. | T_Done : unit terminal
  32. | T_Do : unit terminal
  33. | T_DSEMI : unit terminal
  34. | T_DLESSDASH : CST.word' Stdlib.ref terminal
  35. | T_DLESS : CST.word' Stdlib.ref terminal
  36. | T_DGREAT : unit terminal
  37. | T_Case : unit terminal
  38. | T_CLOBBER : unit terminal
  39. | T_Bang : unit terminal
  40. | T_ASSIGNMENT_WORD : CST.assignment_word terminal
  41. | T_AND_IF : unit terminal
type _ nonterminal =
  1. | N_wordlist : CST.wordlist nonterminal
  2. | N_word : CST.word nonterminal
  3. | N_while_clause : CST.while_clause nonterminal
  4. | N_until_clause : CST.until_clause nonterminal
  5. | N_term : CST.term nonterminal
  6. | N_subshell : CST.subshell nonterminal
  7. | N_simple_command : CST.simple_command nonterminal
  8. | N_sequential_sep : CST.sequential_sep nonterminal
  9. | N_separator_op : CST.separator_op nonterminal
  10. | N_separator : CST.separator nonterminal
  11. | N_redirect_list : CST.redirect_list nonterminal
  12. | N_program : CST.program nonterminal
  13. | N_pipeline : CST.pipeline nonterminal
  14. | N_pipe_sequence : CST.pipe_sequence nonterminal
  15. | N_pattern : CST.pattern nonterminal
  16. | N_newline_list : CST.newline_list nonterminal
  17. | N_name : CST.name nonterminal
  18. | N_linebreak : CST.linebreak nonterminal
  19. | N_io_redirect : CST.io_redirect nonterminal
  20. | N_io_here : CST.io_here nonterminal
  21. | N_io_file : CST.io_file nonterminal
  22. | N_intended_error : unit nonterminal
  23. | N_if_clause : CST.if_clause nonterminal
  24. | N_here_end : CST.here_end nonterminal
  25. | N_function_definition : CST.function_definition nonterminal
  26. | N_function_body : CST.function_body nonterminal
  27. | N_for_clause : CST.for_clause nonterminal
  28. | N_fname : CST.fname nonterminal
  29. | N_filename : CST.filename nonterminal
  30. | N_entry_point : CST.program CST.located nonterminal
  31. | N_else_part : CST.else_part nonterminal
  32. | N_do_group : CST.do_group nonterminal
  33. | N_compound_list : CST.compound_list nonterminal
  34. | N_compound_command : CST.compound_command nonterminal
  35. | N_complete_commands : CST.complete_commands nonterminal
  36. | N_complete_command : CST.complete_command nonterminal
  37. | N_command : CST.command nonterminal
  38. | N_cmd_word : CST.cmd_word nonterminal
  39. | N_cmd_suffix : CST.cmd_suffix nonterminal
  40. | N_cmd_prefix : CST.cmd_prefix nonterminal
  41. | N_cmd_name : CST.cmd_name nonterminal
  42. | N_clist : CST.clist nonterminal
  43. | N_cin : unit nonterminal
  44. | N_case_list_ns : CST.case_list_ns nonterminal
  45. | N_case_list : CST.case_list nonterminal
  46. | N_case_item_ns : CST.case_item_ns nonterminal
  47. | N_case_item : CST.case_item nonterminal
  48. | N_case_clause : CST.case_clause nonterminal
  49. | N_brace_group : CST.brace_group nonterminal
  50. | N_and_or : CST.and_or 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.