= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
package archetype
-
archetype
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
This module demonstrates that we can easily generate contextual error message thanks to the introspection API. Indeed, when a parsing error occurs, there exist items in the stack whose analysis is not completed. Therefore, the non terminals of their productions are probably the syntactically classes that are being recognized when the error occurred.
val pop_until :
(Parser.MenhirInterpreter.element -> 'a list) ->
'b Parser.MenhirInterpreter.env ->
'a list
val keep_predictions :
Parser.MenhirInterpreter.xsymbol list ->
(Parser.MenhirInterpreter.production * int) ->
Parser.MenhirInterpreter.xsymbol list
val element_contains_prediction_items :
Parser.MenhirInterpreter.element ->
Parser.MenhirInterpreter.xsymbol list
val find_context :
'a Parser.MenhirInterpreter.checkpoint ->
Parser.MenhirInterpreter.xsymbol list
val parse_error : Position.t -> string -> (unit -> 'a) -> 'b
val contextual_error_msg :
PureLexer.Lexer.t ->
'a Parser.MenhirInterpreter.checkpoint ->
(unit -> 'b) ->
'c