morbig

A trustworthy parser for POSIX shell
include MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE with type token = token
type token = token
type production
type 'a env
type 'a checkpoint = private
| InputNeeded of 'a env
| Shifting of 'a env * 'a env * bool
| AboutToReduce of 'a env * production
| HandlingError of 'a env
| Accepted of 'a
| Rejected
type strategy = [
| `Legacy
| `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 =
| T_error : unit terminal
| T_While : unit terminal
| T_WORD : CST.word terminal
| T_Uppersand : unit terminal
| T_Until : unit terminal
| T_Then : unit terminal
| T_Semicolon : unit terminal
| T_Rparen : unit terminal
| T_Rbrace : unit terminal
| T_Pipe : unit terminal
| T_OR_IF : unit terminal
| T_NEWLINE : unit terminal
| T_NAME : CST.name terminal
| T_Lparen : unit terminal
| T_Lbrace : unit terminal
| T_LESSGREAT : unit terminal
| T_LESSAND : unit terminal
| T_LESS : unit terminal
| T_In : unit terminal
| T_If : unit terminal
| T_IO_NUMBER : CST.io_number terminal
| T_INTENDED_ERROR : unit terminal
| T_GREATAND : unit terminal
| T_GREAT : unit terminal
| T_For : unit terminal
| T_Fi : unit terminal
| T_Esac : unit terminal
| T_Else : unit terminal
| T_Elif : unit terminal
| T_EOF : unit terminal
| T_Done : unit terminal
| T_Do : unit terminal
| T_DSEMI : unit terminal
| T_DLESSDASH : CST.word' ref terminal
| T_DLESS : CST.word' ref terminal
| T_DGREAT : unit terminal
| T_Case : unit terminal
| T_CLOBBER : unit terminal
| T_Bang : unit terminal
| T_ASSIGNMENT_WORD : CST.assignment_word terminal
| T_AND_IF : unit terminal
type _ nonterminal =
| N_wordlist : CST.wordlist nonterminal
| N_word : CST.word nonterminal
| N_while_clause : CST.while_clause nonterminal
| N_until_clause : CST.until_clause nonterminal
| N_term : CST.term nonterminal
| N_subshell : CST.subshell nonterminal
| N_simple_command : CST.simple_command nonterminal
| N_sequential_sep : CST.sequential_sep nonterminal
| N_separator_op : CST.separator_op nonterminal
| N_separator : CST.separator nonterminal
| N_redirect_list : CST.redirect_list nonterminal
| N_program : CST.program nonterminal
| N_pipeline : CST.pipeline nonterminal
| N_pipe_sequence : CST.pipe_sequence nonterminal
| N_pattern : CST.pattern nonterminal
| N_newline_list : CST.newline_list nonterminal
| N_name : CST.name nonterminal
| N_linebreak : CST.linebreak nonterminal
| N_io_redirect : CST.io_redirect nonterminal
| N_io_here : CST.io_here nonterminal
| N_io_file : CST.io_file nonterminal
| N_intended_error : unit nonterminal
| N_if_clause : CST.if_clause nonterminal
| N_here_end : CST.here_end nonterminal
| N_function_definition : CST.function_definition nonterminal
| N_function_body : CST.function_body nonterminal
| N_for_clause : CST.for_clause nonterminal
| N_fname : CST.fname nonterminal
| N_filename : CST.filename nonterminal
| N_entry_point : CST.program CST.located nonterminal
| N_else_part : CST.else_part nonterminal
| N_do_group : CST.do_group nonterminal
| N_compound_list : CST.compound_list nonterminal
| N_compound_command : CST.compound_command nonterminal
| N_complete_commands : CST.complete_commands nonterminal
| N_complete_command : CST.complete_command nonterminal
| N_command : CST.command nonterminal
| N_cmd_word : CST.cmd_word nonterminal
| N_cmd_suffix : CST.cmd_suffix nonterminal
| N_cmd_prefix : CST.cmd_prefix nonterminal
| N_cmd_name : CST.cmd_name nonterminal
| N_clist : CST.clist nonterminal
| N_cin : unit nonterminal
| N_case_list_ns : CST.case_list_ns nonterminal
| N_case_list : CST.case_list nonterminal
| N_case_item_ns : CST.case_item_ns nonterminal
| N_case_item : CST.case_item nonterminal
| N_case_clause : CST.case_clause nonterminal
| N_brace_group : CST.brace_group nonterminal
| 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 =
| T : 'a terminal -> 'a symbol
| N : 'a nonterminal -> 'a symbol
type xsymbol =
| 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