The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Dochazka::CLI::Parser - Parser module

VERSION

Version 0.154

PACKAGE VARIABLES AND EXPORTS

parse

Parse the command string entered by the user.

possible_words

Given a state expressed as a stack of tokens, return list of possible tokens.

process_command

Given a command string, process it (by parsing, calling the handler, etc.) and return the result.

FUNCTIONS

process_command

Given a command entered by the user, process it and return the result.

parse

Parse command string entered by the user. Takes the command string, and returns:

$nc

The normalized command - suitable for lookup via look_up_command

$ts

The token stack - a reference to the list of normalized tokens

$th

The token hash - a hash where the keys are the normalized tokens and the values are the raw values extracted from the command string. Whatever is left after command string parsing completes will be placed in the '_REMAINDER' key.

possible_words

Given a token stack, return the list of possible tokens.