<commit_before># LambCompiler v0.0.4

This is a simple compiler for a subset of ANSI C. By now, it can generate the pseudo-code without type-checking.

![](https://raw.githubusercontent.com/Jameeeees/LambCompiler/master/doc/output.PNG)

### 1. Before Compilation
See `config.h`, make sure it is the desired configuration. The default configuration is `Test Mode`, which means it use the previously defined test data.

### 2. How to compile
Make sure you have installed GNU Make

* Run `make lexer` to compile the lexer, the executable file is under `LambCompiler/bin`
* Run `make compiler` to compile the compiler, the executable file is under `LambCompiler/bin`
* The default configuration is `make compiler`

### 3. Usage

#### 3.1 Normal Mode
* ./compiler [filename]
* ./compiler -v
* ./compiler -h

#### 3.2 Test Mode (no parameter needed)
* ./compiler

<commit_msg>README update<commit_after># LambCompiler v0.0.4

This is a simple compiler for a subset of ANSI C. By now, it can generate the pseudo-code without type-checking.

### 1. Before Compilation
See `config.h`, make sure it is the desired configuration. The default configuration is `Test Mode`, which means it use the previously defined test data.

### 2. How to compile
Make sure you have installed GNU Make

* Run `make` or `make compiler` to compile the compiler, the executable file is under `LambCompiler/bin`
* Run `make lexer` to compile the lexer, the executable file is under `LambCompiler/bin`

### 3. Usage

#### 3.1 Normal Mode
* ./compiler [filename]
* ./compiler -v
* ./compiler -h

#### 3.2 Test Mode (no parameter needed)
* ./compiler

![](https://raw.githubusercontent.com/Jameeeees/LambCompiler/master/doc/output.PNG)

{'fraction_non_alphanumeric': 0.10869565217391304, 'fraction_numerical': 0.011750881316098707, 'mean_word_length': 4.098802395209581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4564707', 'n_tokens_mistral': 518, 'n_tokens_neox': 491, 'n_words': 221}