Commit graph

76 commits

Author SHA1 Message Date
d40b6c3586
debug, destroy all new types (also some code for testing it) 2025-04-15 14:41:43 +02:00
1866da6ea6
fix: make it compile 2025-04-11 16:57:31 +02:00
Jérôme Guélen
10a3c9c411
parse-cmd: Various fixes and a rotation of the parsing tree 2025-04-08 12:14:38 +02:00
0a80b9fbe3
simple_cmd executing refactor: put builtin related utilities into own file 2025-04-01 16:38:41 +02:00
299e016a27
export: handle simple cases 2025-04-01 14:39:02 +02:00
bac3512898
minishell: do variable substitution in postprocessing 2025-04-01 13:50:14 +02:00
e93e6efb93
builtins: cd: implement cd to absolute paths 2025-03-31 16:34:48 +02:00
5ce4a2b85f
builtin: implement pwd 2025-03-31 14:54:40 +02:00
1c4733b1cc
here_doc: print error if failed to create temp file 2025-03-28 19:10:43 +01:00
a4c482e8f9
here_doc: perform variable expansion 2025-03-28 16:45:28 +01:00
Jérôme Guélen
5ff990ef50 Parsing-refactor: Determining structures. 2025-03-28 15:03:15 +01:00
befe219436
simple_cmd executing: works with arguments and env
Does not handle redirections at all, no special facilities are in place to allow
nofork or builtin execution.
2025-03-28 14:50:37 +01:00
f07a80c762
postprocessing: do quote removal 2025-03-28 14:50:37 +01:00
0fbfee7d78
cmdgroup parsing: parse cmdlist surrounded by parentheses 2025-03-28 14:50:37 +01:00
185a069044
cmdgroup parsing refactor: use builder pattern
This will make it easier to add the next logic stuff to it
2025-03-28 14:50:37 +01:00
448458b37f
redirection parsing: parse redirections for cmdgroup 2025-03-28 14:50:37 +01:00
36c1b72eff
tests: implement a better integration test framework than shellspec
(for our usecase at least)
2025-03-28 14:50:37 +01:00
1f03cbbedb
tree debug: implement rest of tree debug
This is a big commit, sorry!
2025-03-28 14:50:37 +01:00
5379ad34f2
cmdlist debug: implement debug func (STUB)
I need to actually parse some cmdlists for this to have any meaning further
2025-03-28 14:50:37 +01:00
40c5164eef
tree debug: create library for easy indent/dedent 2025-03-28 14:50:37 +01:00
131ba36d93
cmdlist refactor: use cmdlist instead of command_list as a shorthand
I hope this doesn't break too much code ^^
2025-03-28 14:50:37 +01:00
56fe943efc
cmdlist: use new architecture (STUB)
I fixed the tests, and the basic functionallity of detecting pipelines works,
but detecting nested cmdgroups is not yet implemented
2025-03-28 14:50:37 +01:00
d069abcd43
Makefile: add rules to build main executable with sanitizers 2025-03-28 14:50:37 +01:00
bc5be67bf6
cmdgroup parsing: parse empty wordlist 2025-03-28 14:50:37 +01:00
0d4edd4809
fix compile issues with duplicate function defs 2025-03-21 13:50:46 +01:00
46c288c858
wordlist: add a function to debug-print a wordlist 2025-03-21 10:44:37 +01:00
Jérôme Guélen
0f8b18b32f
Expansion: Fixed inclusions and Norm checked
Now on to remake tests properly.
2025-03-21 10:14:37 +01:00
Jérôme Guélen
bed41f4a6f
Expansion: A fix attempt
No time left to check before going home
2025-03-21 10:14:34 +01:00
Jérôme Guélen
fc12d8e057
Expansion: fix: algo was wrong for wildcard
Hopefully, this is a proper fix. This commit serves mainly to save
advancement.
2025-03-21 10:12:56 +01:00
63df02aec5
fix: does not compile 2025-03-21 10:09:32 +01:00
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