<commit_before>## Copyright (C) 2007 <NAME>

## Master Thesis Compiler
This project it a practical part of my master thesis `Syntax, semantics analysis methods and assembly code generating for Intel x86 architecture' describes lexical analysis, parsing theory, semantic analysis focused on types and classes and computer's architecture basics. It contains a source code of a compiler for a simplified version of C language.

## Website
https://github.com/wo3kie/mtc

## Requirements
* C++03
* flex++ >=2.5.35, optional, only if you change scanner.l
* bison++ >= 1.21.9-1, optional, only if you change bison_parser.y
* loki library, included as part of my code in version 0.1.7 [link](http://loki-lib.sourceforge.net/)
  
## How to build code?
make

## How to run it?
./mtc.sh tests/expression_1.mtc

## How to write your own program
Please follow examples in 'tests' directory. Shortly speaking mtc has C like syntax with no struct support.

```
// tests/factorial.mtc

int factorial_recursive( int _value ){
    if( _value == 0 ) return 1;
    else return _value * factorial_recursive( _value - 1 );
}
<commit_msg>readme update<commit_after>## Copyright (C) 2007 <NAME>

## Master Thesis Compiler
This project it a practical part of my master thesis `Syntax, semantics analysis methods and assembly code generating for Intel x86 architecture' describes lexical analysis, parsing theory, semantic analysis focused on types and classes and computer's architecture basics. It contains a source code of a compiler for a simplified version of C language.

## Website
https://github.com/wo3kie/mtc

## Requirements
* C++03
* flex++ >=2.5.35, optional, only if you change scanner.l
* bison++ >= 1.21.9-1, optional, only if you change bison_parser.y
* loki library, included as part of my code in version 0.1.7 [link](http://loki-lib.sourceforge.net/)
  
## How to build code?
make

## How to run it?
./mtc.sh tests/expression_1.mtc

## How to write your own program
Please follow examples in 'tests' directory. Shortly speaking mtc has C like syntax with no struct support.
  
```{r, engine='cpp'}
// tests/factorial.mtc

int factorial_recursive( int _value ){
    if( _value == 0 ) return 1;
    else return _value * factorial_recursive( _value - 1 );
}

{'fraction_non_alphanumeric': 0.09693196976433971, 'fraction_numerical': 0.022232103156958647, 'mean_word_length': 4.172413793103448, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3123973', 'n_tokens_mistral': 705, 'n_tokens_neox': 648, 'n_words': 289}