From 5577b6ac86bca69ecf8c857c50c95faf67062a3a Mon Sep 17 00:00:00 2001 From: hugogogo Date: Thu, 14 Oct 2021 00:51:52 +0200 Subject: [PATCH] reflexion sur parsing --- README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++--------- echo | 12 +++++++++ 2 files changed, 73 insertions(+), 12 deletions(-) create mode 100644 echo diff --git a/README.md b/README.md index 21492cb..9d5a6d1 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,67 @@ - unset - env - ~~exit~~ -- ' _(ignore any special characters)_ --> [ressource](https://linuxhandbook.com/quotes-in-bash/) -- " _(ignore any special characters except '$')_ -- -- -- -- -- -- -- -- -- -- +- ' *(ignore any special characters)* --> [ressource](https://linuxhandbook.com/quotes-in-bash/) +- " *(ignore any special characters except '$')* +- unclosed quotes ? +- **redirection :** + - > *input* + - > *output* + - << *read input until empty line -- doesn't update history* + - >> *redirect and append* +- | +- $ +- $? +- **signals :** + - ^C *close process* + - ^D *exit minishell* + - ^\ *do nothing* +- history + +--> [source of a minishell with an interesting README](https://git.42l.fr/Fabien/minishell) + +--- + +[methode arbre binaire](https://fr.wikipedia.org/wiki/Arbre_binaire#Transformation_d'un_arbre_quelconque_en_un_arbre_binaire) + +``` +EXEMPLE : + 'something "is 'new'" here' + something is new here + is new + new + 'something "is"'new' here' + something is + new + here + +ARCHITECTURE : + all + . pipes + . . redirections (program or file) + . . . arguments (nom arg arg arg ...) + . . . . special characters ($) + . . . . . +EXEMPLE : . . . + [sort < ./prgrm 'arg1 '$VARIABLE" arg3" | grep "word.$EXTENSION" | wc -l > file] + . [sort < ./prgrm 'arg1 '$VARIABLE" arg3"] + . . [sort] . + . . [./prgrm 'arg1 '$VARIABLE" arg3"] + . . . [./prgrm] + . . . ['arg1 '] + . . . [$VARIABLE] + . . . . [$VARIABLE] + . . . [" arg3"] + . [grep "word.$EXTENSION"] + . . . [grep] + . . . ["word.$EXTENSION"] + . . . . [$EXTENSION] + . [wc -l > file] + . . [wc -l] + . . . [wc] + . . . [-l] + . . [file] +``` --- diff --git a/echo b/echo new file mode 100644 index 0000000..c991a69 --- /dev/null +++ b/echo @@ -0,0 +1,12 @@ +builds +echo +headers +libft +Makefile +minishell +minishell.en.subject.pdf +README.md +ressources +srcs +tests +valgrind_readline.supp