summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Lukas Jiriste [Sun, 21 Jul 2024 11:12:10 +0000 (13:12 +0200)]
Add check for unsuccessful execution
Add some checks inside ex_simple_command.
Lukas Jiriste [Sun, 21 Jul 2024 11:03:31 +0000 (13:03 +0200)]
Rename t_execution_info, add its definition
Lukas Jiriste [Sun, 21 Jul 2024 10:59:53 +0000 (12:59 +0200)]
Make some small changes
Lukas Jiriste [Sun, 21 Jul 2024 10:58:56 +0000 (12:58 +0200)]
Refactor the subshell execution
Lukas Jiriste [Sun, 21 Jul 2024 07:10:44 +0000 (09:10 +0200)]
Add and outline for the tree execution.
Lukas Jiriste [Sun, 21 Jul 2024 06:54:22 +0000 (08:54 +0200)]
Update Libft for the Norm compliance
Lukas Jiriste [Fri, 19 Jul 2024 14:19:52 +0000 (16:19 +0200)]
Simplify the about_grammmar
This is possible thanks to the grammar of minishell being simpler than
that of shell.
Lukas Jiriste [Fri, 19 Jul 2024 14:08:23 +0000 (16:08 +0200)]
Replace the parsing table with a correct one
Also update the rules to fit with the new table.
Lukas Jiriste [Thu, 27 Jun 2024 07:34:52 +0000 (09:34 +0200)]
Fix leak.
The handle_input function could be structured better to not make
mistakes such as the one that is fixed by this comment.
Lukas Jiriste [Thu, 27 Jun 2024 07:15:44 +0000 (09:15 +0200)]
Update Libft for better parse_tree printing
Lukas Jiriste [Thu, 27 Jun 2024 07:15:31 +0000 (09:15 +0200)]
Fix quote handling during tokenization
Lukas Jiriste [Sun, 23 Jun 2024 17:08:37 +0000 (19:08 +0200)]
Implement tokenization
The tokenization seems to work now. Thanks to it the parsing can be
tested which shows a leak with the unfreed memory originating from the
follow_rule function.
Lukas Jiriste [Fri, 21 Jun 2024 15:02:05 +0000 (17:02 +0200)]
Change the file structure of the project
Because the parsing was implemented inside libft the parsingh was not
needed here. The informative contents were moved to about_grammar.
The variable expansion and tokenization were given their own files.
Lukas Jiriste [Fri, 21 Jun 2024 13:57:14 +0000 (15:57 +0200)]
Update Libft for parsing support
Lukas Jiriste [Fri, 21 Jun 2024 13:56:52 +0000 (15:56 +0200)]
Add grammar rules and parsing table for minishell
Lukas Jiriste [Fri, 14 Jun 2024 09:03:26 +0000 (11:03 +0200)]
Repair problems caused by change 2 commit back
The change made was from t_vec<char> to char *.
This change was not made in the function handeling tokens however,
which is rectified with this commit.
The previous 2 commit were made quickly as an exercise in using git
hence the low quality.
Lilia-42 [Fri, 14 Jun 2024 08:34:18 +0000 (10:34 +0200)]
Add a comment
Lukas Jiriste [Fri, 14 Jun 2024 08:30:59 +0000 (10:30 +0200)]
Change char * as it is easier to understand
Lukas Jiriste [Fri, 3 May 2024 14:11:26 +0000 (16:11 +0200)]
Create the structure for input handling
Create prototypes of some needed types (token, parse tree) and
create the structure of the input processing with empty functions.
Also add a grammar for minishell inside a comment in parsing.h.
This is a simplification of the grammar of Shell programming language
as it is laid out inside
The Open Group Base Specifications Issue 7, 2018 edition
Chapter 2. Shell Command Language
found on site
https://pubs.opengroup.org/onlinepubs/
9699919799/utilities/V3_chap02.html
Lukas Jiriste [Fri, 3 May 2024 06:58:45 +0000 (08:58 +0200)]
Rename almost_empty to is_almost_empty
Lukas Jiriste [Thu, 2 May 2024 12:40:05 +0000 (14:40 +0200)]
Add version without history
This version doesn't utilize GNU Readline so it has much lower memory
footprint. The main benefit however is that tracking with valgrind is
made easier with this.
Lukas Jiriste [Thu, 2 May 2024 11:27:09 +0000 (13:27 +0200)]
Implement variables framework, update Libft
So far the variable handling consists of copying the environment
inherited by minishell to separate variable to make changes to it
possible (I suspect that one should not directly change the environ).
The vars struct consists of 2 vectos of strings, one for the exported
variables and one for the others.
This is done so that the exported->vec can be directly passed to execve
instead of contructing it by filtering the exported values from
a common vector.
This is also why the vector is initialized with NULL. The other vec
is constructed the same way so as to be able to reuse the code for
exported.
During work on this commit the function ft_strcat_alloc seemed to be
a great candidate for addition to Libft. That was done and the
function was used in this commit, hence the Libft update.
Lukas Jiriste [Fri, 26 Apr 2024 12:03:25 +0000 (14:03 +0200)]
Implement exitable skeleton of a shell
The minishell is now able to accept input and access history through
the GNU Readline library.
The minishell itself prints prompt with currect directory.
It also handles the "exit" command as well as ctrl-D
so that it can exit. It prints "exit" on exit like bash.
Lukas Jiriste [Fri, 26 Apr 2024 11:15:23 +0000 (13:15 +0200)]
Create the foundations for minishell
First commit contains .gitignore, Makefile and an empty main.c.
I also added Libft as a submodule, because I'll certainly use it.