srash

Crates.iosrash
lib.rssrash
version0.0.0
sourcesrc
created_at2023-03-22 22:01:35.805648
updated_at2023-03-22 22:01:35.805648
descriptionBash interpreter/compiler. Will not support all the functionalities.
homepagehttps://gitlab.com/lootved/irsh
repositoryhttps://gitlab.com/lootved/irsh
max_upload_size
id817519
size42,429
(LootVed)

documentation

README

Irsh

Description

Bash like interpreter and maybe compiler? Designed to be used as an interactive shell with minimal dependencies, will not support all bash syntax.

Features

  • support a unique bash syntax for variable/function declaration
  • always assume a { after a $ and that the brackets/parenthesis are correctly closed
  • ignore corner cases due to unclosed blocks/quote and crash for an easier (and faster?) implem
  • functions/program arguments with no default value are considered mandatory
  • one level of sub-command only
  • sub-commands can only be used at the beginning of double quoted string
  • sub-commands are limited to variables/words and redirection symbols
  • no support for nested quotes
  • no support (yet?) for multi-lines strings
  • value must be quoted when declaring a variable

Limitations

  • can fail on some edge cases
  • only &> redirection will be implemented
  • support only ${alphanum}, no $@ or $* or any other form
  • infinite loop if non closed sub-command
  • infinite loop if $() without the ""

Objectives

  • parse bash variables with scoping and defaults
  • parse bash functions via function keyword
  • support invocation of external commands
  • implement a subset of basic bash functionalities
  • support stdout/err redirections
Commit count: 61

cargo fmt