let rec continue_parser_of_levels entry clevn =
                  function
                  | [] ->
                      (fun _ _ _ (__strm : _ Stream.t) ->
                         raise Stream.Failure)
                  | lev :: levs ->
                      let p1 =
                        continue_parser_of_levels entry (succ clevn) levs
                      in
                        (match lev.lsuffix with
                         | DeadEnd -> p1
                         | tree ->
                             let alevn =
                               (match lev.assoc with
                                | LeftA | NonA -> succ clevn
                                | RightA -> clevn) in
                             let p2 =
                               parser_of_tree entry (succ clevn) alevn tree
                             in
                               (fun levn bp a strm ->
                                  if levn > clevn
                                  then p1 levn bp a strm
                                  else
                                    (let (__strm : _ Stream.t) = strm
                                     in
                                       try p1 levn bp a __strm
                                       with
                                       | Stream.Failure ->
                                           let (act, loc) =
                                             add_loc bp p2 __strm in
                                           let a = Action.getf2 act a loc
                                           in entry.econtinue levn loc a strm)))