Soulless.Protobuf.Parser (Soulless v0.2.0)

View Source

Summary

Functions

Parses the given binary as parse.

Functions

field__0(rest, acc, stack, context, line, offset)

field__1(rest, acc, stack, context, line, offset)

field__2(rest, user_acc, list, context, line, offset)

field__3(rest, acc, stack, context, line, offset)

field__4(rest, acc, stack, context, line, offset)

field__5(rest, acc, stack, context, comb__line, comb__offset)

field__6(rest, acc, stack, context, comb__line, comb__offset)

field__7(rest, user_acc, list, context, line, offset)

field__8(rest, acc, stack, context, line, offset)

field__9(rest, user_acc, list, context, line, offset)

field__10(rest, acc, list, context, line, offset)

field__11(_, _, stack, _, _, _)

field__12(rest, acc, stack, context, comb__line, comb__offset)

field__13(rest, acc, list, context, line, offset)

field__14(_, _, stack, _, _, _)

field__15(rest, acc, stack, context, comb__line, comb__offset)

field__16(rest, acc, list, context, line, offset)

field__17(_, _, stack, _, _, _)

field__18(rest, acc, stack, context, comb__line, comb__offset)

field__19(rest, acc, list, context, line, offset)

field__20(_, _, stack, _, _, _)

field__21(rest, acc, stack, context, comb__line, comb__offset)

field__22(rest, acc, list, context, line, offset)

field__23(_, _, stack, _, _, _)

field__24(rest, acc, stack, context, comb__line, comb__offset)

field__25(rest, acc, list, context, line, offset)

field__26(_, _, stack, _, _, _)

field__27(rest, acc, stack, context, comb__line, comb__offset)

field__28(rest, acc, list, context, line, offset)

field__29(_, _, stack, _, _, _)

field__30(rest, acc, stack, context, comb__line, comb__offset)

field__31(rest, acc, list, context, line, offset)

field__32(_, _, stack, _, _, _)

field__33(rest, acc, stack, context, comb__line, comb__offset)

field__34(rest, acc, list, context, line, offset)

field__35(_, _, stack, _, _, _)

field__36(rest, acc, stack, context, comb__line, comb__offset)

field__37(rest, acc, list, context, line, offset)

field__38(_, _, stack, _, _, _)

field__39(rest, acc, stack, context, comb__line, comb__offset)

field__40(rest, acc, list, context, line, offset)

field__41(_, _, stack, _, _, _)

field__42(rest, acc, stack, context, comb__line, comb__offset)

field__43(rest, acc, list, context, line, offset)

field__44(_, _, stack, _, _, _)

field__45(rest, acc, stack, context, comb__line, comb__offset)

field__46(rest, acc, list, context, line, offset)

field__47(_, _, stack, _, _, _)

field__48(rest, acc, stack, context, comb__line, comb__offset)

field__49(rest, acc, list, context, line, offset)

field__50(_, _, stack, _, _, _)

field__51(rest, acc, stack, context, comb__line, comb__offset)

field__52(rest, acc, list, context, line, offset)

field__53(_, _, stack, _, _, _)

field__54(rest, acc, stack, context, comb__line, comb__offset)

field__55(rest, acc, list, context, line, offset)

field__56(_, _, stack, _, _, _)

field__57(rest, acc, stack, context, comb__line, comb__offset)

field__58(rest, acc, list, context, line, offset)

field__59(rest, acc, stack, context, line, offset)

field__60(rest, acc, stack, context, line, offset)

field__61(rest, acc, stack, context, comb__line, comb__offset)

field__62(rest, acc, stack, context, comb__line, comb__offset)

field__63(rest, user_acc, list, context, line, offset)

field__64(rest, acc, stack, context, line, offset)

field__65(rest, user_acc, list, context, line, offset)

field__66(rest, acc, stack, context, line, offset)

field__67(rest, acc, stack, context, line, offset)

field__68(rest, acc, stack, context, comb__line, comb__offset)

field__69(rest, acc, stack, context, comb__line, comb__offset)

field__70(rest, user_acc, list, context, line, offset)

field__71(rest, acc, stack, context, line, offset)

field__72(rest, user_acc, list, context, line, offset)

field__73(rest, acc, stack, context, line, offset)

field__74(rest, acc, stack, context, line, offset)

field__75(rest, acc, stack, context, comb__line, comb__offset)

field__76(rest, acc, stack, context, comb__line, comb__offset)

field__77(rest, user_acc, list, context, line, offset)

field__78(rest, acc, stack, context, line, offset)

field__79(rest, user_acc, list, context, line, offset)

field__80(rest, acc, stack, context, comb__line, comb__offset)

field__81(rest, acc, stack, context, line, offset)

field__82(rest, acc, stack, context, line, offset)

field__83(rest, acc, stack, context, comb__line, comb__offset)

field__84(rest, acc, stack, context, comb__line, comb__offset)

field__85(rest, user_acc, list, context, line, offset)

field__86(rest, acc, stack, context, line, offset)

field__87(rest, user_acc, list, context, line, offset)

field__88(rest, acc, stack, context, line, offset)

field__89(rest, acc, stack, context, line, offset)

field__90(rest, acc, stack, context, comb__line, comb__offset)

field__91(rest, acc, stack, context, comb__line, comb__offset)

field__92(rest, user_acc, list, context, line, offset)

field__93(rest, acc, stack, context, line, offset)

field__94(rest, user_acc, list, context, line, offset)

field__95(rest, acc, stack, context, comb__line, comb__offset)

field__96(rest, acc, stack, context, line, offset)

parse(binary, opts \\ [])

@spec parse(binary(), keyword()) ::
  {:ok, [term()], rest, context, line, byte_offset}
  | {:error, reason, rest, context, line, byte_offset}
when line: {pos_integer(), byte_offset},
     byte_offset: non_neg_integer(),
     rest: binary(),
     reason: String.t(),
     context: map()

Parses the given binary as parse.

Returns {:ok, [token], rest, context, position, byte_offset} or {:error, reason, rest, context, line, byte_offset} where position describes the location of the parse (start position) as {line, offset_to_start_of_line}.

To column where the error occurred can be inferred from byte_offset - offset_to_start_of_line.

Options

  • :byte_offset - the byte offset for the whole binary, defaults to 0
  • :line - the line and the byte offset into that line, defaults to {1, byte_offset}
  • :context - the initial context value. It will be converted to a map