Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

3728 lines (3714 sloc) 284.561 kB
open Base
#18 "trxparse.trx"
open Tgrammar
module PG = Tgrammar.PreGrammar
let current_location fn pos =
{ file_name = fn; line_number = fst (FilePos.get_pos fn pos) }
module Make
(R_ : Reader.S) = struct
let _grammar_rules = [ ("Trxparse_strict_GElem", None) ; ("Trxparse_rule_annots", Some(("rule annotations"))) ; ("Trxparse_optionType", Some(("TRX option name"))) ; ("Trxparse_mlvar", Some(("element name"))) ; ("Trxparse_mlcomment", None) ; ("Trxparse_mlCOMMENTSTOP", None) ; ("Trxparse_mlCOMMENTSTART", None) ; ("Trxparse_memo_opt", Some(("memoization annotation"))) ; ("Trxparse_maybe_GElems_no_sp_eof", None) ; ("Trxparse_maybe_GElems_no_sp", None) ; ("Trxparse_maybe_GElem_no_sp", None) ; ("Trxparse_item_list", None) ; ("Trxparse_construct_name_secondary", None) ; ("Trxparse_construct_name_primary", None) ; ("Trxparse_construct_name_opt", Some(("optional rule name"))) ; ("Trxparse_Type", None) ; ("Trxparse_TILDE", None) ; ("Trxparse_SuffixElement", None) ; ("Trxparse_Suffix", Some(("element's suffix"))) ; ("Trxparse_StoppableCode", None) ; ("Trxparse_Spacing", Some(("spacing"))) ; ("Trxparse_Space", None) ; ("Trxparse_Sequence", Some(("a sequence of parsing expressions"))) ; ("Trxparse_STAR", None) ; ("Trxparse_SLASH", None) ; ("Trxparse_SEMI", None) ; ("Trxparse_Range", None) ; ("Trxparse_RIGHTARROW", None) ; ("Trxparse_RBRACE", None) ; ("Trxparse_QUESTION", None) ; ("Trxparse_Primary", Some(("parsing element"))) ; ("Trxparse_PrefixElement", None) ; ("Trxparse_Prefix", Some(("element's prefix"))) ; ("Trxparse_PLUS", None) ; ("Trxparse_Option", Some(("TRX option"))) ; ("Trxparse_OPEN", None) ; ("Trxparse_Names", None) ; ("Trxparse_Name", None) ; ("Trxparse_NOT", None) ; ("Trxparse_Module", None) ; ("Trxparse_MARK", None) ; ("Trxparse_Literal", Some(("literal"))) ; ("Trxparse_LET", None) ; ("Trxparse_LEFTARROW", None) ; ("Trxparse_LBRACE", None) ; ("Trxparse_KEEP_CACHE", None) ; ("Trxparse_IncludeRead", Some(("include directive"))) ; ("Trxparse_Identifier", Some(("identifier"))) ; ("Trxparse_HeaderCode", None) ; ("Trxparse_Grammar", Some(("TRX grammar"))) ; ("Trxparse_GElems", Some(("list of TRX elements"))) ; ("Trxparse_GElem_no_sp", None) ; ("Trxparse_GElem", Some(("TRX element"))) ; ("Trxparse_Function", Some(("TRX function"))) ; ("Trxparse_Filename", Some(("file name"))) ; ("Trxparse_Extra", Some(("extra directive"))) ; ("Trxparse_Exprs", Some(("list of expressions"))) ; ("Trxparse_Expression", Some(("rule body"))) ; ("Trxparse_EQUAL", None) ; ("Trxparse_EOL", Some(("end of line"))) ; ("Trxparse_EOF", None) ; ("Trxparse_ENd", None) ; ("Trxparse_END", None) ; ("Trxparse_Definition", Some(("TRX rule"))) ; ("Trxparse_DefaultCodeNoStop", None) ; ("Trxparse_DefaultCode", None) ; ("Trxparse_DefExpr", None) ; ("Trxparse_DOT", None) ; ("Trxparse_DOLLAR", None) ; ("Trxparse_DEBUG", None) ; ("Trxparse_Comment", Some(("a comment"))) ; ("Trxparse_CodeRange", None) ; ("Trxparse_Code", Some(("rule production"))) ; ("Trxparse_Class", Some(("class of symbols"))) ; ("Trxparse_Char", None) ; ("Trxparse_COMMA", None) ; ("Trxparse_COLON", None) ; ("Trxparse_CLOSE", None) ; ("Trxparse_BackId", None) ; ("Trxparse_BEGIn", None) ; ("Trxparse_BEGIN", None) ; ("Trxparse_AND", None) ]
let parse_with f_noerr f_err _text _start = let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (f_noerr (_text) (_start)) with
Some ( ( pos, res ) ) -> (pos, res)
| None -> (match (f_err (_text) (_start)) with
Trx_runtime.Ok ( ( ( _, _ ), _ ) ) -> (assert false)
| Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.gen_syntax_error (((FilePos.get_pos_no_cache) ((_get_sub (0) (_len))))) (err))))
let memo_Trxparse_AND = ((Hashtbl.create) (128))
let memo_Trxparse_AND_err = ((Hashtbl.create) (128))
let memo_Trxparse_CLOSE = ((Hashtbl.create) (128))
let memo_Trxparse_CLOSE_err = ((Hashtbl.create) (128))
let memo_Trxparse_COMMA = ((Hashtbl.create) (128))
let memo_Trxparse_COMMA_err = ((Hashtbl.create) (128))
let memo_Trxparse_Char = ((Hashtbl.create) (128))
let memo_Trxparse_Char_err = ((Hashtbl.create) (128))
let memo_Trxparse_Class = ((Hashtbl.create) (128))
let memo_Trxparse_Class_err = ((Hashtbl.create) (128))
let memo_Trxparse_Code = ((Hashtbl.create) (128))
let memo_Trxparse_Code_err = ((Hashtbl.create) (128))
let memo_Trxparse_CodeRange = ((Hashtbl.create) (128))
let memo_Trxparse_CodeRange_err = ((Hashtbl.create) (128))
let memo_Trxparse_Comment = ((Hashtbl.create) (128))
let memo_Trxparse_Comment_err = ((Hashtbl.create) (128))
let memo_Trxparse_DOLLAR = ((Hashtbl.create) (128))
let memo_Trxparse_DOLLAR_err = ((Hashtbl.create) (128))
let memo_Trxparse_DOT = ((Hashtbl.create) (128))
let memo_Trxparse_DOT_err = ((Hashtbl.create) (128))
let memo_Trxparse_DefExpr = ((Hashtbl.create) (128))
let memo_Trxparse_DefExpr_err = ((Hashtbl.create) (128))
let memo_Trxparse_DefaultCode = ((Hashtbl.create) (128))
let memo_Trxparse_DefaultCode_err = ((Hashtbl.create) (128))
let memo_Trxparse_DefaultCodeNoStop = ((Hashtbl.create) (128))
let memo_Trxparse_DefaultCodeNoStop_err = ((Hashtbl.create) (128))
let memo_Trxparse_Definition = ((Hashtbl.create) (128))
let memo_Trxparse_Definition_err = ((Hashtbl.create) (128))
let memo_Trxparse_END = ((Hashtbl.create) (128))
let memo_Trxparse_END_err = ((Hashtbl.create) (128))
let memo_Trxparse_ENd = ((Hashtbl.create) (128))
let memo_Trxparse_ENd_err = ((Hashtbl.create) (128))
let memo_Trxparse_EOL = ((Hashtbl.create) (128))
let memo_Trxparse_EOL_err = ((Hashtbl.create) (128))
let memo_Trxparse_EQUAL = ((Hashtbl.create) (128))
let memo_Trxparse_EQUAL_err = ((Hashtbl.create) (128))
let memo_Trxparse_Expression = ((Hashtbl.create) (128))
let memo_Trxparse_Expression_err = ((Hashtbl.create) (128))
let memo_Trxparse_Exprs = ((Hashtbl.create) (128))
let memo_Trxparse_Exprs_err = ((Hashtbl.create) (128))
let memo_Trxparse_Extra = ((Hashtbl.create) (128))
let memo_Trxparse_Extra_err = ((Hashtbl.create) (128))
let memo_Trxparse_Filename = ((Hashtbl.create) (128))
let memo_Trxparse_Filename_err = ((Hashtbl.create) (128))
let memo_Trxparse_Function = ((Hashtbl.create) (128))
let memo_Trxparse_Function_err = ((Hashtbl.create) (128))
let memo_Trxparse_GElems = ((Hashtbl.create) (128))
let memo_Trxparse_GElems_err = ((Hashtbl.create) (128))
let memo_Trxparse_Grammar = ((Hashtbl.create) (128))
let memo_Trxparse_Grammar_err = ((Hashtbl.create) (128))
let memo_Trxparse_HeaderCode = ((Hashtbl.create) (128))
let memo_Trxparse_HeaderCode_err = ((Hashtbl.create) (128))
let memo_Trxparse_Identifier = ((Hashtbl.create) (128))
let memo_Trxparse_Identifier_err = ((Hashtbl.create) (128))
let memo_Trxparse_IncludeRead = ((Hashtbl.create) (128))
let memo_Trxparse_IncludeRead_err = ((Hashtbl.create) (128))
let memo_Trxparse_KEEP_CACHE = ((Hashtbl.create) (128))
let memo_Trxparse_KEEP_CACHE_err = ((Hashtbl.create) (128))
let memo_Trxparse_LBRACE = ((Hashtbl.create) (128))
let memo_Trxparse_LBRACE_err = ((Hashtbl.create) (128))
let memo_Trxparse_LEFTARROW = ((Hashtbl.create) (128))
let memo_Trxparse_LEFTARROW_err = ((Hashtbl.create) (128))
let memo_Trxparse_LET = ((Hashtbl.create) (128))
let memo_Trxparse_LET_err = ((Hashtbl.create) (128))
let memo_Trxparse_Literal = ((Hashtbl.create) (128))
let memo_Trxparse_Literal_err = ((Hashtbl.create) (128))
let memo_Trxparse_Module = ((Hashtbl.create) (128))
let memo_Trxparse_Module_err = ((Hashtbl.create) (128))
let memo_Trxparse_NOT = ((Hashtbl.create) (128))
let memo_Trxparse_NOT_err = ((Hashtbl.create) (128))
let memo_Trxparse_Name = ((Hashtbl.create) (128))
let memo_Trxparse_Name_err = ((Hashtbl.create) (128))
let memo_Trxparse_Names = ((Hashtbl.create) (128))
let memo_Trxparse_Names_err = ((Hashtbl.create) (128))
let memo_Trxparse_OPEN = ((Hashtbl.create) (128))
let memo_Trxparse_OPEN_err = ((Hashtbl.create) (128))
let memo_Trxparse_Option = ((Hashtbl.create) (128))
let memo_Trxparse_Option_err = ((Hashtbl.create) (128))
let memo_Trxparse_PLUS = ((Hashtbl.create) (128))
let memo_Trxparse_PLUS_err = ((Hashtbl.create) (128))
let memo_Trxparse_Prefix = ((Hashtbl.create) (128))
let memo_Trxparse_Prefix_err = ((Hashtbl.create) (128))
let memo_Trxparse_PrefixElement = ((Hashtbl.create) (128))
let memo_Trxparse_PrefixElement_err = ((Hashtbl.create) (128))
let memo_Trxparse_Primary = ((Hashtbl.create) (128))
let memo_Trxparse_Primary_err = ((Hashtbl.create) (128))
let memo_Trxparse_QUESTION = ((Hashtbl.create) (128))
let memo_Trxparse_QUESTION_err = ((Hashtbl.create) (128))
let memo_Trxparse_RBRACE = ((Hashtbl.create) (128))
let memo_Trxparse_RBRACE_err = ((Hashtbl.create) (128))
let memo_Trxparse_Range = ((Hashtbl.create) (128))
let memo_Trxparse_Range_err = ((Hashtbl.create) (128))
let memo_Trxparse_SEMI = ((Hashtbl.create) (128))
let memo_Trxparse_SEMI_err = ((Hashtbl.create) (128))
let memo_Trxparse_SLASH = ((Hashtbl.create) (128))
let memo_Trxparse_SLASH_err = ((Hashtbl.create) (128))
let memo_Trxparse_STAR = ((Hashtbl.create) (128))
let memo_Trxparse_STAR_err = ((Hashtbl.create) (128))
let memo_Trxparse_Sequence = ((Hashtbl.create) (128))
let memo_Trxparse_Sequence_err = ((Hashtbl.create) (128))
let memo_Trxparse_Space = ((Hashtbl.create) (128))
let memo_Trxparse_Space_err = ((Hashtbl.create) (128))
let memo_Trxparse_Spacing = ((Hashtbl.create) (128))
let memo_Trxparse_Spacing_err = ((Hashtbl.create) (128))
let memo_Trxparse_StoppableCode = ((Hashtbl.create) (128))
let memo_Trxparse_StoppableCode_err = ((Hashtbl.create) (128))
let memo_Trxparse_Suffix = ((Hashtbl.create) (128))
let memo_Trxparse_Suffix_err = ((Hashtbl.create) (128))
let memo_Trxparse_SuffixElement = ((Hashtbl.create) (128))
let memo_Trxparse_SuffixElement_err = ((Hashtbl.create) (128))
let memo_Trxparse_TILDE = ((Hashtbl.create) (128))
let memo_Trxparse_TILDE_err = ((Hashtbl.create) (128))
let memo_Trxparse_Type = ((Hashtbl.create) (128))
let memo_Trxparse_Type_err = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_opt = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_opt_err = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_primary = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_primary_err = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_secondary = ((Hashtbl.create) (128))
let memo_Trxparse_construct_name_secondary_err = ((Hashtbl.create) (128))
let memo_Trxparse_item_list = ((Hashtbl.create) (128))
let memo_Trxparse_item_list_err = ((Hashtbl.create) (128))
let memo_Trxparse_memo_opt = ((Hashtbl.create) (128))
let memo_Trxparse_memo_opt_err = ((Hashtbl.create) (128))
let memo_Trxparse_mlCOMMENTSTART = ((Hashtbl.create) (128))
let memo_Trxparse_mlCOMMENTSTART_err = ((Hashtbl.create) (128))
let memo_Trxparse_mlCOMMENTSTOP = ((Hashtbl.create) (128))
let memo_Trxparse_mlCOMMENTSTOP_err = ((Hashtbl.create) (128))
let memo_Trxparse_mlcomment = ((Hashtbl.create) (128))
let memo_Trxparse_mlcomment_err = ((Hashtbl.create) (128))
let memo_Trxparse_mlvar = ((Hashtbl.create) (128))
let memo_Trxparse_mlvar_err = ((Hashtbl.create) (128))
let memo_Trxparse_optionType = ((Hashtbl.create) (128))
let memo_Trxparse_optionType_err = ((Hashtbl.create) (128))
let memo_Trxparse_rule_annots = ((Hashtbl.create) (128))
let memo_Trxparse_rule_annots_err = ((Hashtbl.create) (128))
let prepare_cache () = ((Hashtbl.clear) (memo_Trxparse_AND)) ; ((Hashtbl.clear) (memo_Trxparse_AND_err)) ; ((Hashtbl.clear) (memo_Trxparse_CLOSE)) ; ((Hashtbl.clear) (memo_Trxparse_CLOSE_err)) ; ((Hashtbl.clear) (memo_Trxparse_COMMA)) ; ((Hashtbl.clear) (memo_Trxparse_COMMA_err)) ; ((Hashtbl.clear) (memo_Trxparse_Char)) ; ((Hashtbl.clear) (memo_Trxparse_Char_err)) ; ((Hashtbl.clear) (memo_Trxparse_Class)) ; ((Hashtbl.clear) (memo_Trxparse_Class_err)) ; ((Hashtbl.clear) (memo_Trxparse_Code)) ; ((Hashtbl.clear) (memo_Trxparse_Code_err)) ; ((Hashtbl.clear) (memo_Trxparse_CodeRange)) ; ((Hashtbl.clear) (memo_Trxparse_CodeRange_err)) ; ((Hashtbl.clear) (memo_Trxparse_Comment)) ; ((Hashtbl.clear) (memo_Trxparse_Comment_err)) ; ((Hashtbl.clear) (memo_Trxparse_DOLLAR)) ; ((Hashtbl.clear) (memo_Trxparse_DOLLAR_err)) ; ((Hashtbl.clear) (memo_Trxparse_DOT)) ; ((Hashtbl.clear) (memo_Trxparse_DOT_err)) ; ((Hashtbl.clear) (memo_Trxparse_DefExpr)) ; ((Hashtbl.clear) (memo_Trxparse_DefExpr_err)) ; ((Hashtbl.clear) (memo_Trxparse_DefaultCode)) ; ((Hashtbl.clear) (memo_Trxparse_DefaultCode_err)) ; ((Hashtbl.clear) (memo_Trxparse_DefaultCodeNoStop)) ; ((Hashtbl.clear) (memo_Trxparse_DefaultCodeNoStop_err)) ; ((Hashtbl.clear) (memo_Trxparse_Definition)) ; ((Hashtbl.clear) (memo_Trxparse_Definition_err)) ; ((Hashtbl.clear) (memo_Trxparse_END)) ; ((Hashtbl.clear) (memo_Trxparse_END_err)) ; ((Hashtbl.clear) (memo_Trxparse_ENd)) ; ((Hashtbl.clear) (memo_Trxparse_ENd_err)) ; ((Hashtbl.clear) (memo_Trxparse_EOL)) ; ((Hashtbl.clear) (memo_Trxparse_EOL_err)) ; ((Hashtbl.clear) (memo_Trxparse_EQUAL)) ; ((Hashtbl.clear) (memo_Trxparse_EQUAL_err)) ; ((Hashtbl.clear) (memo_Trxparse_Expression)) ; ((Hashtbl.clear) (memo_Trxparse_Expression_err)) ; ((Hashtbl.clear) (memo_Trxparse_Exprs)) ; ((Hashtbl.clear) (memo_Trxparse_Exprs_err)) ; ((Hashtbl.clear) (memo_Trxparse_Extra)) ; ((Hashtbl.clear) (memo_Trxparse_Extra_err)) ; ((Hashtbl.clear) (memo_Trxparse_Filename)) ; ((Hashtbl.clear) (memo_Trxparse_Filename_err)) ; ((Hashtbl.clear) (memo_Trxparse_Function)) ; ((Hashtbl.clear) (memo_Trxparse_Function_err)) ; ((Hashtbl.clear) (memo_Trxparse_GElems)) ; ((Hashtbl.clear) (memo_Trxparse_GElems_err)) ; ((Hashtbl.clear) (memo_Trxparse_Grammar)) ; ((Hashtbl.clear) (memo_Trxparse_Grammar_err)) ; ((Hashtbl.clear) (memo_Trxparse_HeaderCode)) ; ((Hashtbl.clear) (memo_Trxparse_HeaderCode_err)) ; ((Hashtbl.clear) (memo_Trxparse_Identifier)) ; ((Hashtbl.clear) (memo_Trxparse_Identifier_err)) ; ((Hashtbl.clear) (memo_Trxparse_IncludeRead)) ; ((Hashtbl.clear) (memo_Trxparse_IncludeRead_err)) ; ((Hashtbl.clear) (memo_Trxparse_KEEP_CACHE)) ; ((Hashtbl.clear) (memo_Trxparse_KEEP_CACHE_err)) ; ((Hashtbl.clear) (memo_Trxparse_LBRACE)) ; ((Hashtbl.clear) (memo_Trxparse_LBRACE_err)) ; ((Hashtbl.clear) (memo_Trxparse_LEFTARROW)) ; ((Hashtbl.clear) (memo_Trxparse_LEFTARROW_err)) ; ((Hashtbl.clear) (memo_Trxparse_LET)) ; ((Hashtbl.clear) (memo_Trxparse_LET_err)) ; ((Hashtbl.clear) (memo_Trxparse_Literal)) ; ((Hashtbl.clear) (memo_Trxparse_Literal_err)) ; ((Hashtbl.clear) (memo_Trxparse_Module)) ; ((Hashtbl.clear) (memo_Trxparse_Module_err)) ; ((Hashtbl.clear) (memo_Trxparse_NOT)) ; ((Hashtbl.clear) (memo_Trxparse_NOT_err)) ; ((Hashtbl.clear) (memo_Trxparse_Name)) ; ((Hashtbl.clear) (memo_Trxparse_Name_err)) ; ((Hashtbl.clear) (memo_Trxparse_Names)) ; ((Hashtbl.clear) (memo_Trxparse_Names_err)) ; ((Hashtbl.clear) (memo_Trxparse_OPEN)) ; ((Hashtbl.clear) (memo_Trxparse_OPEN_err)) ; ((Hashtbl.clear) (memo_Trxparse_Option)) ; ((Hashtbl.clear) (memo_Trxparse_Option_err)) ; ((Hashtbl.clear) (memo_Trxparse_PLUS)) ; ((Hashtbl.clear) (memo_Trxparse_PLUS_err)) ; ((Hashtbl.clear) (memo_Trxparse_Prefix)) ; ((Hashtbl.clear) (memo_Trxparse_Prefix_err)) ; ((Hashtbl.clear) (memo_Trxparse_PrefixElement)) ; ((Hashtbl.clear) (memo_Trxparse_PrefixElement_err)) ; ((Hashtbl.clear) (memo_Trxparse_Primary)) ; ((Hashtbl.clear) (memo_Trxparse_Primary_err)) ; ((Hashtbl.clear) (memo_Trxparse_QUESTION)) ; ((Hashtbl.clear) (memo_Trxparse_QUESTION_err)) ; ((Hashtbl.clear) (memo_Trxparse_RBRACE)) ; ((Hashtbl.clear) (memo_Trxparse_RBRACE_err)) ; ((Hashtbl.clear) (memo_Trxparse_Range)) ; ((Hashtbl.clear) (memo_Trxparse_Range_err)) ; ((Hashtbl.clear) (memo_Trxparse_SEMI)) ; ((Hashtbl.clear) (memo_Trxparse_SEMI_err)) ; ((Hashtbl.clear) (memo_Trxparse_SLASH)) ; ((Hashtbl.clear) (memo_Trxparse_SLASH_err)) ; ((Hashtbl.clear) (memo_Trxparse_STAR)) ; ((Hashtbl.clear) (memo_Trxparse_STAR_err)) ; ((Hashtbl.clear) (memo_Trxparse_Sequence)) ; ((Hashtbl.clear) (memo_Trxparse_Sequence_err)) ; ((Hashtbl.clear) (memo_Trxparse_Space)) ; ((Hashtbl.clear) (memo_Trxparse_Space_err)) ; ((Hashtbl.clear) (memo_Trxparse_Spacing)) ; ((Hashtbl.clear) (memo_Trxparse_Spacing_err)) ; ((Hashtbl.clear) (memo_Trxparse_StoppableCode)) ; ((Hashtbl.clear) (memo_Trxparse_StoppableCode_err)) ; ((Hashtbl.clear) (memo_Trxparse_Suffix)) ; ((Hashtbl.clear) (memo_Trxparse_Suffix_err)) ; ((Hashtbl.clear) (memo_Trxparse_SuffixElement)) ; ((Hashtbl.clear) (memo_Trxparse_SuffixElement_err)) ; ((Hashtbl.clear) (memo_Trxparse_TILDE)) ; ((Hashtbl.clear) (memo_Trxparse_TILDE_err)) ; ((Hashtbl.clear) (memo_Trxparse_Type)) ; ((Hashtbl.clear) (memo_Trxparse_Type_err)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_opt)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_opt_err)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_primary)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_primary_err)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_secondary)) ; ((Hashtbl.clear) (memo_Trxparse_construct_name_secondary_err)) ; ((Hashtbl.clear) (memo_Trxparse_item_list)) ; ((Hashtbl.clear) (memo_Trxparse_item_list_err)) ; ((Hashtbl.clear) (memo_Trxparse_memo_opt)) ; ((Hashtbl.clear) (memo_Trxparse_memo_opt_err)) ; ((Hashtbl.clear) (memo_Trxparse_mlCOMMENTSTART)) ; ((Hashtbl.clear) (memo_Trxparse_mlCOMMENTSTART_err)) ; ((Hashtbl.clear) (memo_Trxparse_mlCOMMENTSTOP)) ; ((Hashtbl.clear) (memo_Trxparse_mlCOMMENTSTOP_err)) ; ((Hashtbl.clear) (memo_Trxparse_mlcomment)) ; ((Hashtbl.clear) (memo_Trxparse_mlcomment_err)) ; ((Hashtbl.clear) (memo_Trxparse_mlvar)) ; ((Hashtbl.clear) (memo_Trxparse_mlvar_err)) ; ((Hashtbl.clear) (memo_Trxparse_optionType)) ; ((Hashtbl.clear) (memo_Trxparse_optionType_err)) ; ((Hashtbl.clear) (memo_Trxparse_rule_annots)) ; ((Hashtbl.clear) (memo_Trxparse_rule_annots_err))
let rec try_Trxparse_EOF_noerr =
#257 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
Some((((succ) (input)), c)) ) else ( None ) with
None -> let input_281 = input in
let __1 = () in
Some((input_281, ()))
| Some ( ( _, _ ) ) -> None))
let rec try_Trxparse_EOL_noerr =
#255 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_EOL) (input))
) with
Not_found -> let res = (match (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((=)) (c) ('\n'))) ((((=)) (c) ('\r')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_280, __1 ) ) -> Some((input_280, ( () )))) with
None -> (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\r'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\r")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_278, __1 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_278) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_278) (0))))) ('\n'))) (true)))) ) then ( Some(((((+)) (input_278) (1)), "\n")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_279, __2 ) ) -> Some((input_279, ( () )))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_EOL) (input) (res)) ; res)
)
let rec try_Trxparse_Space_noerr =
#254 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Space) (input))
) with
Not_found -> let res = (match (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((=)) (c) (' '))) ((((=)) (c) ('\t')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_114, __1 ) ) -> Some((input_114, ( () )))) with
None -> (match (try_Trxparse_EOL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_113, __1 ) ) -> Some((input_113, ( () ))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Space) (input) (res)) ; res)
)
let rec try_Trxparse_mlcomment_noerr =
#250 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlcomment) (input))
) with
Not_found -> let res = (match (try_Trxparse_mlCOMMENTSTART_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_16, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_19 -> (match (try_Trxparse_mlCOMMENTSTOP_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_19)) with
None -> let input_20 = input_19 in
let __1 = () in
(match (try_Trxparse_mlcomment_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_20)) with
None -> (match if ( (((<)) (input_20) (_len)) ) then ( let c = ((_get_char) (input_20)) in
Some((((succ) (input_20)), c)) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_22, __1 ) ) -> Some((input_22, ( () ))))
| ( _ok ) as __pat_var -> __pat_var)
| Some ( ( _, _ ) ) -> None))) (input_16)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_17, __2 ) ) -> (match (try_Trxparse_mlCOMMENTSTOP_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_17)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_18, __3 ) ) -> Some((input_18, ( () )))))) in
(Hashtbl.add (memo_Trxparse_mlcomment) (input) (res)) ; res)
)
and try_Trxparse_Spacing_noerr =
#245 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Spacing) (input))
) with
Not_found -> let res = (Trx_runtime.while_primary_noerr (false) ((fun input_110 -> (match (match (try_Trxparse_Space_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_110)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_112, __1 ) ) -> Some((input_112, ( () )))) with
None -> (try_Trxparse_Comment_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_110))
| ( _ok ) as __pat_var -> __pat_var))) (input)) in
(Hashtbl.add (memo_Trxparse_Spacing) (input) (res)) ; res)
)
and try_Trxparse_mlCOMMENTSTOP_noerr =
#252 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlCOMMENTSTOP) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) (')'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "*)")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_24, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_24)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_25, __2 ) ) -> Some((input_25, ())))) in
(Hashtbl.add (memo_Trxparse_mlCOMMENTSTOP) (input) (res)) ; res)
)
and try_Trxparse_Comment_noerr =
#247 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Comment) (input))
) with
Not_found -> let res = (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('#'))) (true)))) ) then ( Some(((((+)) (input) (1)), "#")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_347, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_352 -> (match (try_Trxparse_EOL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_352)) with
None -> let input_353 = input_352 in
let __1 = () in
if ( (((<)) (input_353) (_len)) ) then ( let c = ((_get_char) (input_353)) in
Some((((succ) (input_353)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_347)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_348, __2 ) ) -> (match (match (try_Trxparse_EOL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_348)) with
None -> (try_Trxparse_EOF_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_348))
| ( _ok ) as __pat_var -> __pat_var) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_349, __3 ) ) -> Some((input_349, ( () )))))) with
None -> (try_Trxparse_mlcomment_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Comment) (input) (res)) ; res)
)
and try_Trxparse_mlCOMMENTSTART_noerr =
#251 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlCOMMENTSTART) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('('))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "(*")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_26, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_26)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_27, __2 ) ) -> Some((input_27, ())))) in
(Hashtbl.add (memo_Trxparse_mlCOMMENTSTART) (input) (res)) ; res)
)
let rec try_Trxparse_AND_noerr =
#228 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_AND) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('&')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_395, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_395)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_396, __2 ) ) -> Some((input_396, ())))) in
(Hashtbl.add (memo_Trxparse_AND) (input) (res)) ; res)
)
let rec try_Trxparse_NOT_noerr =
#229 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_NOT) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('!')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_175, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_175)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_176, __2 ) ) -> Some((input_176, ())))) in
(Hashtbl.add (memo_Trxparse_NOT) (input) (res)) ; res)
)
let rec try_Trxparse_PrefixElement_noerr =
#172 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_PrefixElement) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_AND_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_150, __1 ) ) -> Some((input_150,
#172 "trxparse.trx"
( `AND )))) with
None -> (match (try_Trxparse_NOT_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_149, __1 ) ) -> Some((input_149,
#172 "trxparse.trx"
( `NOT ))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_PrefixElement) (input) (res)) ; res)
)
let rec try_Trxparse_Prefix_noerr =
#174 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Prefix) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_PrefixElement_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> Some((input, None))
| Some ( ( input_152, r ) ) -> Some((input_152, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_151, __1 ) ) -> Some((input_151,
#175 "trxparse.trx"
( match __1 with None -> `NORMAL | Some x -> x )))) in
(Hashtbl.add (memo_Trxparse_Prefix) (input) (res)) ; res)
)
let rec try_Trxparse_CLOSE_noerr =
#234 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_CLOSE) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (')')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_389, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_389)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_390, __2 ) ) -> Some((input_390, ())))) in
(Hashtbl.add (memo_Trxparse_CLOSE) (input) (res)) ; res)
)
let rec try_Trxparse_Char_noerr =
#212 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Char) (input))
) with
Not_found -> let res = (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_383, __1 ) ) -> (match if ( (((<)) (input_383) (_len)) ) then ( let c = ((_get_char) (input_383)) in
if ( (((||)) ((((=)) (c) ('n'))) ((((||)) ((((=)) (c) ('r'))) ((((||)) ((((=)) (c) ('t'))) ((((||)) ((((=)) (c) ('\''))) ((((||)) ((((=)) (c) ('"'))) ((((||)) ((((=)) (c) ('\\'))) ((((||)) ((((=)) (c) ('['))) ((((||)) ((((=)) (c) (']'))) ((((=)) (c) ('-')))))))))))))))))) ) then ( Some((((succ) (input_383)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_384, __2 ) ) -> Some((input_384,
#212 "trxparse.trx"
( match __2 with 'n' -> '\n' | 'r' -> '\r' | 't' -> '\t' | x -> x ))))) with
None -> (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_380, __1 ) ) -> (match (Trx_runtime.while_primary_noerr (true) ((fun input_382 -> if ( (((<)) (input_382) (_len)) ) then ( let c = ((_get_char) (input_382)) in
if ( (((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9')))) ) then ( Some((((succ) (input_382)), c)) ) else ( None ) ) else ( None ))) (input_380)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_381, __2 ) ) -> Some((input_381,
#213 "trxparse.trx"
( char_of_int (int_of_chars __2) ))))) with
None -> (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None ) with
None -> let input_378 = input in
let __1 = () in
if ( (((<)) (input_378) (_len)) ) then ( let c = ((_get_char) (input_378)) in
Some((((succ) (input_378)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None)
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Char) (input) (res)) ; res)
)
let rec try_Trxparse_Range_noerr =
#210 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Range) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_Char_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_125, __1 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_125) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_125) (0))))) ('-'))) (true)))) ) then ( Some(((((+)) (input_125) (1)), "-")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_126, __2 ) ) -> (match (try_Trxparse_Char_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_126)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_127, __3 ) ) -> Some((input_127,
#210 "trxparse.trx"
( Range (__1, __3) )))))) with
None -> (match (try_Trxparse_Char_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_124, __1 ) ) -> Some((input_124,
#211 "trxparse.trx"
( One __1 ))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Range) (input) (res)) ; res)
)
let rec try_Trxparse_Class_noerr =
#206 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Class) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('['))) (true)))) ) then ( Some(((((+)) (input) (1)), "[")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_369, __1 ) ) -> (match (match if ( (((&&)) ((((<=)) ((((+)) (input_369) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_369) (0))))) ('^'))) (true)))) ) then ( Some(((((+)) (input_369) (1)), "^")) ) else ( None ) with
None -> Some((input_369, None))
| Some ( ( input_377, r ) ) -> Some((input_377, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_370, __2 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_374 -> (match if ( (((&&)) ((((<=)) ((((+)) (input_374) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_374) (0))))) (']'))) (true)))) ) then ( Some(((((+)) (input_374) (1)), "]")) ) else ( None ) with
None -> let input_375 = input_374 in
let __1 = () in
(match (try_Trxparse_Range_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_375)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_376, __2 ) ) -> Some((input_376,
#207 "trxparse.trx"
( __2 ))))
| Some ( ( _, _ ) ) -> None))) (input_370)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_371, __3 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_371) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_371) (0))))) (']'))) (true)))) ) then ( Some(((((+)) (input_371) (1)), "]")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_372, __4 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_372)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_373, __5 ) ) -> Some((input_373,
#207 "trxparse.trx"
( __3, (Option.is_some __2) )))))))) in
(Hashtbl.add (memo_Trxparse_Class) (input) (res)) ; res)
)
let rec try_Trxparse_DOT_noerr =
#235 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DOT) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('.')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_341, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_341)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_342, __2 ) ) -> Some((input_342, ())))) in
(Hashtbl.add (memo_Trxparse_DOT) (input) (res)) ; res)
)
let rec try_Trxparse_EQUAL_noerr =
#238 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_EQUAL) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('=')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_276, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_276)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_277, __2 ) ) -> Some((input_277, ())))) in
(Hashtbl.add (memo_Trxparse_EQUAL) (input) (res)) ; res)
)
let rec try_Trxparse_SLASH_noerr =
#227 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SLASH) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('/')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_120, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_120)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_121, __2 ) ) -> Some((input_121, ())))) in
(Hashtbl.add (memo_Trxparse_SLASH) (input) (res)) ; res)
)
let rec try_Trxparse_CodeRange_noerr =
#157 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_CodeRange) (input))
) with
Not_found -> let res = (match (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) (':'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('_'))) (true)))))) ) then ( Some(((((+)) (input) (2)), ":_")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_356, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_356)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_357, __2 ) ) -> Some((input_357, ())))) with
None -> Some((input, None))
| Some ( ( input_358, r ) ) -> Some((input_358, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_355, __1 ) ) -> Some((input_355,
#157 "trxparse.trx"
( __1 <> None )))) in
(Hashtbl.add (memo_Trxparse_CodeRange) (input) (res)) ; res)
)
let rec try_Trxparse_DOLLAR_noerr =
#236 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DOLLAR) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('$')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_343, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_343)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_344, __2 ) ) -> Some((input_344, ())))) in
(Hashtbl.add (memo_Trxparse_DOLLAR) (input) (res)) ; res)
)
let rec try_Trxparse_BEGIN_noerr =
#221 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('{'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{{")) ) else ( None ))
let rec try_Trxparse_BEGIn_noerr =
#223 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('|'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{|")) ) else ( None ))
let rec try_Trxparse_END_noerr =
#222 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_END) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('}'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('}'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "}}")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_284, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_284)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_285, __2 ) ) -> Some((input_285, ())))) in
(Hashtbl.add (memo_Trxparse_END) (input) (res)) ; res)
)
let rec try_Trxparse_ENd_noerr =
#224 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_ENd) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('|'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('}'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "|}")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_282, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_282)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_283, __2 ) ) -> Some((input_283, ())))) in
(Hashtbl.add (memo_Trxparse_ENd) (input) (res)) ; res)
)
let rec try_Trxparse_StoppableCode_noerr =
#158 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_StoppableCode) (input))
) with
Not_found -> let res = (match (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('!'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('!'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "!!")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_106, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_106)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_107, __2 ) ) -> Some((input_107, ())))) with
None -> Some((input, None))
| Some ( ( input_108, r ) ) -> Some((input_108, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_105, __1 ) ) -> Some((input_105,
#158 "trxparse.trx"
( __1 <> None )))) in
(Hashtbl.add (memo_Trxparse_StoppableCode) (input) (res)) ; res)
)
let rec try_Trxparse_DefaultCode_noerr =
#163 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefaultCode) (input))
) with
Not_found -> let res = (match (match (match (try_Trxparse_BEGIn_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_323, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_323)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_324, __2 ) ) -> (match (try_Trxparse_StoppableCode_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_324)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_325, __3 ) ) -> (match (try_Trxparse_CodeRange_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_325)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_326, __4 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_331 -> (match (try_Trxparse_ENd_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_331)) with
None -> let input_332 = input_331 in
let __1 = () in
if ( (((<)) (input_332) (_len)) ) then ( let c = ((_get_char) (input_332)) in
Some((((succ) (input_332)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_326)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_330, __1 ) ) -> Some((input_330, (_get_sub (input_326) ((((-)) (input_330) (input_326))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_327, __5 ) ) -> (match (try_Trxparse_ENd_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_327)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_328, __6 ) ) -> Some((input_328,
#161 "trxparse.trx"
( __4, (if (__3 && _stoppable) or (not _stoppable) then __5 else sprintf "Some (%s)" __5) ))))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_322, __1 ) ) -> Some((input_322,
#163 "trxparse.trx"
( let (u, v) = __1 in u, v, Some(current_location _file_name input), true )))) with
None -> (match (match (try_Trxparse_BEGIN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_309, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_309)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_310, __2 ) ) -> (match (try_Trxparse_StoppableCode_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_310)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_311, __3 ) ) -> (match (try_Trxparse_CodeRange_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_311)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_312, __4 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_317 -> (match (try_Trxparse_END_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_317)) with
None -> let input_318 = input_317 in
let __1 = () in
if ( (((<)) (input_318) (_len)) ) then ( let c = ((_get_char) (input_318)) in
Some((((succ) (input_318)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_312)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_316, __1 ) ) -> Some((input_316, (_get_sub (input_312) ((((-)) (input_316) (input_312))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_313, __5 ) ) -> (match (try_Trxparse_END_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_313)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_314, __6 ) ) -> Some((input_314,
#161 "trxparse.trx"
( __4, (if (__3 && _stoppable) or (not _stoppable) then __5 else sprintf "Some (%s)" __5) ))))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_308, __1 ) ) -> Some((input_308,
#164 "trxparse.trx"
( let (u, v) = __1 in u, v, Some(current_location _file_name input), false ))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_DefaultCode) (input) (res)) ; res)
)
let rec try_Trxparse_Code_noerr =
#167 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Code) (input))
) with
Not_found -> let res = (match (try_Trxparse_DefaultCode_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('$'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('_'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "$_")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_365, __1 ) ) -> (match (try_Trxparse_CodeRange_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_365)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_366, __2 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_366)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_367, __3 ) ) -> Some((input_367,
#169 "trxparse.trx"
( __2, ".sub", None, false )))))) with
None -> (match (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('$'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) (':'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "$:")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_360, __1 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (true) ((fun input_364 -> if ( (((<)) (input_364) (_len)) ) then ( let c = ((_get_char) (input_364)) in
if ( (((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9')))) ) then ( Some((((succ) (input_364)), c)) ) else ( None ) ) else ( None ))) (input_360)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_363, __1 ) ) -> Some((input_363, (_get_sub (input_360) ((((-)) (input_363) (input_360))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_361, __2 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_361)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_362, __3 ) ) -> Some((input_362,
#170 "trxparse.trx"
( true, sprintf "%s__%s" (if _stoppable then "Some " else "") __2, None, false )))))) with
None -> (match (try_Trxparse_DOLLAR_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_359, __1 ) ) -> Some((input_359,
#171 "trxparse.trx"
( false, sprintf "%s()" (if _stoppable then "Some " else ""), None, false ))))
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Code) (input) (res)) ; res)
)
let rec try_Trxparse_COMMA_noerr =
#239 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_COMMA) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (',')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_385, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_385)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_386, __2 ) ) -> Some((input_386, ())))) in
(Hashtbl.add (memo_Trxparse_COMMA) (input) (res)) ; res)
)
let rec try_Trxparse_OPEN_noerr =
#233 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_OPEN) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('(')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_162, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_162)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_163, __2 ) ) -> Some((input_163, ())))) in
(Hashtbl.add (memo_Trxparse_OPEN) (input) (res)) ; res)
)
let rec try_Trxparse_Module_noerr =
#194 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Module) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_177, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_179 -> if ( (((<)) (input_179) (_len)) ) then ( let c = ((_get_char) (input_179)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_179)), c)) ) else ( None ) ) else ( None ))) (input_177)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_178, __2 ) ) -> Some((input_178, (_get_sub (input) ((((-)) (input_178) (input)))))))) in
(Hashtbl.add (memo_Trxparse_Module) (input) (res)) ; res)
)
let rec try_Trxparse_Name_noerr =
#195 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Name) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((=)) (c) ('_')))))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_172, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_174 -> if ( (((<)) (input_174) (_len)) ) then ( let c = ((_get_char) (input_174)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_174)), c)) ) else ( None ) ) else ( None ))) (input_172)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_173, __2 ) ) -> Some((input_173, (_get_sub (input) ((((-)) (input_173) (input)))))))) in
(Hashtbl.add (memo_Trxparse_Name) (input) (res)) ; res)
)
let rec try_Trxparse_Identifier_noerr =
#198 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Identifier) (input))
) with
Not_found -> let res = (match (match (match (try_Trxparse_Module_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_215, __1 ) ) -> (match if ( (((<)) (input_215) (_len)) ) then ( let c = ((_get_char) (input_215)) in
if ( (((=)) (c) ('.')) ) then ( Some((((succ) (input_215)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_216, __2 ) ) -> (match (try_Trxparse_Name_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_216)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_217, __3 ) ) -> Some((input_217,
#200 "trxparse.trx"
( __1 ^ "_" ^ __3 )))))) with
None -> (match (try_Trxparse_Name_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_214, __1 ) ) -> Some((input_214,
#201 "trxparse.trx"
( _module_name ^ "_" ^ __1 ))))
| ( _ok ) as __pat_var -> __pat_var) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_212, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_212)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_213, __2 ) ) -> Some((input_213,
#202 "trxparse.trx"
( __1 ))))) in
(Hashtbl.add (memo_Trxparse_Identifier) (input) (res)) ; res)
)
let rec try_Trxparse_LEFTARROW_noerr =
#225 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LEFTARROW) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('<'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('-'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "<-")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_197, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_197)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_198, __2 ) ) -> Some((input_198, ())))) in
(Hashtbl.add (memo_Trxparse_LEFTARROW) (input) (res)) ; res)
)
let rec try_Trxparse_Literal_noerr =
#203 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Literal) (input))
) with
Not_found -> let res = (match (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_188, __1 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_192 -> (match if ( (((<)) (input_192) (_len)) ) then ( let c = ((_get_char) (input_192)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input_192)), c)) ) else ( None ) ) else ( None ) with
None -> let input_193 = input_192 in
let __1 = () in
(match (try_Trxparse_Char_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_193)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_194, __2 ) ) -> Some((input_194,
#204 "trxparse.trx"
( __2 ))))
| Some ( ( _, _ ) ) -> None))) (input_188)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_189, __2 ) ) -> (match if ( (((<)) (input_189) (_len)) ) then ( let c = ((_get_char) (input_189)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input_189)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_190, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_190)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_191, __4 ) ) -> Some((input_191,
#204 "trxparse.trx"
( string_of_chars __2 ))))))) with
None -> (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_181, __1 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_185 -> (match if ( (((<)) (input_185) (_len)) ) then ( let c = ((_get_char) (input_185)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input_185)), c)) ) else ( None ) ) else ( None ) with
None -> let input_186 = input_185 in
let __1 = () in
(match (try_Trxparse_Char_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_186)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_187, __2 ) ) -> Some((input_187,
#205 "trxparse.trx"
( __2 ))))
| Some ( ( _, _ ) ) -> None))) (input_181)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_182, __2 ) ) -> (match if ( (((<)) (input_182) (_len)) ) then ( let c = ((_get_char) (input_182)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input_182)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_183, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_183)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_184, __4 ) ) -> Some((input_184,
#205 "trxparse.trx"
( string_of_chars __2 )))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Literal) (input) (res)) ; res)
)
let rec try_Trxparse_TILDE_noerr =
#237 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_TILDE) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('~')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_98, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_98)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_99, __2 ) ) -> Some((input_99, ())))) in
(Hashtbl.add (memo_Trxparse_TILDE) (input) (res)) ; res)
)
let rec try_Trxparse_PLUS_noerr =
#232 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_PLUS) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('+')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_153, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_153)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_154, __2 ) ) -> Some((input_154, ())))) in
(Hashtbl.add (memo_Trxparse_PLUS) (input) (res)) ; res)
)
let rec try_Trxparse_QUESTION_noerr =
#230 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_QUESTION) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('?')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_132, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_132)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_133, __2 ) ) -> Some((input_133, ())))) in
(Hashtbl.add (memo_Trxparse_QUESTION) (input) (res)) ; res)
)
let rec try_Trxparse_STAR_noerr =
#231 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_STAR) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('*')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_118, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_118)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_119, __2 ) ) -> Some((input_119, ())))) in
(Hashtbl.add (memo_Trxparse_STAR) (input) (res)) ; res)
)
let rec try_Trxparse_SuffixElement_noerr =
#173 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SuffixElement) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_QUESTION_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_102, __1 ) ) -> Some((input_102,
#173 "trxparse.trx"
( `QUESTION )))) with
None -> (match (match (try_Trxparse_STAR_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_101, __1 ) ) -> Some((input_101,
#173 "trxparse.trx"
( `STAR )))) with
None -> (match (try_Trxparse_PLUS_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_100, __1 ) ) -> Some((input_100,
#173 "trxparse.trx"
( `PLUS ))))
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_SuffixElement) (input) (res)) ; res)
)
let rec try_Trxparse_Suffix_noerr =
#176 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Suffix) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_SuffixElement_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> Some((input, None))
| Some ( ( input_104, r ) ) -> Some((input_104, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_103, __1 ) ) -> Some((input_103,
#177 "trxparse.trx"
( match __1 with None -> `NORMAL | Some x -> x )))) in
(Hashtbl.add (memo_Trxparse_Suffix) (input) (res)) ; res)
)
let rec try_Trxparse_mlvar_noerr =
#127 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlvar) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((=)) (c) ('_')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_13, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_15 -> if ( (((<)) (input_15) (_len)) ) then ( let c = ((_get_char) (input_15)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_15)), c)) ) else ( None ) ) else ( None ))) (input_13)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_14, __2 ) ) -> Some((input_14, (_get_sub (input) ((((-)) (input_14) (input)))))))) in
(Hashtbl.add (memo_Trxparse_mlvar) (input) (res)) ; res)
)
let rec try_Trxparse_Expression_noerr =
#134 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Expression) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_SLASH_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> Some((input, None))
| Some ( ( input_275, r ) ) -> Some((input_275, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_269, __1 ) ) -> (match (try_Trxparse_Sequence_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_269)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_270, __2 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_272 -> (match (try_Trxparse_SLASH_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_272)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_273, __1 ) ) -> (match (try_Trxparse_Sequence_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_273)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_274, __2 ) ) -> Some((input_274,
#135 "trxparse.trx"
( __2 ))))))) (input_270)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_271, __3 ) ) -> Some((input_271,
#135 "trxparse.trx"
( __2 :: __3 )))))) in
(Hashtbl.add (memo_Trxparse_Expression) (input) (res)) ; res)
)
and try_Trxparse_Sequence_noerr =
#145 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Sequence) (input))
) with
Not_found -> let res = (match (try_Trxparse_item_list_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_115, __1 ) ) -> (match (match (try_Trxparse_Code_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_115)) with
None -> Some((input_115, None))
| Some ( ( input_117, r ) ) -> Some((input_117, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_116, __2 ) ) -> Some((input_116,
#146 "trxparse.trx"
( let liste, map = __1 in liste, map, __2 ))))) in
(Hashtbl.add (memo_Trxparse_Sequence) (input) (res)) ; res)
)
and try_Trxparse_Primary_noerr =
#178 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Primary) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_147, __1 ) ) -> (match (try_Trxparse_LEFTARROW_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_147)) with
None -> let input_148 = input_147 in
let __2 = () in
Some((input_148,
#179 "trxparse.trx"
( PG.Ident __1 )))
| Some ( ( _, _ ) ) -> None)) with
None -> (match (match (try_Trxparse_OPEN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_142, __1 ) ) -> (match (try_Trxparse_EQUAL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_142)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_143, __2 ) ) -> (match (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_143)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_144, __3 ) ) -> (match (try_Trxparse_Exprs_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_144)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_145, __4 ) ) -> (match (try_Trxparse_CLOSE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_145)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_146, __5 ) ) -> Some((input_146,
#180 "trxparse.trx"
( PG.Paren (PG.App (__3, __4)) )))))))) with
None -> (match (match (try_Trxparse_OPEN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_139, __1 ) ) -> (match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_139)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_140, __2 ) ) -> (match (try_Trxparse_CLOSE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_140)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_141, __3 ) ) -> Some((input_141,
#181 "trxparse.trx"
( PG.Paren (PG.Expr __2) )))))) with
None -> (match (match (try_Trxparse_Literal_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_136, __1 ) ) -> (match (match (try_Trxparse_TILDE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_136)) with
None -> Some((input_136, None))
| Some ( ( input_138, r ) ) -> Some((input_138, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_137, __2 ) ) -> Some((input_137,
#182 "trxparse.trx"
( PG.Literal (__1, Option.is_none __2) ))))) with
None -> (match (match (try_Trxparse_Class_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_135, __1 ) ) -> Some((input_135,
#183 "trxparse.trx"
( let range, negation = __1 in
let _class = PG.Class range in
if negation then
PG.Paren (PG.Expr [[`NOT, _class, `NORMAL ; `NORMAL, PG.Class [Any], `NORMAL], StringMap.empty, None])
else
_class
)))) with
None -> (match (try_Trxparse_DOT_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_134, __1 ) ) -> Some((input_134,
#190 "trxparse.trx"
( PG.Class [Any] ))))
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var)
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Primary) (input) (res)) ; res)
)
and try_Trxparse_Exprs_noerr =
#106 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Exprs) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_OPEN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_262, __1 ) ) -> (match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_262)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_263, __2 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_266 -> (match (try_Trxparse_COMMA_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_266)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_267, __1 ) ) -> (match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_267)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_268, __2 ) ) -> Some((input_268,
#107 "trxparse.trx"
( __2 ))))))) (input_263)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_264, __3 ) ) -> (match (try_Trxparse_CLOSE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_264)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_265, __4 ) ) -> Some((input_265,
#107 "trxparse.trx"
( __2 :: __3 ))))))) with
None -> (match (try_Trxparse_OPEN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> let input_260 = input in
let __1 = () in
(match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_260)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_261, __2 ) ) -> Some((input_261,
#108 "trxparse.trx"
( [ __2 ] ))))
| Some ( ( _, _ ) ) -> None)
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Exprs) (input) (res)) ; res)
)
and try_Trxparse_item_list_noerr =
#137 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_item_list) (input))
) with
Not_found -> let res = (match (Trx_runtime.while_primary_noerr (true) ((fun input_42 -> (match (try_Trxparse_Prefix_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_42)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_43, __1 ) ) -> (match (try_Trxparse_Primary_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_43)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_44, __2 ) ) -> (match (try_Trxparse_Suffix_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_44)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_45, __3 ) ) -> (match (match (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_45)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_47, __1 ) ) -> (match if ( (((<)) (input_47) (_len)) ) then ( let c = ((_get_char) (input_47)) in
if ( (((=)) (c) (':')) ) then ( Some((((succ) (input_47)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_48, __2 ) ) -> (match (match if ( (((<)) (input_48) (_len)) ) then ( let c = ((_get_char) (input_48)) in
if ( (((=)) (c) ('_')) ) then ( Some((((succ) (input_48)), c)) ) else ( None ) ) else ( None ) with
None -> Some((input_48, None))
| Some ( ( input_53, r ) ) -> Some((input_53, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_49, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_49)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_50, __4 ) ) -> (match (try_Trxparse_mlvar_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_50)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_51, __5 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_51)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_52, __6 ) ) -> Some((input_52,
#137 "trxparse.trx"
( __5, __3 <> None ))))))))) with
None -> Some((input_45, None))
| Some ( ( input_54, r ) ) -> Some((input_54, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_46, __4 ) ) -> Some((input_46,
#137 "trxparse.trx"
( (__1, __2, __3), __4 ))))))))) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_41, __1 ) ) -> Some((input_41,
#138 "trxparse.trx"
( List.fold_left_i (
fun (liste,map) (item, option) num ->
match option with
None -> (liste @ [item]), map
| Some (label, b) -> (liste @ [item]), (StringMap.add label ((string_of_int (num+1)),b) map)
) ([], StringMap.empty) __1 )))) in
(Hashtbl.add (memo_Trxparse_item_list) (input) (res)) ; res)
)
let rec try_Trxparse_EOF =
#257 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
Some((((succ) (input)), c)) ) else ( None )) (input) (((Trx_runtime.Expected(("any character")))::([])))) with
Trx_runtime.Fail ( ( err ) ) -> let input_678 = input in
let __1 = () in
(Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_678, ()), ((Trx_runtime.emptyError) (input_678))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))
let rec try_Trxparse_EOL =
#255 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_EOL_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((=)) (c) ('\n'))) ((((=)) (c) ('\r')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) ([ Trx_runtime.Expected(("'\n'")) ; Trx_runtime.Expected(("'\r'")) ])) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_677, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_677, ( () )), ((Trx_runtime.emptyError) (input_677))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\r'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\r")) ) else ( None )) (input) ("\"\r\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_675, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_675) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_675) (0))))) ('\n'))) (true)))) ) then ( Some(((((+)) (input_675) (1)), "\n")) ) else ( None )) (input_675) ("\"\n\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_676, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_676, ( () )), ((Trx_runtime.emptyError) (input_676))))))))))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<end of line>")))::([])))) in
(Hashtbl.add (memo_Trxparse_EOL_err) (input) (res)) ; res)
)
let rec try_Trxparse_Space =
#254 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Space_err) (input))
) with
Not_found -> let res = (match (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((=)) (c) (' '))) ((((=)) (c) ('\t')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) ([ Trx_runtime.Expected(("'\t'")) ; Trx_runtime.Expected(("' '")) ])) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_511, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_511, ( () )), ((Trx_runtime.emptyError) (input_511))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EOL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_510, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_510, ( () )), ((Trx_runtime.emptyError) (input_510)))))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Space_err) (input) (res)) ; res)
)
let rec try_Trxparse_mlcomment =
#250 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlcomment_err) (input))
) with
Not_found -> let res = (match (try_Trxparse_mlCOMMENTSTART (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_413, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_416 -> (match (try_Trxparse_mlCOMMENTSTOP (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_416)) with
Trx_runtime.Fail ( ( err ) ) -> let input_417 = input_416 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (match (match (try_Trxparse_mlcomment (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_417)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_420, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_420, __1), ((Trx_runtime.emptyError) (input_420))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_417) (_len)) ) then ( let c = ((_get_char) (input_417)) in
Some((((succ) (input_417)), c)) ) else ( None )) (input_417) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_419, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_419, ( () )), ((Trx_runtime.emptyError) (input_419)))))))))
| ( _ok ) as __pat_var -> __pat_var) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_418, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_418, __2), ((Trx_runtime.emptyError) (input_418)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_413)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_414, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_mlCOMMENTSTOP (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_414)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_415, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_415, ( () )), ((Trx_runtime.emptyError) (input_415))))))))))))) in
(Hashtbl.add (memo_Trxparse_mlcomment_err) (input) (res)) ; res)
)
and try_Trxparse_mlCOMMENTSTOP =
#252 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlCOMMENTSTOP_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) (')'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "*)")) ) else ( None )) (input) ("\"*)\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_421, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_421)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_422, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_422, ()), ((Trx_runtime.emptyError) (input_422)))))))))) in
(Hashtbl.add (memo_Trxparse_mlCOMMENTSTOP_err) (input) (res)) ; res)
)
and try_Trxparse_Spacing =
#245 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Spacing_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.while_primary (false) ((fun input_507 -> (match (match (try_Trxparse_Space (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_507)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_509, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_509, ( () )), ((Trx_runtime.emptyError) (input_509))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Comment (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_507)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_508, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_508, __1), ((Trx_runtime.emptyError) (input_508)))))))))
| ( _ok ) as __pat_var -> __pat_var))) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_506, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_506, __1), ((Trx_runtime.emptyError) (input_506)))))))) (input) (((Trx_runtime.Expected(("<spacing>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Spacing_err) (input) (res)) ; res)
)
and try_Trxparse_Comment =
#247 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Comment_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('#'))) (true)))) ) then ( Some(((((+)) (input) (1)), "#")) ) else ( None )) (input) ("\"#\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_744, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_749 -> (match (try_Trxparse_EOL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_749)) with
Trx_runtime.Fail ( ( err ) ) -> let input_750 = input_749 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_750) (_len)) ) then ( let c = ((_get_char) (input_750)) in
Some((((succ) (input_750)), c)) ) else ( None )) (input_750) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_751, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_751, __2), ((Trx_runtime.emptyError) (input_751)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_744)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_745, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (match (try_Trxparse_EOL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_745)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_748, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_748, __1), ((Trx_runtime.emptyError) (input_748))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EOF (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_745)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_747, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_747, __1), ((Trx_runtime.emptyError) (input_747)))))))))
| ( _ok ) as __pat_var -> __pat_var) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_746, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_746, ( () )), ((Trx_runtime.emptyError) (input_746))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_mlcomment (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_743, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_743, __1), ((Trx_runtime.emptyError) (input_743)))))))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<a comment>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Comment_err) (input) (res)) ; res)
)
and try_Trxparse_mlCOMMENTSTART =
#251 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlCOMMENTSTART_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('('))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "(*")) ) else ( None )) (input) ("\"(*\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_423, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_423)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_424, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_424, ()), ((Trx_runtime.emptyError) (input_424)))))))))) in
(Hashtbl.add (memo_Trxparse_mlCOMMENTSTART_err) (input) (res)) ; res)
)
let rec try_Trxparse_AND =
#228 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_AND_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('&')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'&'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_792, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_792)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_793, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_793, ()), ((Trx_runtime.emptyError) (input_793)))))))))) in
(Hashtbl.add (memo_Trxparse_AND_err) (input) (res)) ; res)
)
let rec try_Trxparse_NOT =
#229 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_NOT_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('!')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'!'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_572, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_572)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_573, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_573, ()), ((Trx_runtime.emptyError) (input_573)))))))))) in
(Hashtbl.add (memo_Trxparse_NOT_err) (input) (res)) ; res)
)
let rec try_Trxparse_PrefixElement =
#172 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_PrefixElement_err) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_AND (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_547, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_547,
#172 "trxparse.trx"
( `AND )), ((Trx_runtime.emptyError) (input_547))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_NOT (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_546, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_546,
#172 "trxparse.trx"
( `NOT )), ((Trx_runtime.emptyError) (input_546)))))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_PrefixElement_err) (input) (res)) ; res)
)
let rec try_Trxparse_Char =
#212 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Char_err) (input))
) with
Not_found -> let res = (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None )) (input) ("\"\\\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_780, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_780) (_len)) ) then ( let c = ((_get_char) (input_780)) in
if ( (((||)) ((((=)) (c) ('n'))) ((((||)) ((((=)) (c) ('r'))) ((((||)) ((((=)) (c) ('t'))) ((((||)) ((((=)) (c) ('\''))) ((((||)) ((((=)) (c) ('"'))) ((((||)) ((((=)) (c) ('\\'))) ((((||)) ((((=)) (c) ('['))) ((((||)) ((((=)) (c) (']'))) ((((=)) (c) ('-')))))))))))))))))) ) then ( Some((((succ) (input_780)), c)) ) else ( None ) ) else ( None )) (input_780) ([ Trx_runtime.Expected(("'\"'")) ; Trx_runtime.Expected(("'''")) ; Trx_runtime.Expected(("'-'")) ; Trx_runtime.Expected(("'['")) ; Trx_runtime.Expected(("'\\'")) ; Trx_runtime.Expected(("']'")) ; Trx_runtime.Expected(("'n'")) ; Trx_runtime.Expected(("'r'")) ; Trx_runtime.Expected(("'t'")) ])) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_781, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_781,
#212 "trxparse.trx"
( match __2 with 'n' -> '\n' | 'r' -> '\r' | 't' -> '\t' | x -> x )), ((Trx_runtime.emptyError) (input_781)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None )) (input) ("\"\\\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_777, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (true) ((fun input_779 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_779) (_len)) ) then ( let c = ((_get_char) (input_779)) in
if ( (((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9')))) ) then ( Some((((succ) (input_779)), c)) ) else ( None ) ) else ( None )) (input_779) (((Trx_runtime.Expected(("['0'-'9']")))::([])))))) (input_777)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_778, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_778,
#213 "trxparse.trx"
( char_of_int (int_of_chars __2) )), ((Trx_runtime.emptyError) (input_778)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('\\'))) (true)))) ) then ( Some(((((+)) (input) (1)), "\\")) ) else ( None )) (input) ("\"\\\"")) with
Trx_runtime.Fail ( ( err ) ) -> let input_775 = input in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_775) (_len)) ) then ( let c = ((_get_char) (input_775)) in
Some((((succ) (input_775)), c)) ) else ( None )) (input_775) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_776, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_776, __2), ((Trx_runtime.emptyError) (input_776)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err)))))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Char_err) (input) (res)) ; res)
)
let rec try_Trxparse_Literal =
#203 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Literal_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'''")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_585, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_589 -> (match (Trx_runtime.option_to_res_err (if ( (((<)) (input_589) (_len)) ) then ( let c = ((_get_char) (input_589)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input_589)), c)) ) else ( None ) ) else ( None )) (input_589) (((Trx_runtime.Expected(("'''")))::([])))) with
Trx_runtime.Fail ( ( err ) ) -> let input_590 = input_589 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Char (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_590)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_591, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_591,
#204 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_591)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_585)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_586, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_586) (_len)) ) then ( let c = ((_get_char) (input_586)) in
if ( (((=)) (c) ('\'')) ) then ( Some((((succ) (input_586)), c)) ) else ( None ) ) else ( None )) (input_586) (((Trx_runtime.Expected(("'''")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_587, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_587)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_588, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_588,
#204 "trxparse.trx"
( string_of_chars __2 )), ((Trx_runtime.emptyError) (input_588)))))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'\"'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_578, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_582 -> (match (Trx_runtime.option_to_res_err (if ( (((<)) (input_582) (_len)) ) then ( let c = ((_get_char) (input_582)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input_582)), c)) ) else ( None ) ) else ( None )) (input_582) (((Trx_runtime.Expected(("'\"'")))::([])))) with
Trx_runtime.Fail ( ( err ) ) -> let input_583 = input_582 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Char (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_583)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_584, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_584,
#205 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_584)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_578)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_579, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_579) (_len)) ) then ( let c = ((_get_char) (input_579)) in
if ( (((=)) (c) ('"')) ) then ( Some((((succ) (input_579)), c)) ) else ( None ) ) else ( None )) (input_579) (((Trx_runtime.Expected(("'\"'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_580, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_580)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_581, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_581,
#205 "trxparse.trx"
( string_of_chars __2 )), ((Trx_runtime.emptyError) (input_581))))))))))))))))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<literal>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Literal_err) (input) (res)) ; res)
)
let rec try_Trxparse_Filename =
#131 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Filename_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_Literal (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_651, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_651, __1), ((Trx_runtime.emptyError) (input_651))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (true) ((fun input_648 -> (match (try_Trxparse_Space (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_648)) with
Trx_runtime.Fail ( ( err ) ) -> let input_649 = input_648 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_649) (_len)) ) then ( let c = ((_get_char) (input_649)) in
Some((((succ) (input_649)), c)) ) else ( None )) (input_649) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_650, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_650, __2), ((Trx_runtime.emptyError) (input_650)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_647, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_647, (_get_sub (input) ((((-)) (input_647) (input))))), ((Trx_runtime.emptyError) (input_647)))))))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<file name>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Filename_err) (input) (res)) ; res)
)
let rec try_Trxparse_LBRACE =
#219 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LBRACE_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) (true)))) ) then ( Some(((((+)) (input) (1)), "{")) ) else ( None )) (input) ("\"{\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_596, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_596)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_597, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_597, ()), ((Trx_runtime.emptyError) (input_597)))))))))) in
(Hashtbl.add (memo_Trxparse_LBRACE_err) (input) (res)) ; res)
)
let rec try_Trxparse_RBRACE =
#220 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_RBRACE_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('}'))) (true)))) ) then ( Some(((((+)) (input) (1)), "}")) ) else ( None )) (input) ("\"}\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_527, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_527)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_528, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_528, ()), ((Trx_runtime.emptyError) (input_528)))))))))) in
(Hashtbl.add (memo_Trxparse_RBRACE_err) (input) (res)) ; res)
)
let rec try_Trxparse_Type =
#119 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Type_err) (input))
) with
Not_found -> let res = (match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_484, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_484) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_484) (0))))) (':'))) (true)))) ) then ( Some(((((+)) (input_484) (1)), ":")) ) else ( None )) (input_484) ("\":\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_485, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_485)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_486, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_LBRACE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_486)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_487, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_492 -> (match (try_Trxparse_RBRACE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_492)) with
Trx_runtime.Fail ( ( err ) ) -> let input_493 = input_492 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_493) (_len)) ) then ( let c = ((_get_char) (input_493)) in
Some((((succ) (input_493)), c)) ) else ( None )) (input_493) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_494, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_494, __2), ((Trx_runtime.emptyError) (input_494)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_487)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_491, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_491, (_get_sub (input_487) ((((-)) (input_491) (input_487))))), ((Trx_runtime.emptyError) (input_491))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_488, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_RBRACE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_488)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_489, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_489)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_490, __7 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_490, let t = __5 in
#119 "trxparse.trx"
( t )), ((Trx_runtime.emptyError) (input_490))))))))))))))))))))))))) in
(Hashtbl.add (memo_Trxparse_Type_err) (input) (res)) ; res)
)
let rec try_Trxparse_mlvar =
#127 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_mlvar_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((=)) (c) ('_')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) ([ Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['a'-'z']")) ])) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_410, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_412 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_412) (_len)) ) then ( let c = ((_get_char) (input_412)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_412)), c)) ) else ( None ) ) else ( None )) (input_412) ([ Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['0'-'9']")) ; Trx_runtime.Expected(("['A'-'Z']")) ; Trx_runtime.Expected(("['a'-'z']")) ])))) (input_410)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_411, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_411, (_get_sub (input) ((((-)) (input_411) (input))))), ((Trx_runtime.emptyError) (input_411))))))))))) (input) (((Trx_runtime.Expected(("<element name>")))::([])))) in
(Hashtbl.add (memo_Trxparse_mlvar_err) (input) (res)) ; res)
)
let rec try_Trxparse_Extra =
#121 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Extra_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (5))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('x'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('t'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('r'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('a'))) (true)))))))))))) ) then ( Some(((((+)) (input) (5)), "extra")) ) else ( None )) (input) ("\"extra\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_652, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Space (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_652)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_653, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_653)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_654, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_mlvar (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_654)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_655, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Type (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_655)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_656, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_656, let vartype = __5
and var = __4 in
#122 "trxparse.trx"
( var, vartype )), ((Trx_runtime.emptyError) (input_656)))))))))))))))))))) (input) (((Trx_runtime.Expected(("<extra directive>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Extra_err) (input) (res)) ; res)
)
let rec try_Trxparse_MARK_noerr =
#216 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('+')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ))
let rec try_Trxparse_memo_opt =
#87 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_memo_opt_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('$'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{$")) ) else ( None )) (input) ("\"{$\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_425, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((<)) ((((+)) (input_425) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input_425) (0)))) with
'S' -> Some(((((+)) (input_425) (1)), (MemoSuccess )))
| 'F' -> Some(((((+)) (input_425) (1)), (MemoFail )))
| '1' -> Some(((((+)) (input_425) (1)), (MemoFull )))
| '0' -> Some(((((+)) (input_425) (1)), (MemoNone )))
| _ -> None) ) else ( None )) (input_425) ("\"1\" or \"S\" or \"F\" or \"0\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_426, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_426) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_426) (0))))) ('}'))) (true)))) ) then ( Some(((((+)) (input_426) (1)), "}")) ) else ( None )) (input_426) ("\"}\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_427, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_427)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_428, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_428,
#94 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_428))))))))))))))))) (input) (((Trx_runtime.Expected(("<memoization annotation>")))::([])))) in
(Hashtbl.add (memo_Trxparse_memo_opt_err) (input) (res)) ; res)
)
let rec try_Trxparse_Filename_noerr =
#131 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Filename) (input))
) with
Not_found -> let res = (match (try_Trxparse_Literal_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> (match (Trx_runtime.while_primary_noerr_nores (true) ((fun input_251 -> (match (try_Trxparse_Space_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_251)) with
None -> let input_252 = input_251 in
let __1 = () in
if ( (((<)) (input_252) (_len)) ) then ( let c = ((_get_char) (input_252)) in
Some((((succ) (input_252)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_250, __1 ) ) -> Some((input_250, (_get_sub (input) ((((-)) (input_250) (input)))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Filename) (input) (res)) ; res)
)
let rec try_Trxparse_Names_noerr =
#196 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Names) (input))
) with
Not_found -> let res = (match (try_Trxparse_OPEN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_164, __1 ) ) -> (match (Trx_runtime.while_primary_noerr (false) ((fun input_167 -> (match (try_Trxparse_Name_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_167)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_168, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_168)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_169, __2 ) ) -> (match (match (try_Trxparse_COMMA_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_169)) with
None -> Some((input_169, None))
| Some ( ( input_171, r ) ) -> Some((input_171, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_170, __3 ) ) -> Some((input_170,
#196 "trxparse.trx"
( __1 )))))))) (input_164)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_165, __2 ) ) -> (match (try_Trxparse_CLOSE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_165)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_166, __3 ) ) -> Some((input_166,
#196 "trxparse.trx"
( __2 )))))) in
(Hashtbl.add (memo_Trxparse_Names) (input) (res)) ; res)
)
let rec try_Trxparse_IncludeRead_noerr =
#115 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_IncludeRead) (input))
) with
Not_found -> let res = (match if ( (((<)) ((((+)) (input) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input) (0)))) with
'r' -> if ( (((&&)) ((((<=)) ((((+)) (input) (4))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('d'))) (true)))))))) ) then ( Some(((((+)) (input) (4)), (PG.Read ))) ) else ( None )
| 'i' -> if ( (((&&)) ((((<=)) ((((+)) (input) (7))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('n'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('u'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('d'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) ('e'))) (true)))))))))))))) ) then ( Some(((((+)) (input) (7)), (PG.Incl ))) ) else ( None )
| _ -> None) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_203, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_203)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_204, __2 ) ) -> (match (try_Trxparse_Filename_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_204)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_205, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_205)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_206, __4 ) ) -> (match (match (match if ( (((&&)) ((((<=)) ((((+)) (input_206) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (0))))) ('g'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (1))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (2))))) ('o'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (3))))) ('b'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (4))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_206) (5))))) ('l'))) (true)))))))))))))) ) then ( Some(((((+)) (input_206) (6)), "global")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_208, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_208)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_209, __2 ) ) -> (match (try_Trxparse_Names_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_209)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_210, __3 ) ) -> Some((input_210,
#116 "trxparse.trx"
( __3 )))))) with
None -> Some((input_206, None))
| Some ( ( input_211, r ) ) -> Some((input_211, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_207, __5 ) ) -> Some((input_207,
#117 "trxparse.trx"
( __3, { PG.it = __1 ; gl = match __5 with Some l -> l | _ -> [] } )))))))) in
(Hashtbl.add (memo_Trxparse_IncludeRead) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_primary =
#80 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_primary_err) (input))
) with
Not_found -> let res = (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('/'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('*'))) (true)))))))) ) then ( Some(((((+)) (input) (3)), "/**")) ) else ( None )) (input) ("\"/**\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_481, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_481, __1), ((Trx_runtime.emptyError) (input_481))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_467, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_467)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_468, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_475 -> (match (match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_475)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_478, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_478) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_478) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_478) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_478) (2))))) ('/'))) (true)))))))) ) then ( Some(((((+)) (input_478) (3)), "**/")) ) else ( None )) (input_478) ("\"**/\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_480, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_480, __1), ((Trx_runtime.emptyError) (input_480))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_479, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_479, ()), ((Trx_runtime.emptyError) (input_479)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> let input_476 = input_475 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_476) (_len)) ) then ( let c = ((_get_char) (input_476)) in
Some((((succ) (input_476)), c)) ) else ( None )) (input_476) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_477, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_477, __2), ((Trx_runtime.emptyError) (input_477)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_468)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_474, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_474, (_get_sub (input_468) ((((-)) (input_474) (input_468))))), ((Trx_runtime.emptyError) (input_474))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_469, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_469)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_470, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_470) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_470) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_470) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_470) (2))))) ('/'))) (true)))))))) ) then ( Some(((((+)) (input_470) (3)), "**/")) ) else ( None )) (input_470) ("\"**/\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_473, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_473, __1), ((Trx_runtime.emptyError) (input_473))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_471, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_471)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_472, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_472,
#78 "trxparse.trx"
( __3 )), ((Trx_runtime.emptyError) (input_472)))))))))))))))))))))) in
(Hashtbl.add (memo_Trxparse_construct_name_primary_err) (input) (res)) ; res)
)
let rec try_Trxparse_KEEP_CACHE_noerr =
#217 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_KEEP_CACHE) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (8))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('<'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('i'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('h'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (7))))) ('>'))) (true)))))))))))))))))) ) then ( Some(((((+)) (input) (8)), "<icache>")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_201, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_201)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_202, __2 ) ) -> Some((input_202, ())))) in
(Hashtbl.add (memo_Trxparse_KEEP_CACHE) (input) (res)) ; res)
)
let rec try_Trxparse_EQUAL =
#238 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_EQUAL_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('=')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'='")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_673, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_673)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_674, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_674, ()), ((Trx_runtime.emptyError) (input_674)))))))))) in
(Hashtbl.add (memo_Trxparse_EQUAL_err) (input) (res)) ; res)
)
let rec try_Trxparse_SLASH =
#227 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SLASH_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('/')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'/'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_517, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_517)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_518, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_518, ()), ((Trx_runtime.emptyError) (input_518)))))))))) in
(Hashtbl.add (memo_Trxparse_SLASH_err) (input) (res)) ; res)
)
let rec try_Trxparse_CodeRange =
#157 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_CodeRange_err) (input))
) with
Not_found -> let res = (match (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) (':'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('_'))) (true)))))) ) then ( Some(((((+)) (input) (2)), ":_")) ) else ( None )) (input) ("\":_\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_753, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_753)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_754, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_754, ()), ((Trx_runtime.emptyError) (input_754)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_755, r ), err ) ) -> Trx_runtime.Ok(((input_755, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_752, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_752,
#157 "trxparse.trx"
( __1 <> None )), ((Trx_runtime.emptyError) (input_752))))))) in
(Hashtbl.add (memo_Trxparse_CodeRange_err) (input) (res)) ; res)
)
let rec try_Trxparse_DOLLAR =
#236 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DOLLAR_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('$')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'$'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_740, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_740)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_741, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_741, ()), ((Trx_runtime.emptyError) (input_741)))))))))) in
(Hashtbl.add (memo_Trxparse_DOLLAR_err) (input) (res)) ; res)
)
let rec try_Trxparse_BEGIN =
#221 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('{'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{{")) ) else ( None )) (input) ("\"{{\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_791, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_791, __1), ((Trx_runtime.emptyError) (input_791))))))))
let rec try_Trxparse_BEGIn =
#223 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('|'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{|")) ) else ( None )) (input) ("\"{|\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_790, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_790, __1), ((Trx_runtime.emptyError) (input_790))))))))
let rec try_Trxparse_END =
#222 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_END_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('}'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('}'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "}}")) ) else ( None )) (input) ("\"}}\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_681, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_681)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_682, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_682, ()), ((Trx_runtime.emptyError) (input_682)))))))))) in
(Hashtbl.add (memo_Trxparse_END_err) (input) (res)) ; res)
)
let rec try_Trxparse_ENd =
#224 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_ENd_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('|'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('}'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "|}")) ) else ( None )) (input) ("\"|}\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_679, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_679)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_680, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_680, ()), ((Trx_runtime.emptyError) (input_680)))))))))) in
(Hashtbl.add (memo_Trxparse_ENd_err) (input) (res)) ; res)
)
let rec try_Trxparse_StoppableCode =
#158 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_StoppableCode_err) (input))
) with
Not_found -> let res = (match (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('!'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('!'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "!!")) ) else ( None )) (input) ("\"!!\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_503, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_503)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_504, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_504, ()), ((Trx_runtime.emptyError) (input_504)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_505, r ), err ) ) -> Trx_runtime.Ok(((input_505, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_502, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_502,
#158 "trxparse.trx"
( __1 <> None )), ((Trx_runtime.emptyError) (input_502))))))) in
(Hashtbl.add (memo_Trxparse_StoppableCode_err) (input) (res)) ; res)
)
let rec try_Trxparse_DefaultCode =
#163 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefaultCode_err) (input))
) with
Not_found -> let res = (match (match (match (match (try_Trxparse_BEGIn (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_732, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_732, __1), ((Trx_runtime.emptyError) (input_732))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_720, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_720)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_721, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_StoppableCode (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_721)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_722, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CodeRange (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_722)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_723, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_728 -> (match (match (try_Trxparse_ENd (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_728)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_731, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_731, __1), ((Trx_runtime.emptyError) (input_731))))))) with
Trx_runtime.Fail ( ( err ) ) -> let input_729 = input_728 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_729) (_len)) ) then ( let c = ((_get_char) (input_729)) in
Some((((succ) (input_729)), c)) ) else ( None )) (input_729) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_730, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_730, __2), ((Trx_runtime.emptyError) (input_730)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_723)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_727, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_727, (_get_sub (input_723) ((((-)) (input_727) (input_723))))), ((Trx_runtime.emptyError) (input_727))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_724, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_ENd (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_724)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_726, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_726, __1), ((Trx_runtime.emptyError) (input_726))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_725, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_725,
#161 "trxparse.trx"
( __4, (if (__3 && _stoppable) or (not _stoppable) then __5 else sprintf "Some (%s)" __5) )), ((Trx_runtime.emptyError) (input_725)))))))))))))))))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_719, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_719,
#163 "trxparse.trx"
( let (u, v) = __1 in u, v, Some(current_location _file_name input), true )), ((Trx_runtime.emptyError) (input_719))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (match (try_Trxparse_BEGIN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_718, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_718, __1), ((Trx_runtime.emptyError) (input_718))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_706, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_706)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_707, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_StoppableCode (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_707)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_708, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CodeRange (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_708)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_709, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_714 -> (match (match (try_Trxparse_END (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_714)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_717, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_717, __1), ((Trx_runtime.emptyError) (input_717))))))) with
Trx_runtime.Fail ( ( err ) ) -> let input_715 = input_714 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_715) (_len)) ) then ( let c = ((_get_char) (input_715)) in
Some((((succ) (input_715)), c)) ) else ( None )) (input_715) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_716, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_716, __2), ((Trx_runtime.emptyError) (input_716)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_709)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_713, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_713, (_get_sub (input_709) ((((-)) (input_713) (input_709))))), ((Trx_runtime.emptyError) (input_713))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_710, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_END (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_710)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_712, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_712, __1), ((Trx_runtime.emptyError) (input_712))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_711, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_711,
#161 "trxparse.trx"
( __4, (if (__3 && _stoppable) or (not _stoppable) then __5 else sprintf "Some (%s)" __5) )), ((Trx_runtime.emptyError) (input_711)))))))))))))))))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_705, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_705,
#164 "trxparse.trx"
( let (u, v) = __1 in u, v, Some(current_location _file_name input), false )), ((Trx_runtime.emptyError) (input_705)))))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_DefaultCode_err) (input) (res)) ; res)
)
let rec try_Trxparse_Code =
#167 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Code_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_DefaultCode (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_765, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_765, __1), ((Trx_runtime.emptyError) (input_765))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('$'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('_'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "$_")) ) else ( None )) (input) ("\"$_\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_762, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CodeRange (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_762)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_763, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_763)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_764, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_764,
#169 "trxparse.trx"
( __2, ".sub", None, false )), ((Trx_runtime.emptyError) (input_764))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('$'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) (':'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "$:")) ) else ( None )) (input) ("\"$:\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_757, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (true) ((fun input_761 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_761) (_len)) ) then ( let c = ((_get_char) (input_761)) in
if ( (((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9')))) ) then ( Some((((succ) (input_761)), c)) ) else ( None ) ) else ( None )) (input_761) (((Trx_runtime.Expected(("['0'-'9']")))::([])))))) (input_757)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_760, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_760, (_get_sub (input_757) ((((-)) (input_760) (input_757))))), ((Trx_runtime.emptyError) (input_760))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_758, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_758)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_759, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_759,
#170 "trxparse.trx"
( true, sprintf "%s__%s" (if _stoppable then "Some " else "") __2, None, false )), ((Trx_runtime.emptyError) (input_759))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_DOLLAR (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_756, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_756,
#171 "trxparse.trx"
( false, sprintf "%s()" (if _stoppable then "Some " else ""), None, false )), ((Trx_runtime.emptyError) (input_756)))))))))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<rule production>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Code_err) (input) (res)) ; res)
)
let rec try_Trxparse_Prefix =
#174 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Prefix_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_PrefixElement (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_549, r ), err ) ) -> Trx_runtime.Ok(((input_549, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_548, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_548,
#175 "trxparse.trx"
( match __1 with None -> `NORMAL | Some x -> x )), ((Trx_runtime.emptyError) (input_548)))))))) (input) (((Trx_runtime.Expected(("<element's prefix>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Prefix_err) (input) (res)) ; res)
)
let rec try_Trxparse_CLOSE =
#234 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_CLOSE_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (')')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("')'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_786, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_786)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_787, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_787, ()), ((Trx_runtime.emptyError) (input_787)))))))))) in
(Hashtbl.add (memo_Trxparse_CLOSE_err) (input) (res)) ; res)
)
let rec try_Trxparse_Range =
#210 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Range_err) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_Char (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_522, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_522) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_522) (0))))) ('-'))) (true)))) ) then ( Some(((((+)) (input_522) (1)), "-")) ) else ( None )) (input_522) ("\"-\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_523, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Char (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_523)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_524, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_524,
#210 "trxparse.trx"
( Range (__1, __3) )), ((Trx_runtime.emptyError) (input_524))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Char (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_521, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_521,
#211 "trxparse.trx"
( One __1 )), ((Trx_runtime.emptyError) (input_521)))))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_Range_err) (input) (res)) ; res)
)
let rec try_Trxparse_Class =
#206 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Class_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('['))) (true)))) ) then ( Some(((((+)) (input) (1)), "[")) ) else ( None )) (input) ("\"[\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_766, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_766) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_766) (0))))) ('^'))) (true)))) ) then ( Some(((((+)) (input_766) (1)), "^")) ) else ( None )) (input_766) ("\"^\"")) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_766, None), err))
| Trx_runtime.Ok ( ( ( input_774, r ), err ) ) -> Trx_runtime.Ok(((input_774, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_767, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_771 -> (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_771) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_771) (0))))) (']'))) (true)))) ) then ( Some(((((+)) (input_771) (1)), "]")) ) else ( None )) (input_771) ("\"]\"")) with
Trx_runtime.Fail ( ( err ) ) -> let input_772 = input_771 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Range (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_772)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_773, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_773,
#207 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_773)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_767)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_768, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_768) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_768) (0))))) (']'))) (true)))) ) then ( Some(((((+)) (input_768) (1)), "]")) ) else ( None )) (input_768) ("\"]\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_769, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_769)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_770, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_770,
#207 "trxparse.trx"
( __3, (Option.is_some __2) )), ((Trx_runtime.emptyError) (input_770)))))))))))))))))))) (input) (((Trx_runtime.Expected(("<class of symbols>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Class_err) (input) (res)) ; res)
)
let rec try_Trxparse_DOT =
#235 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DOT_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('.')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'.'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_738, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_738)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_739, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_739, ()), ((Trx_runtime.emptyError) (input_739)))))))))) in
(Hashtbl.add (memo_Trxparse_DOT_err) (input) (res)) ; res)
)
let rec try_Trxparse_COMMA =
#239 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_COMMA_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (',')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("','")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_782, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_782)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_783, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_783, ()), ((Trx_runtime.emptyError) (input_783)))))))))) in
(Hashtbl.add (memo_Trxparse_COMMA_err) (input) (res)) ; res)
)
let rec try_Trxparse_OPEN =
#233 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_OPEN_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('(')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'('")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_559, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_559)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_560, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_560, ()), ((Trx_runtime.emptyError) (input_560)))))))))) in
(Hashtbl.add (memo_Trxparse_OPEN_err) (input) (res)) ; res)
)
let rec try_Trxparse_Module =
#194 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Module_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("['A'-'Z']")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_574, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_576 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_576) (_len)) ) then ( let c = ((_get_char) (input_576)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_576)), c)) ) else ( None ) ) else ( None )) (input_576) ([ Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['0'-'9']")) ; Trx_runtime.Expected(("['A'-'Z']")) ; Trx_runtime.Expected(("['a'-'z']")) ])))) (input_574)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_575, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_575, (_get_sub (input) ((((-)) (input_575) (input))))), ((Trx_runtime.emptyError) (input_575)))))))))) in
(Hashtbl.add (memo_Trxparse_Module_err) (input) (res)) ; res)
)
let rec try_Trxparse_Name =
#195 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Name_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((=)) (c) ('_')))))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) ([ Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['A'-'Z']")) ; Trx_runtime.Expected(("['a'-'z']")) ])) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_569, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_571 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_571) (_len)) ) then ( let c = ((_get_char) (input_571)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((=)) (c) ('_')))))))) ) then ( Some((((succ) (input_571)), c)) ) else ( None ) ) else ( None )) (input_571) ([ Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['0'-'9']")) ; Trx_runtime.Expected(("['A'-'Z']")) ; Trx_runtime.Expected(("['a'-'z']")) ])))) (input_569)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_570, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_570, (_get_sub (input) ((((-)) (input_570) (input))))), ((Trx_runtime.emptyError) (input_570)))))))))) in
(Hashtbl.add (memo_Trxparse_Name_err) (input) (res)) ; res)
)
let rec try_Trxparse_Identifier =
#198 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Identifier_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (match (try_Trxparse_Module (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_612, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_612) (_len)) ) then ( let c = ((_get_char) (input_612)) in
if ( (((=)) (c) ('.')) ) then ( Some((((succ) (input_612)), c)) ) else ( None ) ) else ( None )) (input_612) (((Trx_runtime.Expected(("'.'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_613, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Name (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_613)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_614, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_614,
#200 "trxparse.trx"
( __1 ^ "_" ^ __3 )), ((Trx_runtime.emptyError) (input_614))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Name (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_611, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_611,
#201 "trxparse.trx"
( _module_name ^ "_" ^ __1 )), ((Trx_runtime.emptyError) (input_611)))))))))
| ( _ok ) as __pat_var -> __pat_var) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_609, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_609)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_610, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_610,
#202 "trxparse.trx"
( __1 )), ((Trx_runtime.emptyError) (input_610))))))))))) (input) (((Trx_runtime.Expected(("<identifier>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Identifier_err) (input) (res)) ; res)
)
let rec try_Trxparse_LEFTARROW =
#225 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LEFTARROW_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('<'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('-'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "<-")) ) else ( None )) (input) ("\"<-\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_594, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_594)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_595, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_595, ()), ((Trx_runtime.emptyError) (input_595)))))))))) in
(Hashtbl.add (memo_Trxparse_LEFTARROW_err) (input) (res)) ; res)
)
let rec try_Trxparse_TILDE =
#237 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_TILDE_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('~')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'~'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_495, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_495)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_496, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_496, ()), ((Trx_runtime.emptyError) (input_496)))))))))) in
(Hashtbl.add (memo_Trxparse_TILDE_err) (input) (res)) ; res)
)
let rec try_Trxparse_PLUS =
#232 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_PLUS_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('+')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'+'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_550, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_550)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_551, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_551, ()), ((Trx_runtime.emptyError) (input_551)))))))))) in
(Hashtbl.add (memo_Trxparse_PLUS_err) (input) (res)) ; res)
)
let rec try_Trxparse_QUESTION =
#230 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_QUESTION_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('?')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'?'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_529, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_529)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_530, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_530, ()), ((Trx_runtime.emptyError) (input_530)))))))))) in
(Hashtbl.add (memo_Trxparse_QUESTION_err) (input) (res)) ; res)
)
let rec try_Trxparse_STAR =
#231 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_STAR_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('*')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'*'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_515, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_515)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_516, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_516, ()), ((Trx_runtime.emptyError) (input_516)))))))))) in
(Hashtbl.add (memo_Trxparse_STAR_err) (input) (res)) ; res)
)
let rec try_Trxparse_SuffixElement =
#173 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SuffixElement_err) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_QUESTION (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_499, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_499,
#173 "trxparse.trx"
( `QUESTION )), ((Trx_runtime.emptyError) (input_499))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_STAR (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_498, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_498,
#173 "trxparse.trx"
( `STAR )), ((Trx_runtime.emptyError) (input_498))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_PLUS (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_497, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_497,
#173 "trxparse.trx"
( `PLUS )), ((Trx_runtime.emptyError) (input_497)))))))))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_SuffixElement_err) (input) (res)) ; res)
)
let rec try_Trxparse_Suffix =
#176 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Suffix_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_SuffixElement (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_501, r ), err ) ) -> Trx_runtime.Ok(((input_501, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_500, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_500,
#177 "trxparse.trx"
( match __1 with None -> `NORMAL | Some x -> x )), ((Trx_runtime.emptyError) (input_500)))))))) (input) (((Trx_runtime.Expected(("<element's suffix>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Suffix_err) (input) (res)) ; res)
)
let rec try_Trxparse_Expression =
#134 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Expression_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (match (try_Trxparse_SLASH (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_672, r ), err ) ) -> Trx_runtime.Ok(((input_672, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_666, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Sequence (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_666)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_667, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_669 -> (match (try_Trxparse_SLASH (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_669)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_670, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Sequence (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_670)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_671, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_671,
#135 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_671)))))))))))) (input_667)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_668, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_668,
#135 "trxparse.trx"
( __2 :: __3 )), ((Trx_runtime.emptyError) (input_668)))))))))))))) (input) (Trx_runtime.Expected(("<rule body>")))) in
(Hashtbl.add (memo_Trxparse_Expression_err) (input) (res)) ; res)
)
and try_Trxparse_Sequence =
#145 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Sequence_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (try_Trxparse_item_list (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_512, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Code (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_512)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_512, None), err))
| Trx_runtime.Ok ( ( ( input_514, r ), err ) ) -> Trx_runtime.Ok(((input_514, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_513, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_513,
#146 "trxparse.trx"
( let liste, map = __1 in liste, map, __2 )), ((Trx_runtime.emptyError) (input_513))))))))))) (input) (((Trx_runtime.Expected(("<a sequence of parsing expressions>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Sequence_err) (input) (res)) ; res)
)
and try_Trxparse_Primary =
#178 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Primary_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_544, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_LEFTARROW (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_544)) with
Trx_runtime.Fail ( ( err ) ) -> let input_545 = input_544 in
let __2 = () in
(Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_545,
#179 "trxparse.trx"
( PG.Ident __1 )), ((Trx_runtime.emptyError) (input_545))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err)))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_OPEN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_539, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EQUAL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_539)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_540, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_540)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_541, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Exprs (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_541)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_542, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CLOSE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_542)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_543, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_543,
#180 "trxparse.trx"
( PG.Paren (PG.App (__3, __4)) )), ((Trx_runtime.emptyError) (input_543))))))))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_OPEN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_536, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_536)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_537, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CLOSE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_537)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_538, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_538,
#181 "trxparse.trx"
( PG.Paren (PG.Expr __2) )), ((Trx_runtime.emptyError) (input_538))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Literal (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_533, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_TILDE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_533)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_533, None), err))
| Trx_runtime.Ok ( ( ( input_535, r ), err ) ) -> Trx_runtime.Ok(((input_535, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_534, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_534,
#182 "trxparse.trx"
( PG.Literal (__1, Option.is_none __2) )), ((Trx_runtime.emptyError) (input_534)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Class (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_532, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_532,
#183 "trxparse.trx"
( let range, negation = __1 in
let _class = PG.Class range in
if negation then
PG.Paren (PG.Expr [[`NOT, _class, `NORMAL ; `NORMAL, PG.Class [Any], `NORMAL], StringMap.empty, None])
else
_class
)), ((Trx_runtime.emptyError) (input_532))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_DOT (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_531, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_531,
#190 "trxparse.trx"
( PG.Class [Any] )), ((Trx_runtime.emptyError) (input_531)))))))))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<parsing element>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Primary_err) (input) (res)) ; res)
)
and try_Trxparse_Exprs =
#106 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Exprs_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_OPEN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_659, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_659)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_660, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_663 -> (match (try_Trxparse_COMMA (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_663)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_664, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_664)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_665, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_665,
#107 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_665)))))))))))) (input_660)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_661, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CLOSE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_661)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_662, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_662,
#107 "trxparse.trx"
( __2 :: __3 )), ((Trx_runtime.emptyError) (input_662)))))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_OPEN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> let input_657 = input in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_657)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_658, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_658,
#108 "trxparse.trx"
( [ __2 ] )), ((Trx_runtime.emptyError) (input_658)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err)))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<list of expressions>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Exprs_err) (input) (res)) ; res)
)
and try_Trxparse_item_list =
#137 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_item_list_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.while_primary (true) ((fun input_439 -> (match (try_Trxparse_Prefix (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_439)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_440, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Primary (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_440)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_441, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Suffix (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_441)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_442, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_442)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_444, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_444) (_len)) ) then ( let c = ((_get_char) (input_444)) in
if ( (((=)) (c) (':')) ) then ( Some((((succ) (input_444)), c)) ) else ( None ) ) else ( None )) (input_444) (((Trx_runtime.Expected(("':'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_445, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_err (if ( (((<)) (input_445) (_len)) ) then ( let c = ((_get_char) (input_445)) in
if ( (((=)) (c) ('_')) ) then ( Some((((succ) (input_445)), c)) ) else ( None ) ) else ( None )) (input_445) (((Trx_runtime.Expected(("'_'")))::([])))) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_445, None), err))
| Trx_runtime.Ok ( ( ( input_450, r ), err ) ) -> Trx_runtime.Ok(((input_450, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_446, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_446)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_447, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_mlvar (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_447)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_448, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_448)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_449, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_449,
#137 "trxparse.trx"
( __5, __3 <> None )), ((Trx_runtime.emptyError) (input_449)))))))))))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_442, None), err))
| Trx_runtime.Ok ( ( ( input_451, r ), err ) ) -> Trx_runtime.Ok(((input_451, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_443, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_443,
#137 "trxparse.trx"
( (__1, __2, __3), __4 )), ((Trx_runtime.emptyError) (input_443)))))))))))))))))) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_438, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_438,
#138 "trxparse.trx"
( List.fold_left_i (
fun (liste,map) (item, option) num ->
match option with
None -> (liste @ [item]), map
| Some (label, b) -> (liste @ [item]), (StringMap.add label ((string_of_int (num+1)),b) map)
) ([], StringMap.empty) __1 )), ((Trx_runtime.emptyError) (input_438))))))) in
(Hashtbl.add (memo_Trxparse_item_list_err) (input) (res)) ; res)
)
let rec try_Trxparse_LET =
#243 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LET_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('t'))) (true)))))))) ) then ( Some(((((+)) (input) (3)), "let")) ) else ( None )) (input) ("\"let\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_592, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_592)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_593, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_593, ()), ((Trx_runtime.emptyError) (input_593)))))))))) in
(Hashtbl.add (memo_Trxparse_LET_err) (input) (res)) ; res)
)
let rec try_Trxparse_SEMI =
#240 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SEMI_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (';')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("';'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_519, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_519)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_520, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_520, ()), ((Trx_runtime.emptyError) (input_520)))))))))) in
(Hashtbl.add (memo_Trxparse_SEMI_err) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_secondary =
#81 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_secondary_err) (input))
) with
Not_found -> let res = (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('/'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "/*")) ) else ( None )) (input) ("\"/*\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_466, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_466, __1), ((Trx_runtime.emptyError) (input_466))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_452, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_452)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_453, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_460 -> (match (match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_460)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_463, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_463) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_463) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_463) (1))))) ('/'))) (true)))))) ) then ( Some(((((+)) (input_463) (2)), "*/")) ) else ( None )) (input_463) ("\"*/\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_465, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_465, __1), ((Trx_runtime.emptyError) (input_465))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_464, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_464, ()), ((Trx_runtime.emptyError) (input_464)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> let input_461 = input_460 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_461) (_len)) ) then ( let c = ((_get_char) (input_461)) in
Some((((succ) (input_461)), c)) ) else ( None )) (input_461) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_462, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_462, __2), ((Trx_runtime.emptyError) (input_462)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_453)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_459, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_459, (_get_sub (input_453) ((((-)) (input_459) (input_453))))), ((Trx_runtime.emptyError) (input_459))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_454, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_454)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_455, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_455) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_455) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_455) (1))))) ('/'))) (true)))))) ) then ( Some(((((+)) (input_455) (2)), "*/")) ) else ( None )) (input_455) ("\"*/\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_458, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_458, __1), ((Trx_runtime.emptyError) (input_458))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_456, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_456)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_457, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_457,
#78 "trxparse.trx"
( __3 )), ((Trx_runtime.emptyError) (input_457)))))))))))))))))))))) in
(Hashtbl.add (memo_Trxparse_construct_name_secondary_err) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_opt =
#83 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_opt_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_construct_name_primary (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_483, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_483,
#84 "trxparse.trx"
( PrimaryName __1 )), ((Trx_runtime.emptyError) (input_483))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_construct_name_secondary (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_482, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_482,
#85 "trxparse.trx"
( SecondaryName __1 )), ((Trx_runtime.emptyError) (input_482)))))))))
| ( _ok ) as __pat_var -> __pat_var)) (input) (((Trx_runtime.Expected(("<optional rule name>")))::([])))) in
(Hashtbl.add (memo_Trxparse_construct_name_opt_err) (input) (res)) ; res)
)
let rec try_Trxparse_rule_annots =
#96 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_rule_annots_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (match (try_Trxparse_construct_name_opt (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_406, r ), err ) ) -> Trx_runtime.Ok(((input_406, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_403, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_memo_opt (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_403)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_403, None), err))
| Trx_runtime.Ok ( ( ( input_405, r ), err ) ) -> Trx_runtime.Ok(((input_405, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_404, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_404,
#98 "trxparse.trx"
( let name = match __1 with Some r -> r | None -> NoName in
let memo = match __2 with Some m -> m | None -> MemoNoInfo in
{ rule_name = name; rule_memo = memo }
)), ((Trx_runtime.emptyError) (input_404))))))))))) (input) (((Trx_runtime.Expected(("<rule annotations>")))::([])))) in
(Hashtbl.add (memo_Trxparse_rule_annots_err) (input) (res)) ; res)
)
let rec try_Trxparse_Function =
#110 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Function_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (try_Trxparse_rule_annots (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_638, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_LET (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_638)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_639, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_639)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_640, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (true) ((fun input_646 -> (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_646)))) (input_640)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_641, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EQUAL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_641)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_642, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_642)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_643, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_SEMI (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_643)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_643, None), err))
| Trx_runtime.Ok ( ( ( input_645, r ), err ) ) -> Trx_runtime.Ok(((input_645, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_644, __7 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_644,
#112 "trxparse.trx"
( (__3, ({ PG.vars = __4 ; expr = PG.Expr __6 }, __1)) )), ((Trx_runtime.emptyError) (input_644)))))))))))))))))))))))))) (input) (Trx_runtime.Expected(("<TRX function>")))) in
(Hashtbl.add (memo_Trxparse_Function_err) (input) (res)) ; res)
)
let rec try_Trxparse_KEEP_CACHE =
#217 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_KEEP_CACHE_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (8))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('<'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('i'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('h'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (7))))) ('>'))) (true)))))))))))))))))) ) then ( Some(((((+)) (input) (8)), "<icache>")) ) else ( None )) (input) ("\"<icache>\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_598, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_598)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_599, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_599, ()), ((Trx_runtime.emptyError) (input_599)))))))))) in
(Hashtbl.add (memo_Trxparse_KEEP_CACHE_err) (input) (res)) ; res)
)
let rec try_Trxparse_LBRACE_noerr =
#219 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LBRACE) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) (true)))) ) then ( Some(((((+)) (input) (1)), "{")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_199, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_199)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_200, __2 ) ) -> Some((input_200, ())))) in
(Hashtbl.add (memo_Trxparse_LBRACE) (input) (res)) ; res)
)
let rec try_Trxparse_DefaultCodeNoStop_noerr =
#165 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefaultCodeNoStop) (input))
) with
Not_found -> let res = (match (try_Trxparse_BEGIN_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_301, __1 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_305 -> (match (try_Trxparse_END_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_305)) with
None -> let input_306 = input_305 in
let __1 = () in
if ( (((<)) (input_306) (_len)) ) then ( let c = ((_get_char) (input_306)) in
Some((((succ) (input_306)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_301)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_304, __1 ) ) -> Some((input_304, (_get_sub (input_301) ((((-)) (input_304) (input_301))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_302, __2 ) ) -> (match (try_Trxparse_END_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_302)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_303, __3 ) ) -> Some((input_303,
#165 "trxparse.trx"
( __2 )))))) in
(Hashtbl.add (memo_Trxparse_DefaultCodeNoStop) (input) (res)) ; res)
)
let rec try_Trxparse_HeaderCode_noerr =
#150 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_HeaderCode) (input))
) with
Not_found -> let res = (match if ( (((<)) ((((+)) (input) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input) (0)))) with
't' -> if ( (((&&)) ((((<=)) ((((+)) (input) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('y'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('p'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) (':'))) (true)))))))))))) ) then ( Some(((((+)) (input) (6)), (fun x -> `types x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| 'i' -> if ( (((&&)) ((((<=)) ((((+)) (input) (7))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('n'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('i'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('d'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) (':'))) (true)))))))))))))) ) then ( Some(((((+)) (input) (7)), (fun x -> `inside x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| 'd' -> if ( (((&&)) ((((<=)) ((((+)) (input) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) (':'))) (true)))))))))))) ) then ( Some(((((+)) (input) (6)), (fun x -> `decls x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| _ -> Some(((((+)) (input) (0)), (fun x -> `normal x)))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_218, __1 ) ) -> (match (try_Trxparse_DefaultCodeNoStop_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_218)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_219, __2 ) ) -> Some((input_219, let variant = __1
and code = __2 in
#155 "trxparse.trx"
( variant code, Some (current_location _file_name input) ))))) in
(Hashtbl.add (memo_Trxparse_HeaderCode) (input) (res)) ; res)
)
let rec try_Trxparse_LET_noerr =
#243 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_LET) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('t'))) (true)))))))) ) then ( Some(((((+)) (input) (3)), "let")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_195, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_195)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_196, __2 ) ) -> Some((input_196, ())))) in
(Hashtbl.add (memo_Trxparse_LET) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_primary_noerr =
#80 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_primary) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('/'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('*'))) (true)))))))) ) then ( Some(((((+)) (input) (3)), "/**")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_70, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_70)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_71, __2 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_78 -> (match (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_78)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_81, __1 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_81) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_81) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_81) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_81) (2))))) ('/'))) (true)))))))) ) then ( Some(((((+)) (input_81) (3)), "**/")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_82, __2 ) ) -> Some((input_82, ())))) with
None -> let input_79 = input_78 in
let __1 = () in
if ( (((<)) (input_79) (_len)) ) then ( let c = ((_get_char) (input_79)) in
Some((((succ) (input_79)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_71)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_77, __1 ) ) -> Some((input_77, (_get_sub (input_71) ((((-)) (input_77) (input_71))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_72, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_72)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_73, __4 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_73) (3))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_73) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_73) (1))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_73) (2))))) ('/'))) (true)))))))) ) then ( Some(((((+)) (input_73) (3)), "**/")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_74, __5 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_74)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_75, __6 ) ) -> Some((input_75,
#78 "trxparse.trx"
( __3 ))))))))) in
(Hashtbl.add (memo_Trxparse_construct_name_primary) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_secondary_noerr =
#81 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_secondary) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('/'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('*'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "/*")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_55, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_55)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_56, __2 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_63 -> (match (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_63)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_66, __1 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_66) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_66) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_66) (1))))) ('/'))) (true)))))) ) then ( Some(((((+)) (input_66) (2)), "*/")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_67, __2 ) ) -> Some((input_67, ())))) with
None -> let input_64 = input_63 in
let __1 = () in
if ( (((<)) (input_64) (_len)) ) then ( let c = ((_get_char) (input_64)) in
Some((((succ) (input_64)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_56)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_62, __1 ) ) -> Some((input_62, (_get_sub (input_56) ((((-)) (input_62) (input_56))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_57, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_57)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_58, __4 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_58) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_58) (0))))) ('*'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_58) (1))))) ('/'))) (true)))))) ) then ( Some(((((+)) (input_58) (2)), "*/")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_59, __5 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_59)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_60, __6 ) ) -> Some((input_60,
#78 "trxparse.trx"
( __3 ))))))))) in
(Hashtbl.add (memo_Trxparse_construct_name_secondary) (input) (res)) ; res)
)
let rec try_Trxparse_construct_name_opt_noerr =
#83 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_construct_name_opt) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_construct_name_primary_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_86, __1 ) ) -> Some((input_86,
#84 "trxparse.trx"
( PrimaryName __1 )))) with
None -> (match (try_Trxparse_construct_name_secondary_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_85, __1 ) ) -> Some((input_85,
#85 "trxparse.trx"
( SecondaryName __1 ))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_construct_name_opt) (input) (res)) ; res)
)
let rec try_Trxparse_DEBUG =
#218 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('%')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'%'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_742, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_742, __1), ((Trx_runtime.emptyError) (input_742))))))))
let rec try_Trxparse_DefExpr =
#103 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefExpr_err) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_LEFTARROW (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_736, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Expression (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_736)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_737, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_737,
#103 "trxparse.trx"
( PG.Expr __2 )), ((Trx_runtime.emptyError) (input_737)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EQUAL (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_733, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_733)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_734, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Exprs (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_734)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_735, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_735,
#104 "trxparse.trx"
( PG.App (__2, __3) )), ((Trx_runtime.emptyError) (input_735)))))))))))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_DefExpr_err) (input) (res)) ; res)
)
let rec try_Trxparse_MARK =
#216 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('+')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("'+'")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_577, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_577, __1), ((Trx_runtime.emptyError) (input_577))))))))
let rec try_Trxparse_Definition =
#62 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Definition_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (match (try_Trxparse_SEMI (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input, None), err))
| Trx_runtime.Ok ( ( ( input_697, r ), err ) ) -> Trx_runtime.Ok(((input_697, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_683, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_rule_annots (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_683)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_684, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_KEEP_CACHE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_684)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_684, None), err))
| Trx_runtime.Ok ( ( ( input_696, r ), err ) ) -> Trx_runtime.Ok(((input_696, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_685, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_DEBUG (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_685)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_685, None), err))
| Trx_runtime.Ok ( ( ( input_695, r ), err ) ) -> Trx_runtime.Ok(((input_695, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_686, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_MARK (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_686)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_686, None), err))
| Trx_runtime.Ok ( ( ( input_694, r ), err ) ) -> Trx_runtime.Ok(((input_694, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_687, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Identifier (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_687)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_688, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Type (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_688)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_688, None), err))
| Trx_runtime.Ok ( ( ( input_693, r ), err ) ) -> Trx_runtime.Ok(((input_693, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_689, __7 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_DefExpr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_689)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_690, __8 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_SEMI (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_690)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_690, None), err))
| Trx_runtime.Ok ( ( ( input_692, r ), err ) ) -> Trx_runtime.Ok(((input_692, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_691, __9 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_691, let rtype = __7
and mark = __5
and id = __6
and expr = __8
and debug = __4
and cache = __3
and annots = __2 in
#64 "trxparse.trx"
( let entry =
{ PG.expression = expr
; debug = debug <> None
; mark = mark <> None
; retain_cache = cache <> None
; rule_type = rtype
; origin = Some (current_location _file_name input)
}
in
(id, (entry, annots))
)), ((Trx_runtime.emptyError) (input_691)))))))))))))))))))))))))))))))) (input) (Trx_runtime.Expected(("<TRX rule>")))) in
(Hashtbl.add (memo_Trxparse_Definition_err) (input) (res)) ; res)
)
let rec try_Trxparse_DefaultCodeNoStop =
#165 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefaultCodeNoStop_err) (input))
) with
Not_found -> let res = (match (try_Trxparse_BEGIN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_698, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (Trx_runtime.while_primary_nores (false) ((fun input_702 -> (match (try_Trxparse_END (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_702)) with
Trx_runtime.Fail ( ( err ) ) -> let input_703 = input_702 in
let __1 = () in
(Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input_703) (_len)) ) then ( let c = ((_get_char) (input_703)) in
Some((((succ) (input_703)), c)) ) else ( None )) (input_703) (((Trx_runtime.Expected(("any character")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_704, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_704, __2), ((Trx_runtime.emptyError) (input_704)))))))))
| Trx_runtime.Ok ( ( ( _, _ ), err ) ) -> let err = err in
Trx_runtime.Fail((err))))) (input_698)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_701, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_701, (_get_sub (input_698) ((((-)) (input_701) (input_698))))), ((Trx_runtime.emptyError) (input_701))))))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_699, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_END (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_699)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_700, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_700,
#165 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_700))))))))))))) in
(Hashtbl.add (memo_Trxparse_DefaultCodeNoStop_err) (input) (res)) ; res)
)
let rec try_Trxparse_HeaderCode =
#150 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_HeaderCode_err) (input))
) with
Not_found -> let res = (match (Trx_runtime.option_to_res_msg (if ( (((<)) ((((+)) (input) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input) (0)))) with
't' -> if ( (((&&)) ((((<=)) ((((+)) (input) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('y'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('p'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) (':'))) (true)))))))))))) ) then ( Some(((((+)) (input) (6)), (fun x -> `types x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| 'i' -> if ( (((&&)) ((((<=)) ((((+)) (input) (7))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('n'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('i'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('d'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) (':'))) (true)))))))))))))) ) then ( Some(((((+)) (input) (7)), (fun x -> `inside x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| 'd' -> if ( (((&&)) ((((<=)) ((((+)) (input) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('s'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) (':'))) (true)))))))))))) ) then ( Some(((((+)) (input) (6)), (fun x -> `decls x))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )
| _ -> Some(((((+)) (input) (0)), (fun x -> `normal x)))) ) else ( Some(((((+)) (input) (0)), (fun x -> `normal x))) )) (input) ("\"\" or \"decls:\" or \"types:\" or \"inside:\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_615, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_DefaultCodeNoStop (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_615)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_616, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_616, let variant = __1
and code = __2 in
#155 "trxparse.trx"
( variant code, Some (current_location _file_name input) )), ((Trx_runtime.emptyError) (input_616)))))))))) in
(Hashtbl.add (memo_Trxparse_HeaderCode_err) (input) (res)) ; res)
)
let rec try_Trxparse_Names =
#196 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Names_err) (input))
) with
Not_found -> let res = (match (try_Trxparse_OPEN (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_561, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary (false) ((fun input_564 -> (match (try_Trxparse_Name (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_564)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_565, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_565)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_566, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_COMMA (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_566)) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_566, None), err))
| Trx_runtime.Ok ( ( ( input_568, r ), err ) ) -> Trx_runtime.Ok(((input_568, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_567, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_567,
#196 "trxparse.trx"
( __1 )), ((Trx_runtime.emptyError) (input_567))))))))))))))) (input_561)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_562, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_CLOSE (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_562)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_563, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_563,
#196 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_563))))))))))))) in
(Hashtbl.add (memo_Trxparse_Names_err) (input) (res)) ; res)
)
let rec try_Trxparse_IncludeRead =
#115 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_IncludeRead_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (Trx_runtime.option_to_res_msg (if ( (((<)) ((((+)) (input) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input) (0)))) with
'r' -> if ( (((&&)) ((((<=)) ((((+)) (input) (4))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('d'))) (true)))))))) ) then ( Some(((((+)) (input) (4)), (PG.Read ))) ) else ( None )
| 'i' -> if ( (((&&)) ((((<=)) ((((+)) (input) (7))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('n'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('c'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('u'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (5))))) ('d'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (6))))) ('e'))) (true)))))))))))))) ) then ( Some(((((+)) (input) (7)), (PG.Incl ))) ) else ( None )
| _ -> None) ) else ( None )) (input) ("\"read\" or \"include\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_600, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_600)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_601, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Filename (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_601)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_602, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_602)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_603, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_603) (6))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (0))))) ('g'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (1))))) ('l'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (2))))) ('o'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (3))))) ('b'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (4))))) ('a'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_603) (5))))) ('l'))) (true)))))))))))))) ) then ( Some(((((+)) (input_603) (6)), "global")) ) else ( None )) (input_603) ("\"global\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_605, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_605)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_606, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Names (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_606)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_607, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_607,
#116 "trxparse.trx"
( __3 )), ((Trx_runtime.emptyError) (input_607))))))))))))) with
Trx_runtime.Fail ( ( err ) ) -> Trx_runtime.Ok(((input_603, None), err))
| Trx_runtime.Ok ( ( ( input_608, r ), err ) ) -> Trx_runtime.Ok(((input_608, Some((r))), err))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_604, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_604,
#117 "trxparse.trx"
( __3, { PG.it = __1 ; gl = match __5 with Some l -> l | _ -> [] } )), ((Trx_runtime.emptyError) (input_604)))))))))))))))))))) (input) (Trx_runtime.Expected(("<include directive>")))) in
(Hashtbl.add (memo_Trxparse_IncludeRead_err) (input) (res)) ; res)
)
let rec try_Trxparse_optionType =
#129 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_optionType_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_err (if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None )) (input) (((Trx_runtime.Expected(("['a'-'z']")))::([])))) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_407, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.while_primary_nores (false) ((fun input_409 -> (Trx_runtime.option_to_res_err (if ( (((<)) (input_409) (_len)) ) then ( let c = ((_get_char) (input_409)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((||)) ((((=)) (c) ('_'))) ((((=)) (c) ('-')))))))))) ) then ( Some((((succ) (input_409)), c)) ) else ( None ) ) else ( None )) (input_409) ([ Trx_runtime.Expected(("'-'")) ; Trx_runtime.Expected(("'_'")) ; Trx_runtime.Expected(("['0'-'9']")) ; Trx_runtime.Expected(("['A'-'Z']")) ; Trx_runtime.Expected(("['a'-'z']")) ])))) (input_407)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_408, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_408, (_get_sub (input) ((((-)) (input_408) (input))))), ((Trx_runtime.emptyError) (input_408))))))))))) (input) (((Trx_runtime.Expected(("<TRX option name>")))::([])))) in
(Hashtbl.add (memo_Trxparse_optionType_err) (input) (res)) ; res)
)
let rec try_Trxparse_Option =
#124 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Option_err) (input))
) with
Not_found -> let res = (Trx_runtime.decorateConstruct ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('%'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('%'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "%%")) ) else ( None )) (input) ("\"%%\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_552, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_optionType (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_552)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_553, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_553)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_554, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (Trx_runtime.option_to_res_msg (if ( (((&&)) ((((<=)) ((((+)) (input_554) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_554) (0))))) ('='))) (true)))) ) then ( Some(((((+)) (input_554) (1)), "=")) ) else ( None )) (input_554) ("\"=\"")) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_555, __4 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_555)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_556, __5 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_mlvar (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_556)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_557, __6 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_557)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_558, __7 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_558,
#125 "trxparse.trx"
( __2, __6 )), ((Trx_runtime.emptyError) (input_558)))))))))))))))))))))))))) (input) (((Trx_runtime.Expected(("<TRX option>")))::([])))) in
(Hashtbl.add (memo_Trxparse_Option_err) (input) (res)) ; res)
)
let rec try_Trxparse_GElems =
#35 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_GElems_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (match (try_Trxparse_IncludeRead (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_631, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_631)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_632, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_632,
#36 "trxparse.trx"
( let key, id = __1 in { __2 with PG.incl = StringMap.add key id __2.PG.incl } )), ((Trx_runtime.emptyError) (input_632)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Extra (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_629, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_629)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_630, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_630,
#37 "trxparse.trx"
( { __2 with PG.pextra = __1 :: __2.PG.pextra } )), ((Trx_runtime.emptyError) (input_630)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Option (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_627, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_627)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_628, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_628,
#38 "trxparse.trx"
( { __2 with PG.poptions = __1 :: __2.PG.poptions } )), ((Trx_runtime.emptyError) (input_628)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_HeaderCode (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_625, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_625)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_626, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_626,
#39 "trxparse.trx"
( { __2 with PG.pheader = __1 :: __2.PG.pheader } )), ((Trx_runtime.emptyError) (input_626)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Function (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_623, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_623)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_624, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_624,
#40 "trxparse.trx"
( add_function __2 __1 )), ((Trx_runtime.emptyError) (input_624)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (match (try_Trxparse_Definition (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_621, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_621)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_622, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_622,
#41 "trxparse.trx"
( add_definition __2 __1 )), ((Trx_runtime.emptyError) (input_622)))))))))) with
Trx_runtime.Fail ( ( err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_620, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_620,
#42 "trxparse.trx"
( _grammar )), ((Trx_runtime.emptyError) (input_620)))))))))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)))
| ( _ok ) as __pat_var -> __pat_var)) (input) (Trx_runtime.Expected(("<list of TRX elements>")))) in
(Hashtbl.add (memo_Trxparse_GElems_err) (input) (res)) ; res)
)
let rec try_Trxparse_Grammar =
#32 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Grammar_err) (input))
) with
Not_found -> let res = (Trx_runtime.setMainConstruct ((match (try_Trxparse_Spacing (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_617, __1 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_GElems (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_617)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_618, __2 ), err ) ) -> (Trx_runtime.addErrorInfo (err) ((match (try_Trxparse_EOF (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_618)) with
( Trx_runtime.Fail ( ( _err ) ) ) as __pat_var -> __pat_var
| Trx_runtime.Ok ( ( ( input_619, __3 ), err ) ) -> (Trx_runtime.addErrorInfo (err) (Trx_runtime.Ok(((input_619,
#33 "trxparse.trx"
( __2 )), ((Trx_runtime.emptyError) (input_619)))))))))))))) (input) (Trx_runtime.Expected(("<TRX grammar>")))) in
(Hashtbl.add (memo_Trxparse_Grammar_err) (input) (res)) ; res)
)
let rec try_Trxparse_RBRACE_noerr =
#220 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_RBRACE) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('}'))) (true)))) ) then ( Some(((((+)) (input) (1)), "}")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_130, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_130)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_131, __2 ) ) -> Some((input_131, ())))) in
(Hashtbl.add (memo_Trxparse_RBRACE) (input) (res)) ; res)
)
let rec try_Trxparse_Type_noerr =
#119 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Type) (input))
) with
Not_found -> let res = (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_87, __1 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_87) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_87) (0))))) (':'))) (true)))) ) then ( Some(((((+)) (input_87) (1)), ":")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_88, __2 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_88)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_89, __3 ) ) -> (match (try_Trxparse_LBRACE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_89)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_90, __4 ) ) -> (match (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_95 -> (match (try_Trxparse_RBRACE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_95)) with
None -> let input_96 = input_95 in
let __1 = () in
if ( (((<)) (input_96) (_len)) ) then ( let c = ((_get_char) (input_96)) in
Some((((succ) (input_96)), c)) ) else ( None )
| Some ( ( _, _ ) ) -> None))) (input_90)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_94, __1 ) ) -> Some((input_94, (_get_sub (input_90) ((((-)) (input_94) (input_90))))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_91, __5 ) ) -> (match (try_Trxparse_RBRACE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_91)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_92, __6 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_92)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_93, __7 ) ) -> Some((input_93, let t = __5 in
#119 "trxparse.trx"
( t )))))))))) in
(Hashtbl.add (memo_Trxparse_Type) (input) (res)) ; res)
)
let rec try_Trxparse_memo_opt_noerr =
#87 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_memo_opt) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('{'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('$'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "{$")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_28, __1 ) ) -> (match if ( (((<)) ((((+)) (input_28) (0))) (_len)) ) then ( (match ((_get_char) ((((+)) (input_28) (0)))) with
'S' -> Some(((((+)) (input_28) (1)), (MemoSuccess )))
| 'F' -> Some(((((+)) (input_28) (1)), (MemoFail )))
| '1' -> Some(((((+)) (input_28) (1)), (MemoFull )))
| '0' -> Some(((((+)) (input_28) (1)), (MemoNone )))
| _ -> None) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_29, __2 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_29) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_29) (0))))) ('}'))) (true)))) ) then ( Some(((((+)) (input_29) (1)), "}")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_30, __3 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_30)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_31, __4 ) ) -> Some((input_31,
#94 "trxparse.trx"
( __2 ))))))) in
(Hashtbl.add (memo_Trxparse_memo_opt) (input) (res)) ; res)
)
let rec try_Trxparse_rule_annots_noerr =
#96 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_rule_annots) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_construct_name_opt_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> Some((input, None))
| Some ( ( input_9, r ) ) -> Some((input_9, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_6, __1 ) ) -> (match (match (try_Trxparse_memo_opt_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_6)) with
None -> Some((input_6, None))
| Some ( ( input_8, r ) ) -> Some((input_8, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_7, __2 ) ) -> Some((input_7,
#98 "trxparse.trx"
( let name = match __1 with Some r -> r | None -> NoName in
let memo = match __2 with Some m -> m | None -> MemoNoInfo in
{ rule_name = name; rule_memo = memo }
))))) in
(Hashtbl.add (memo_Trxparse_rule_annots) (input) (res)) ; res)
)
let rec try_Trxparse_SEMI_noerr =
#240 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_SEMI) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) (';')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_122, __1 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_122)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_123, __2 ) ) -> Some((input_123, ())))) in
(Hashtbl.add (memo_Trxparse_SEMI) (input) (res)) ; res)
)
let rec try_Trxparse_Function_noerr =
#110 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Function) (input))
) with
Not_found -> let res = (match (try_Trxparse_rule_annots_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_241, __1 ) ) -> (match (try_Trxparse_LET_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_241)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_242, __2 ) ) -> (match (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_242)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_243, __3 ) ) -> (match (Trx_runtime.while_primary_noerr (true) ((fun input_249 -> (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_249)))) (input_243)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_244, __4 ) ) -> (match (try_Trxparse_EQUAL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_244)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_245, __5 ) ) -> (match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_245)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_246, __6 ) ) -> (match (match (try_Trxparse_SEMI_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_246)) with
None -> Some((input_246, None))
| Some ( ( input_248, r ) ) -> Some((input_248, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_247, __7 ) ) -> Some((input_247,
#112 "trxparse.trx"
( (__3, ({ PG.vars = __4 ; expr = PG.Expr __6 }, __1)) )))))))))) in
(Hashtbl.add (memo_Trxparse_Function) (input) (res)) ; res)
)
let rec try_Trxparse_DEBUG_noerr =
#218 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((=)) (c) ('%')) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ))
let rec try_Trxparse_Extra_noerr =
#121 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Extra) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (5))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('e'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('x'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (2))))) ('t'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (3))))) ('r'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (4))))) ('a'))) (true)))))))))))) ) then ( Some(((((+)) (input) (5)), "extra")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_255, __1 ) ) -> (match (try_Trxparse_Space_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_255)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_256, __2 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_256)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_257, __3 ) ) -> (match (try_Trxparse_mlvar_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_257)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_258, __4 ) ) -> (match (try_Trxparse_Type_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_258)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_259, __5 ) ) -> Some((input_259, let vartype = __5
and var = __4 in
#122 "trxparse.trx"
( var, vartype )))))))) in
(Hashtbl.add (memo_Trxparse_Extra) (input) (res)) ; res)
)
let rec try_Trxparse_optionType_noerr =
#129 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_optionType) (input))
) with
Not_found -> let res = (match if ( (((<)) (input) (_len)) ) then ( let c = ((_get_char) (input)) in
if ( (((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z')))) ) then ( Some((((succ) (input)), c)) ) else ( None ) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_10, __1 ) ) -> (match (Trx_runtime.while_primary_noerr_nores (false) ((fun input_12 -> if ( (((<)) (input_12) (_len)) ) then ( let c = ((_get_char) (input_12)) in
if ( (((||)) ((((&&)) ((((>=)) (c) ('a'))) ((((<=)) (c) ('z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('A'))) ((((<=)) (c) ('Z'))))) ((((||)) ((((&&)) ((((>=)) (c) ('0'))) ((((<=)) (c) ('9'))))) ((((||)) ((((=)) (c) ('_'))) ((((=)) (c) ('-')))))))))) ) then ( Some((((succ) (input_12)), c)) ) else ( None ) ) else ( None ))) (input_10)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_11, __2 ) ) -> Some((input_11, (_get_sub (input) ((((-)) (input_11) (input)))))))) in
(Hashtbl.add (memo_Trxparse_optionType) (input) (res)) ; res)
)
let rec try_Trxparse_Option_noerr =
#124 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Option) (input))
) with
Not_found -> let res = (match if ( (((&&)) ((((<=)) ((((+)) (input) (2))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (0))))) ('%'))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input) (1))))) ('%'))) (true)))))) ) then ( Some(((((+)) (input) (2)), "%%")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_155, __1 ) ) -> (match (try_Trxparse_optionType_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_155)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_156, __2 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_156)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_157, __3 ) ) -> (match if ( (((&&)) ((((<=)) ((((+)) (input_157) (1))) (_len))) ((((&&)) ((((=)) (((_get_char) ((((+)) (input_157) (0))))) ('='))) (true)))) ) then ( Some(((((+)) (input_157) (1)), "=")) ) else ( None ) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_158, __4 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_158)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_159, __5 ) ) -> (match (try_Trxparse_mlvar_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_159)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_160, __6 ) ) -> (match (try_Trxparse_Spacing_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_160)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_161, __7 ) ) -> Some((input_161,
#125 "trxparse.trx"
( __2, __6 )))))))))) in
(Hashtbl.add (memo_Trxparse_Option) (input) (res)) ; res)
)
let rec try_Trxparse_DefExpr_noerr =
#103 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_DefExpr) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_LEFTARROW_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_339, __1 ) ) -> (match (try_Trxparse_Expression_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_339)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_340, __2 ) ) -> Some((input_340,
#103 "trxparse.trx"
( PG.Expr __2 ))))) with
None -> (match (try_Trxparse_EQUAL_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_336, __1 ) ) -> (match (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_336)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_337, __2 ) ) -> (match (try_Trxparse_Exprs_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_337)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_338, __3 ) ) -> Some((input_338,
#104 "trxparse.trx"
( PG.App (__2, __3) ))))))
| ( _ok ) as __pat_var -> __pat_var) in
(Hashtbl.add (memo_Trxparse_DefExpr) (input) (res)) ; res)
)
let rec try_Trxparse_Definition_noerr =
#62 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_Definition) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_SEMI_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
None -> Some((input, None))
| Some ( ( input_300, r ) ) -> Some((input_300, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_286, __1 ) ) -> (match (try_Trxparse_rule_annots_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_286)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_287, __2 ) ) -> (match (match (try_Trxparse_KEEP_CACHE_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_287)) with
None -> Some((input_287, None))
| Some ( ( input_299, r ) ) -> Some((input_299, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_288, __3 ) ) -> (match (match (try_Trxparse_DEBUG_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_288)) with
None -> Some((input_288, None))
| Some ( ( input_298, r ) ) -> Some((input_298, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_289, __4 ) ) -> (match (match (try_Trxparse_MARK_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_289)) with
None -> Some((input_289, None))
| Some ( ( input_297, r ) ) -> Some((input_297, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_290, __5 ) ) -> (match (try_Trxparse_Identifier_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_290)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_291, __6 ) ) -> (match (match (try_Trxparse_Type_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_291)) with
None -> Some((input_291, None))
| Some ( ( input_296, r ) ) -> Some((input_296, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_292, __7 ) ) -> (match (try_Trxparse_DefExpr_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_292)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_293, __8 ) ) -> (match (match (try_Trxparse_SEMI_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_293)) with
None -> Some((input_293, None))
| Some ( ( input_295, r ) ) -> Some((input_295, Some((r))))) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_294, __9 ) ) -> Some((input_294, let rtype = __7
and mark = __5
and id = __6
and expr = __8
and debug = __4
and cache = __3
and annots = __2 in
#64 "trxparse.trx"
( let entry =
{ PG.expression = expr
; debug = debug <> None
; mark = mark <> None
; retain_cache = cache <> None
; rule_type = rtype
; origin = Some (current_location _file_name input)
}
in
(id, (entry, annots))
)))))))))))) in
(Hashtbl.add (memo_Trxparse_Definition) (input) (res)) ; res)
)
let rec try_Trxparse_GElems_noerr =
#35 "trxparse.trx"
(fun _grammar _file_name _module_name _stoppable _filename _text input -> let _len = ((R_.length) (_text))
and _get_char = ((R_.get) (_text))
and _get_sub = ((R_.sub) (_text)) in
(try (
(Hashtbl.find (memo_Trxparse_GElems) (input))
) with
Not_found -> let res = (match (match (try_Trxparse_IncludeRead_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input)) with
( None ) as __pat_var -> __pat_var
| Some ( ( input_234, __1 ) ) -> (match (try_Trxparse_GElems_noerr (_grammar) (_file_name) (_module_name) (_stoppable) (_filename) (_text) (input_234)) with