made by Jonah Köllner, Maximilian Reidenbach
![Screenshot 2023-11-13 at 13 02 52](https://private-user-images.githubusercontent.com/33061141/282455084-ae85c0c6-24fc-4a3c-a0bb-a8d48ce0e8b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3NzI0ODQsIm5iZiI6MTczOTc3MjE4NCwicGF0aCI6Ii8zMzA2MTE0MS8yODI0NTUwODQtYWU4NWMwYzYtMjRmYy00YTNjLWEwYmItYThkNDhjZTBlOGI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA2MDMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwNWU0MTcyNjk2OWRhZjQyZDhhOGIyNjMyMGZjYzgwYTZjMDJkZWUwYTM0NTMwZTdkN2RjY2QyMWRlNTliZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YvEf_ykxT2-2DytbBguSrDCP8xEeu_SxNZ-UZv8JXgI)
user@pc:~/miniRT$ git clone https://github.com/JonahKoellner/minishell.git
user@pc:~/miniRT$ cd minishell
user@pc:~/miniRT$ make
...
user@pc:~/miniRT$ ./minishell
This minishell is designed to mimic the original bash shell (there can be differences to zsh) so treat it exactly like every other Shell
<! Needs to be simplified, prob. move this to parser section later>
sequenceDiagram
box transparent Input Handeling
participant minishell
participant input
end
box transparent lexer
participant input_to_lex
participant get_next_token
participant tokencount
end
box transparent parser
participant parser
participant parse_redirect
end
box rgb(50,0,0) Error
participant bad_quote
participant empty_input
participant unexpected_token
end
minishell->>+input: *command
input-->>-minishell: input
minishell->>+input_to_lex: input
input_to_lex->>+tokencount: input
alt Unclosed Quotes
tokencount-->>+input_to_lex: negative number
input_to_lex->>+bad_quote: input
bad_quote-->bad_quote: Prints Error Msg, adds history, frees input
bad_quote-->>-input_to_lex: Returns -1
input_to_lex-->>-minishell: Returns -1
else Empty Input
tokencount-->>+input_to_lex: 0
input_to_lex->>+empty_input: input
empty_input-->empty_input: frees input
empty_input-->>-input_to_lex: 0
input_to_lex-->>-minishell: Returns 0
else No Error in Tokencount
input_to_lex-->input_to_lex: allocates tokens struct
loop For Number of tokens
input_to_lex->>get_next_token: input
get_next_token-->>input_to_lex: token
end
end