Skip to content

Commit

Permalink
Merge pull request #49 from ErwannLesech/pretty-print2
Browse files Browse the repository at this point in the history
doc<README>: add some important content in README
  • Loading branch information
ErwannLesech authored Jan 16, 2024
2 parents 2c483e7 + 0ea9703 commit 6576b5b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Contributing](#contributing)
- [Contious Integration](#continuous-integration)

## Installation

Expand Down Expand Up @@ -52,6 +54,42 @@ $ ./42sh --logger # Print some informations during process
$ ./42sh --pretty-print # Print the parser AST
```

In case of `pretty-print` option, a `.gv` file is generated. To convert it to a `.png` to visualise the ast, here is the line:

```sh
dot -Tpng pretty_print.gv -o ast.png
display ast.png
```

## Features

In the 42sh project, our primary objective was to implement a comprehensive set of POSIX features.

These features include, but are not limited to, what follows :

*Each step represents every week working on the project.*

### Step 1

- **Conditionnal operators** (if, elif, else, fi)
- **Commands list** (echo ; ls)
- **Single quote strings** (echo 'It is an \\'exemple\\'')
- **Comments** (echo exem# it is a comment)
- **Simple commands** (echo, ls, cat, tr, ...)
- **Simple builtins** (true, false, echo -enE)

### Step 2

- **Redirections** (>, <, >>, >&, <&, >|, <>)
- **Pipes** (echo dad | tr a e)
- **Negation** (! true)
- **Basic loops** (while, until)
- **Operators** (&&, ||)
- **Double quote strings** (echo "This variable $a is an amount in \$")
- **Variables** (a=2, $a, $#, $*, $RANDOM, $UID, $IFS, ...)
- **For loops**


## Contributing

All contributions are done by doing a merge request when you are done working on your own branch
Expand Down Expand Up @@ -106,3 +144,19 @@ fix(http_parser): use the correct HTTP response code for wrong version
Use the HTTP error 405 instead of 400 if the request contains an unsupported HTTP version.
```

## Continuous Integration

Powered by LESECH Erwann.

At every `push/pull_request` to `master` and `dev`, the CI is executed to check some rules and deploy the result to gh-pages.

Here are main rules to respect in order to check the CI program:

- `configure.ac` and `Makefile.am` are used to compile and run the testsuite of 42Sh.

- `.clang-format` is used to diff the whole project and check if it's clang-format compliant.

- `github/workflows/clang_tidy.sh` is a shell script that verify if the 42Sh is clang-tidy compliant.

- `Doxyfile` must be pushed to be used with `doxygen` in order to generate the documentation.

0 comments on commit 6576b5b

Please sign in to comment.