JustBash.Commands.Awk.Parser (JustBash v0.4.0)

View Source

Token-based parser for AWK programs.

Uses recursive descent parsing on a token stream from the Lexer.

Summary

Functions

Parse an AWK program string into an AST.

Types

t()

@type t() :: %JustBash.Commands.Awk.Parser{
  in_print_context: boolean(),
  pos: non_neg_integer(),
  tokens: [JustBash.Commands.Awk.Lexer.token()]
}

Functions

parse(input)

@spec parse(String.t()) ::
  {:ok, JustBash.Commands.Awk.AST.program()} | {:error, String.t()}

Parse an AWK program string into an AST.