Expression.Ast (expression v0.3.0)

Parse a string and turn it into an AST which can be evaluated by Expression.Eval

Link to this section Summary

Functions

Parses the given binary as aexpr.

Parses the given binary as literal.

Parses the given binary as parse.

Link to this section Functions

Link to this function

aexpr(binary, opts \\ [])

Specs

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

Parses the given binary as aexpr.

Returns {:ok, [token], rest, context, position, byte_offset} or {:error, reason, rest, context, line, byte_offset} where position describes the location of the aexpr (start position) as {line, column_on_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
Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

expression__4(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

expression__7(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

fold_infixl(acc)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

function__18(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

function_arguments__11(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

function_arguments__14(_, _, list, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

function_arguments__25(inner_rest, inner_acc, list, inner_context, inner_line, inner_offset)

Link to this function

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

Link to this function

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

Link to this function

function_arguments__28(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

function_arguments__31(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

function_arguments__34(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

function_arguments__5(_, _, stack, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

function_arguments__8(_, _, stack, _, _, _)

Link to this function

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

Link to this function

literal(binary, opts \\ [])

Specs

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

Parses the given binary as literal.

Returns {:ok, [token], rest, context, position, byte_offset} or {:error, reason, rest, context, line, byte_offset} where position describes the location of the literal (start position) as {line, column_on_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
Link to this function

parse(binary, opts \\ [])

Specs

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: pos_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, column_on_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
Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

variable__16(_, _, list, _, _, _)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

variable__31(inner_rest, inner_acc, list, inner_context, inner_line, inner_offset)

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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