parse

abstract fun parse(rawInput: String): List<KarlInstruction>(source)

Parses the raw input into a list of KarlInstruction objects.

Return

A list of parsed KarlInstruction objects. Returns an empty list if the input is valid but contains no instructions.

Parameters

rawInput

The raw input from the user (e.g., a string from a UI text field, content read from a configuration file, etc.). The expected format depends on the specific implementation of this interface.

Throws

if the input is invalid and cannot be parsed according to the implementation's format.