diff --git a/README.md b/README.md index 11b1d16be7f701f49b85d5b5eb9b52193ccef0aa..51e560d137c45c66389faa6c35942702e44dc214 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Funk Programming Language ## Introduction - Funk is a custom programming language with its own interpreter. It was developed as part of the TDP019 course at Linköping University. Funk aims to provide a clean, expressive syntax with functional programming capabilities. ## Features @@ -12,7 +11,6 @@ Funk is a custom programming language with its own interpreter. It was developed - Comprehensive logging system ## Project Structure - ```zsh funk/ ├── .vscode/ # VSCode settings and configurations @@ -21,11 +19,19 @@ funk/ │ └── funk # Main Funk interpreter ├── build/ # Object files (generated by make) ├── docs/ # Documentation -│ └── Language Specification.pdf # Formal language specification +│ ├── Language Specification.pdf # Formal language specification +│ └── html/ # Generated Doxygen documentation (after generation) ├── include/ # Header files +│ ├── lexer/ # Lexical analysis components +│ ├── parser/ # Syntax analysis components +│ └── ... # Other headers ├── source/ # Source code +│ ├── lexer/ # Lexer implementation +│ ├── parser/ # Parser implementation +│ └── ... # Other implementations ├── tests/ # Test files for each major feature ├── .clang-format # Clang format configuration +├── Doxyfile # Doxygen configuration file ├── compile+test # Script to compile and run all tests ├── funk.log # Log file (created during execution) └── Makefile # Build system configuration @@ -40,7 +46,6 @@ funk/ - `gtest` library for testing ### Building from Source - 1. Clone the repository: ```zsh @@ -60,11 +65,26 @@ make ``` ## Usage +After building the Funk interpreter, you can use it in the following ways: -To be implemented... +### Running Funk Programs +To execute a Funk program file: +```zsh +./bin/funk <path_to_file> +``` -## Testing +See examples in the [examples](examples) directory. +For more help and options see: +```zsh +./bin/funk --help +``` + +### Logging +The interpreter uses a logging system to provide detailed information about its execution. +The log file is located at `funk.log` but can be changed by adding `--log new/path.log` to the program. + +## Testing Funk comes with a comprehensive test suite to ensure functionality: 1. Run all tests (compiles and executes tests): @@ -84,4 +104,14 @@ make tests ## Documentation +### Language Specification See the [Language Specification](docs/Language%20Specification.pdf) for a formal description of the Funk language. + +### Doxygen Documentation +To generate the detailed documentation, run the following command: +```zsh +doxygen Doxyfile +``` + +The generated documentation will be available in the `docs/html` directory. Open the `index.html` file in a web browser +to view the documentation.