Commit graph

46 commits

Author SHA1 Message Date
Jérôme Guélen
e348040ea4
Subst: A norm NON-compliant and incomplete version
The code does not update flags yet and is to be refactored to conform to the
norm.
Tests required but needing a new version of the wordsplitting code.
2025-03-21 10:07:32 +01:00
7c6d061c6c
here_doc: handle input with correct end marker 2025-03-11 14:58:13 +01:00
0486368a07
buffer: add ft_buffer_to_charptr function 2025-03-11 14:58:13 +01:00
cae2dfe4d6
here_doc: basic setup 2025-03-11 14:58:13 +01:00
4116c2d92f
wordlist: add destroy_idx and pop_idx functions 2025-03-10 16:08:59 +01:00
b0439c9d7d
redirection parsing: get redirection type from worddesc 2025-03-10 15:10:18 +01:00
541bad80c0
redirection parsing: add utility functions for t_redir_list 2025-03-10 15:10:18 +01:00
b0c34f36ef
redirection parsing: add utility function for t_redirection 2025-03-10 15:10:18 +01:00
cf517bb7f8
redirection parsing: define types in own files 2025-03-10 15:10:18 +01:00
06ebcf132a
redirection parsing: handle commands with no redirections 2025-03-10 15:10:18 +01:00
f3a38fb430 norm: remove print_backtrace 2025-03-10 13:22:29 +00:00
5cd755b73c wip: make a copy of words in pipeline_from_wordlist 2025-03-10 13:22:29 +00:00
d303f22b73 wip: tests: show more debug information 2025-03-10 13:22:29 +00:00
bccd68b11f command list refactor: put functions in correct file 2025-03-10 13:22:29 +00:00
3b8b2c7a4a wordlist: add a function to debug-print a wordlist 2025-03-10 13:22:29 +00:00
eb21f00156 command list parsing: handle empty input
This is really not that usefull, it is more to setup the groundwork
2025-03-10 13:22:29 +00:00
0fecded23b
quote removal: handle strings with no quotes 2025-03-07 11:09:21 +01:00
36df14e599
refactor pipeline: use a state machine for parsing
This allows for easier-to-norm code
2025-02-24 15:10:29 +01:00
2b8bb859d1
matchers: add matcher for a pipe 2025-02-24 14:56:16 +01:00
256a8f5f9b
pipeline: handle parsing of single-command pipelines 2025-02-24 14:56:16 +01:00
49d7a2b9ff
simple_cmd: initial setup of create/destroy functions 2025-02-21 12:44:17 +01:00
e10ed04169
matcher: is_quote 2025-02-20 15:00:48 +01:00
f86de825bd
rule utils: unquoted operator 2025-02-20 15:00:48 +01:00
6c8dd312c0
wordsplit: make it compile 2025-02-20 15:00:48 +01:00
f92763e479
wordsplit: handle operators 2025-02-20 15:00:32 +01:00
65b57987b5
buffer: add buffer struct and related functions 2025-02-20 15:00:32 +01:00
aa12f7c971
matchers: add matcher for <blank> character class 2025-02-20 15:00:11 +01:00
a083800506
word splitting: a single word is not split
Sorry this commit is a bit big, lots of groudwork is being established here
2025-02-20 14:55:29 +01:00
abea59eba4
get_command refactor: put into own file 2025-02-20 14:40:57 +01:00
e445f668b3
env_manip: sort funcs per structure that is being manipulated
This is instead of the operation that is being performed.

I find it more logical this way, but if you prefer we can keep it as-is.

I also put the identifier_isvalid func into parser/matchers
2025-02-19 14:47:10 +01:00
Jérôme Guélen
30d32a1d53 ft_errno: integrate ft_errno library 2025-02-19 14:34:09 +01:00
Jérôme Guélen
660d785237 ENV: A small set of functions for internal env 2025-02-19 14:34:09 +01:00
Jérôme Guélen
5b00059526 refactor: rename env_get_set.c to env_get.c 2025-02-19 14:34:09 +01:00
897f6c6a6b
fix(Makefile): ASAN malloc stacktraces were being truncated 2025-02-19 14:34:09 +01:00
a6ce45ca87
tests Makefile: add rules to run C tests iwth specific sanitizer 2025-02-19 14:34:08 +01:00
c7a86eecfd
tests: tests can now use libft 2025-02-19 14:34:08 +01:00
da447a2491
env_manip: make it compile 2025-02-19 14:34:08 +01:00
67ffe772b0
Makefile: add rule to run only C tests 2025-02-13 15:42:02 +01:00
2d03d208e8
fix(Makefile): norm should check the libft 2025-02-12 17:01:43 +01:00
Jérôme Guélen
ddb2306630 libs: added libft 2025-02-12 15:12:42 +01:00
Khaïs COLIN
7a99014485
new matcher: metacharacter (separates words) 2025-02-07 15:29:43 +01:00
Khaïs COLIN
60d9b212fb
tests: add infrastructure for writing tests in C 2025-02-07 15:29:43 +01:00
Khaïs COLIN
e022ca0ce7
tests: add shellspec spec file 2025-02-07 15:29:43 +01:00
Khaïs COLIN
a23b639f78
read: read a line with readline and echo it back 2025-02-07 15:29:43 +01:00
Khaïs COLIN
6b7557f693
Makefile: add rule to check norm 2025-02-07 15:29:43 +01:00
Khaïs COLIN
2f33e82d0d
add Makefile 2025-02-07 15:29:43 +01:00