# `Finitomata.Parser`
[🔗](https://github.com/am-kantox/finitomata/blob/v0.35.0/lib/finitomata/parser.ex#L1)

The behaviour, defining the parser to produce _FSM_ out of textual representation.

# `parse_error`

```elixir
@type parse_error() ::
  {:error, String.t(), binary(), map(), {pos_integer(), pos_integer()},
   pos_integer()}
```

The type representing the parsing error which might be passed through to raised `CompileError`.

# `lint`

```elixir
@callback lint(binary()) :: binary()
```

Linter of the input, producing a well-formed representation of _FSM_ understood by JS/markdown parsers.

# `parse`

```elixir
@callback parse(binary()) ::
  {:ok, [Finitomata.Transition.t()]}
  | {:error, Finitomata.validation_error()}
  | parse_error()
```

Parse function, producing the _FSM_ definition as a list of `Transition` instances.

# `validate`

```elixir
@callback validate([{:transition, [binary()]}]) ::
  {:ok, [Finitomata.Transition.t()]} | {:error, Finitomata.validation_error()}
```

Validation of the input.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
