Commit graph

576 commits

Author SHA1 Message Date
Jack Halford
eac301aa16 merged pda stuff 2017-03-03 18:52:20 +01:00
Jack Halford
20e96b751f pipes work 2017-03-03 18:50:13 +01:00
wescande
4c44407b65 correctif on some stuff + ajout framework for test 2017-03-03 18:49:39 +01:00
Jack Halford
bc40339015 merged more stuff 2017-03-03 18:06:04 +01:00
Jack Halford
783cd963e4 merged things 2017-03-03 18:05:17 +01:00
Jack Halford
03c62f69a6 stuff 2017-03-03 18:03:17 +01:00
wescande
d146126135 rectif makefile 2017-03-03 18:01:25 +01:00
wescande
e9d0324189 merge correcitf segv 2017-03-03 18:00:43 +01:00
wescande
6775120264 protection de segv au lancement du shell (redirection entrante & nom de fichier non valid) 2017-03-03 17:59:39 +01:00
Jack Halford
2ad34631e3 parentheses dont trigger more input after lexing 2017-03-03 17:58:08 +01:00
Jack Halford
2926a9d00d merged pda_execution 2017-03-03 17:33:36 +01:00
Antoine Riard
a78416ae40 Merge branch 'pda' of https://github.com/jzck/42sh into pda
"syhcnrho witg wescnde"
2017-03-03 17:19:49 +01:00
Antoine Riard
d0b821c483 pipe fix grammar + assignement word parsing 2017-03-03 17:19:39 +01:00
Jack Halford
5159c30b67 new libft for pop 2017-03-03 16:59:21 +01:00
Jack Halford
418859e9e8 it compiles ! much more testing for simple commands to work 2017-03-03 16:51:18 +01:00
wescande
df7ed59b03 ajout du bool dans l'appel a glob pour demander un matching complet ou juste une expnsion de var +bquote (cas de l'assignation de variables) 2017-03-03 16:30:06 +01:00
wescande
d0c9baeeb8 modif assignment word 2017-03-03 16:11:42 +01:00
Antoine Riard
b90a17f2fa googd redir 2017-03-03 14:37:22 +01:00
wescande
7a72910a97 ajout de l'expansion du ~ + mise a la norme de command_get_output et correctif appliqué en cas de read invalid 2017-03-03 14:35:30 +01:00
Jack Halford
975a271bc9 Merge branch 'pda' of https://github.com/jzck/minishell into pda 2017-03-03 14:24:24 +01:00
Antoine Riard
a4d0093144 good state 2017-03-03 14:20:26 +01:00
AntoHesse
37d815cb57 fuck it 2017-03-03 02:36:25 +01:00
AntoHesse
b9d8b949be perdu entre les 2 libs de lst :( to-do tomorroz 2017-03-03 02:00:15 +01:00
AntoHesse
7f82901608 Merge branch 'pda' of https://github.com/jzck/minishell into pda
"need"
2017-03-03 00:05:41 +01:00
AntoHesse
75f1da13f2 before pull 2017-03-03 00:05:37 +01:00
Antoine Riard
37d9898f59 doing pipe + lst cmds 2017-03-02 22:02:53 +01:00
Jack Halford
3857b06785 execution much simpler with new parser, thx ariard! 2017-03-02 21:17:16 +01:00
Jack Halford
62d3ef01d2 merged pda 2017-03-02 12:37:15 +01:00
ariard@student.42.fr
722a290aee yale sauf subshell 2017-03-01 23:01:43 +01:00
ariard@student.42.fr
aa9097575d rewef 2017-03-01 18:04:29 +01:00
ariard@student.42.fr
9f9d799bbe merge fixed 2017-03-01 16:28:44 +01:00
ariard@student.42.fr
f5fafb4c19 before pull 2017-03-01 16:25:53 +01:00
Jack Halford
03152a9e2b conflicts resolved 2017-02-28 21:40:22 +01:00
ariard@student.42.fr
871b4da000 test 2017-02-28 19:28:01 +01:00
Jack Halford
ca1e060463 fixed problem with redirection lexing 2017-02-28 18:53:58 +01:00
gwojda
703f8a4cd4 issue #39 2017-02-28 11:12:31 +01:00
gwojda
949d0b2c62 issue #44 2017-02-28 10:45:36 +01:00
Jack Halford
9a29a9dcb3 issue #46 2017-02-27 16:59:28 +01:00
AntoHesse
9c0984658e exec flow control 2017-02-26 01:13:47 +01:00
AntoHesse
a154aa85b6 eof syntax good 2017-02-25 22:34:38 +01:00
ariard@student.42.fr
8c8ee2152e parsing heredoc doing 2017-02-25 20:36:27 +01:00
ariard@student.42.fr
eeb0887081 commit from un cluster qui marche aka new redir 2017-02-25 19:31:02 +01:00
ariard@student.42.fr
7b1d505a5b gen func ok, todo: multi branch declaration, probleme lexer sur brackets 2017-02-25 00:31:51 +01:00
ariard@student.42.fr
a8a06305bb parsing brace_clause + func def ok 2017-02-24 23:18:00 +01:00
ariard@student.42.fr
102196bff4 parsing brace_clause + func def ok 2017-02-24 23:17:29 +01:00
ariard@student.42.fr
f703185a3a assignement word lexing parsing 2017-02-24 21:00:38 +01:00
ariard@student.42.fr
a3c750494f good code 2017-02-24 19:32:45 +01:00
ariard@student.42.fr
0461285d95 subshell et case ok 2017-02-24 19:30:20 +01:00
ariard@student.42.fr
d50a0d1b13 parsing for ok 2017-02-24 16:29:51 +01:00
ariard@student.42.fr
5f596310e1 nesting case ok 2017-02-24 15:32:56 +01:00
ariard@student.42.fr
d251474db9 erase error 2017-02-24 14:52:04 +01:00
ariard@student.42.fr
ecc058dd11 still case 2017-02-23 22:55:17 +01:00
AntoHesse
79bceb05a9 trop fatigue pour debug les case nesting, fuck it, todo tomorrow 2017-02-23 01:55:09 +01:00
AntoHesse
03238b2042 fucking case grammar done 2017-02-22 22:04:45 +01:00
AntoHesse
50da96bbd6 on a retrpuve la compagnie TK_PAREN 2017-02-22 20:25:51 +01:00
AntoHesse
2fbea4837d gramamr for 2017-02-22 19:50:29 +01:00
AntoHesse
7a849b360a syntax error + coordination parser etat 2017-02-22 18:36:42 +01:00
AntoHesse
268c5fb46e syntax error + coordination parser etat 2017-02-22 18:36:32 +01:00
AntoHesse
5976d0d281 grammar case part 1 motherfucker 2017-02-22 01:43:25 +01:00
ariard@student.42.fr
49b79603b3 insert newline add 2017-02-21 22:45:59 +01:00
Jack Halford
8084ffb6a1 pipes done 2017-02-21 22:42:13 +01:00
ariard@student.42.fr
04c4978c35 Merge branch 'pda' of https://github.com/jzck/42sh into pda
"conflict resolved"
2017-02-21 20:33:12 +01:00
ariard@student.42.fr
fffb8c74a5 before pull main clean 2017-02-21 20:29:46 +01:00
Jack Halford
ec79b05131 new instruction handler looks good 2017-02-21 20:21:52 +01:00
ariard@student.42.fr
7856564ecb main clean 2017-02-21 18:34:31 +01:00
ariard@student.42.fr
07c2101df4 EOF error add 2017-02-21 18:15:21 +01:00
ariard@student.42.fr
d05cec4962 include + parser state 2017-02-21 16:46:13 +01:00
Jack Halford
71e8d28263 libft change 2017-02-21 15:25:37 +01:00
ariard@student.42.fr
58473871ca ok 2017-02-21 15:22:11 +01:00
ariard@student.42.fr
62a8832823 before pull 2017-02-21 14:36:32 +01:00
Jack Halford
661cb0eb8b get_fd 2017-02-21 14:35:14 +01:00
Jack Halford
c04006a471 fixed some merging problems : it compiles now 2017-02-20 22:41:02 +01:00
ariard@student.42.fr
8d23821d69 after mege 2017-02-20 21:05:12 +01:00
ariard@student.42.fr
ca56489f13 before merge master 2017-02-20 19:52:38 +01:00
wescande
4ea6fb5801 Merge remote-tracking branch 'origin/glob_bquote' 2017-02-20 19:18:23 +01:00
wescande
f9019aea88 suppression ancien backquote + deplacement command output + modif main sur l'appel a expand_bquote 2017-02-20 19:15:19 +01:00
wescande
10596c48d9 optimisation du backquotting + mise a la norme 2017-02-20 19:11:52 +01:00
ariard@student.42.fr
cdfc6c6d55 until ok 2017-02-20 18:58:46 +01:00
ariard@student.42.fr
597afe06d0 nesting condition ok 2017-02-20 18:17:37 +01:00
ariard@student.42.fr
d9375e853a else ok nesting coming 2017-02-20 17:25:53 +01:00
ariard@student.42.fr
2e012b3e91 if elif ok, else coming 2017-02-20 17:20:34 +01:00
ariard@student.42.fr
3d65d42708 grammar if stable 2017-02-20 16:07:54 +01:00
wescande
169aa62b7e rectif nombreuses issues + ajout de l'expansion des backquote 2017-02-20 15:31:13 +01:00
gwojda
9678900238 on a retrouvé le soldat TERM 2017-02-20 14:35:18 +01:00
AntoHesse
fea9429e9f more if elif then else grammar 2017-02-20 01:05:11 +01:00
ariard@student.42.fr
f6aefd7739 grammar if then elif part one 2017-02-19 19:32:45 +01:00
ariard@student.42.fr
c90ad14f93 while ok 2017-02-19 17:53:43 +01:00
Jack Halford
7cc0aa0e97 removed DG messages 2017-02-19 17:15:07 +01:00
ariard@student.42.fr
ccfbf618bc modifs 2017-02-19 16:55:33 +01:00
ariard@student.42.fr
fbce14ef34 modifs gestion d'erreur 2017-02-19 16:55:06 +01:00
Jack Halford
56fe780999 segfault on 'builtin | binary' fixed, 'binary | builtin' gets a SIGKILL somehow... 2017-02-19 16:10:23 +01:00
Jack Halford
694744bf0c PIPESINGLE macro was wrong 2017-02-19 15:18:46 +01:00
Jack Halford
c65e07038b lexing problems w/ less and great 2017-02-19 15:03:51 +01:00
Jack Halford
8abf9fe433 lexer function increment lexer.pos not lexer.str 2017-02-19 14:43:45 +01:00
gwojda
f05172b9e1 oublie ligne de debug 2017-02-19 12:58:59 +01:00
gwojda
923ffa1ea0 correction free history + crash potentiel sur la table de hash 2017-02-19 12:02:34 +01:00
ariard@student.42.fr
6609e3b8d9 while one nest ok 2017-02-18 20:10:42 +01:00
gwojda
480c9810c9 ajout builtin hash + ajout rehash si access ne fonctionne pas sur path donné dans la table 2017-02-18 16:52:55 +01:00
gwojda
36f45536fe correction segv edition de ligne + ajout table de hash 2017-02-18 14:44:41 +01:00
gwojda
c7d8da6f73 correction segv edition de ligne + ajout table de hash 2017-02-18 14:44:24 +01:00
gwojda
ea073dceaf correction segv edition de ligne + ajout table de hash 2017-02-18 14:42:43 +01:00
ariard@student.42.fr
96e439b652 parsing while simple ok 2017-02-17 23:43:44 +01:00
ariard@student.42.fr
4ef7af6e20 while error check doing 2017-02-17 19:49:12 +01:00
wescande
97b1dc268f init 2017-02-17 18:19:26 +01:00
ariard@student.42.fr
21e98d1364 Merge branch 'pda' of https://github.com/jzck/minishell into pda
"align"
2017-02-17 17:17:00 +01:00
ariard@student.42.fr
b0a3e63ffc modif redirect list 2017-02-17 17:15:58 +01:00
Jack Halford
2731ca5d03 Merge branch 'master' of https://github.com/jzck/minishell 2017-02-17 16:39:38 +01:00
Jack Halford
957d568352 bquotes expand correctly /w single quotes and double quotes 2017-02-17 16:39:28 +01:00
Jack Halford
730773c375 added yale examples 2017-02-17 16:26:40 +01:00
gwojda
e10d64c05b correction leak env 2017-02-17 15:57:55 +01:00
Jack Halford
b8bf58fbab doing some bquote expansion fix 2017-02-17 15:49:03 +01:00
Jack Halford
413121fcf8 Merge branch 'master' of https://github.com/jzck/minishell 2017-02-17 14:11:21 +01:00
Jack Halford
5e511b7441 libft update for GNL 2017-02-17 14:11:13 +01:00
gwojda
d136e2be04 correction leak cd + 2-3 autres ptits trucs 2017-02-17 13:58:27 +01:00
gwojda
497ab7a02a commit merge 2017-02-17 11:16:36 +01:00
gwojda
0e1595101b commit merge 2017-02-17 11:15:32 +01:00
gwojda
0f61c048ae fixe leak sur env 2017-02-17 10:32:25 +01:00
AntoHesse
7f83e231aa && || 2017-02-17 02:38:56 +01:00
M600
61b193013e Refreshed documentation on autocompletion module 2017-02-16 22:19:56 +01:00
M600
46d7e7ce4e Fix completion nested in the command 2017-02-16 18:05:21 +01:00
AntoHesse
7477cb4c0d debug exec ou parsing 2017-02-16 17:35:44 +01:00
AntoHesse
beb3723122 conflict ok 2017-02-16 17:04:37 +01:00
AntoHesse
90457ec703 before pull 2017-02-16 17:02:37 +01:00
M600
7a35430c5c Fix duplicate letter on perfect match 2017-02-16 16:38:03 +01:00
M600
f1808b39c6 Fix shifting 2017-02-16 16:21:23 +01:00
M600
481821a88d Fix crash c[tab]d[tab] 2017-02-16 16:01:44 +01:00
M600
7f7f5e8084 Rebase 2017-02-16 15:32:11 +01:00
M600
b15e89e4fc Fix rematching and one leak 2017-02-16 15:21:23 +01:00
M600
2abdf8c925 Advanced research update early version. Fix a few bugs. 2017-02-16 15:21:23 +01:00
M600
fbecb59a14 Reworked colors and fix a few bugs. Still missing advanced research 2017-02-16 15:21:23 +01:00
gwojda
ec9f2c91f3 fixe bugs sur la completion 2017-02-16 14:23:04 +01:00
gwojda
3dfc6abb61 correction de quelques bugs sur le prompt - correction de segv sur env - correction de leaks 2017-02-16 12:46:42 +01:00
ariard@student.42.fr
185ed2ebd3 gen ast en cours 2017-02-15 20:58:41 +01:00
ariard@student.42.fr
fc37e7999a Merge branch 'pda' of https://github.com/jzck/minishell into pda
"work last night"
2017-02-15 18:31:49 +01:00
ariard@student.42.fr
78a2dafe50 before merge with clean dir 2017-02-15 18:31:37 +01:00
gwojda
81b4c83c70 ajout d'env avec opt -i -u / export / unset 2017-02-15 15:47:09 +01:00
gwojda
b67c7fd7d3 ajout d'env avec opt -i -u / export / unset 2017-02-15 15:46:43 +01:00
Jack Halford
73f12e7e96 merged heredoc support; moved history/ into src/ because of makefile
problems
2017-02-15 07:06:57 +01:00
AntoHesse
8e05bba1c6 less code is better 2017-02-15 02:22:05 +01:00
Jack Halford
16cfada91f heredoc redirection done, looks to work OK 2017-02-15 00:13:02 +01:00
Jack Halford
3f984ad498 multiple heredocs on one line word OK 2017-02-15 00:00:39 +01:00
Jack Halford
c764027070 heredoc starting to work; goto do multiple heredoc and execution part 2017-02-14 20:32:34 +01:00
ariard@student.42.fr
0040a07ce9 bitwise pour exclure next_token malvenu 2017-02-14 19:09:30 +01:00
gwojda
a190bbbbe8 recollage de l'historique + control R + point d'exclamation. quelques fixes pour le prompt 2017-02-14 15:45:22 +01:00
gwojda
71f13249b8 recollage de l'historique + control R + point d'exclamation. quelques fixes pour le prompt 2017-02-14 15:45:17 +01:00
Jack Halford
75c11ff4a6 first batch of fixes on lexer and bquote expansion 2017-02-14 14:54:01 +01:00
Jack Halford
665c593f5d merged new lexer/line-edit architecture 2017-02-14 01:16:54 +01:00
Jack Halford
be6be17f2a bquotes expansion refactoring for future norm checks; still need to preventh field splitting for dquoted bquotes; also need to fuse bquote expansion into the globbing module 2017-02-14 00:42:41 +01:00
ariard@student.42.fr
fd951302a3 combinaison pipe et simple ok 2017-02-13 23:00:05 +01:00
Jack Halford
4840051dbd backquote expansion checks for splitting 2017-02-13 17:46:56 +01:00
Jack Halford
2e0b6102ce bquotes expand correctly but segfault afterwards... 2017-02-13 15:31:21 +01:00
ariard@student.42.fr
582087186f a lot of grammar 2017-02-12 21:09:23 +01:00
ariard@student.42.fr
2a70b3f702 moar moar moar grammar 2017-02-12 19:19:16 +01:00
ariard@student.42.fr
f16b0b923f moaaar grammar 2017-02-12 18:49:30 +01:00
ariard@student.42.fr
a07ed6eea7 moaaaar grammar 2017-02-12 18:47:16 +01:00
Jack Halford
742a99440e backslash should work, also keep NL when they are quoted 2017-02-12 18:11:59 +01:00
ariard@student.42.fr
80a5a8b1e2 Merge branch 'pda' of https://github.com/jzck/minishell into pda
grammar neeeded
2017-02-12 17:30:47 +01:00
ariard@student.42.fr
775d995772 grammar 2017-02-12 17:30:36 +01:00
AntoHesse
6601e2111f moar moar grammar 2017-02-12 04:09:36 +01:00
AntoHesse
516e1dade5 enforcement grammar part 1 2017-02-12 02:40:34 +01:00
ariard@student.42.fr
30494f2df2 moar grammar 2017-02-10 20:08:46 +01:00
gwojda
ab66992500 prompt zsh style : quelques petits trucs a revoir 2017-02-10 18:22:50 +01:00
ariard@student.42.fr
53ce7d5c1c grammar 2017-02-10 17:00:52 +01:00
Jack Halford
f7ed0a6bdd bq->dq seems to function 2017-02-10 13:50:46 +01:00
Jack Halford
a144239a56 pull resolved 2017-02-10 13:39:34 +01:00
Jack Halford
0a1fd7e518 dquotes->bquotes 2017-02-10 13:38:49 +01:00
gwojda
b25e6b186a fixe termcaps 2017-02-10 12:19:51 +01:00
Jack Halford
1167a23ca3 some refactoring of readline.c 2017-02-10 05:30:17 +01:00
Jack Halford
6ec9f9295e initial implementation looks ok, parenthesis needs fix 2017-02-10 05:19:26 +01:00
ariard@student.42.fr
1358c367e6 jack a raison: les enums ca marche.. 2017-02-10 01:43:20 +01:00
Jack Halford
e8cd4f45b0 started to work on lexer_stack 2017-02-10 00:38:45 +01:00
ariard@student.42.fr
87b7d65d71 archi ok, test struct de grammaire 2017-02-09 20:34:09 +01:00
ariard@student.42.fr
e7a7fc04df proto parser en cours 2017-02-09 18:10:28 +01:00
wescande
74713d84b0 rectif memrealloc 2017-02-09 17:02:35 +01:00
ariard@student.42.fr
ebc57c0da8 parser as a pushdown automata, test 2017-02-09 16:06:05 +01:00
ariard@student.42.fr
5dc789ebda before test pushdown automata 2017-02-08 23:29:13 +01:00
ariard@student.42.fr
5ec1e4c29f before test pushdown automata 2017-02-08 23:28:18 +01:00
Jack Halford
c5263b51d0 Merge branch 'random_fixes' 2017-02-08 22:49:01 +01:00
Jack Halford
5a033a8789 fcntl for saving fds, new option to distinguish interactive shell or not 2017-02-08 22:48:37 +01:00
wescande
6c8ea86a24 ajout memrealloc et modif token_append sur les char esc et esc2 2017-02-08 18:46:16 +01:00
Jack Halford
a99ef894e7 maakefile switch echo to printf 2017-02-07 22:42:02 +01:00
Jack Halford
bb666ba0c6 escaped codes in makefile are now \e 2017-02-07 20:16:53 +01:00
wescande
87e5d1eed0 mise norme 2017-02-07 19:58:32 +01:00
wescande
c2d979012a rectif du ./ dans le glob + optim du nb de result dans le cas de recherche cross-dir 2017-02-07 19:53:12 +01:00
wescande
90611cf046 Merge branch 'master' of github.com:jzck/minishell
rectif read
2017-02-07 19:00:51 +01:00
wescande
afd57a576c rectif invalid read on glob.c because of len instead of (len >> 3) + 1 2017-02-07 19:00:39 +01:00
Jack Halford
28acb3b814 removed lexer_var and prototype 2017-02-07 18:14:57 +01:00
Jack Halford
b613f9fb89 conflicts resolved 2017-02-07 18:06:30 +01:00
Jack Halford
a01b7b76ab redirection now works with builtins! 2017-02-07 17:57:52 +01:00
wescande
8539dc9ddf libft with new makfile 2017-02-07 17:43:22 +01:00
wescande
6648487f4a mergeing of branch var expansion 2017-02-07 17:40:10 +01:00
wescande
7610136d18 expansion des variables ok, fait a l'execution et plus dans le lexer (laissé en commentaire dans le lexer) 2017-02-07 17:22:39 +01:00
gwojda
4dea36519b correction ptit bug touche suppr 2017-02-07 15:28:35 +01:00
Jack Halford
060800769b lexer_comment done 2017-02-07 12:57:46 +01:00
Jack Halford
c56f9dac85 lexer_comment back onto master 2017-02-07 12:38:04 +01:00
Jack Halford
8ae6910122 redirection of identical fds does nothing 2017-02-07 12:03:22 +01:00
Jack Halford
d7f5116eb0 looks promising 2017-02-07 02:07:47 +01:00
Jack Halford
bb52d35f4d starting to fix redirects 2017-02-06 23:49:58 +01:00
ariard@student.42.fr
46ccf47755 loop read again if script modifierd 2017-02-06 22:04:21 +01:00
ariard@student.42.fr
c0977b20ff until exec ok 2017-02-06 21:02:37 +01:00