Skip to content

Commit a701733

Browse files
committed
Update README.md & Remove specified version of pygments in requirements.txt
1 parent e0406d4 commit a701733

2 files changed

Lines changed: 29 additions & 11 deletions

File tree

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
## Project description:
77
* Own programming language „GreekBase”.
8-
* The aim for this project is to create an experimental programming language inspired by [Ada](https://www.adacore.com/about-ada)'s rules and syntax for [*Compilation Theory and Compilers*](https://sylabusy.agh.edu.pl/pl/1/2/19/1/4/16/140#nav-tab-10) classes. We want to change it a bit and make it more convenient, for example with built-in list operations and some other enhancements.
8+
* The aim for this project is to create an experimental programming language inspired by [Ada](https://www.adacore.com/about-ada)'s rules and syntax for [*Compilation Theory and Compilers*](https://sylabusy.agh.edu.pl/pl/1/2/19/1/4/16/140#nav-tab-10) classes. We want to change it a bit and make it more convenient with some small enhancements.
99
* Implemented in **Python** using [ANTLR4](https://www.antlr.org).
10-
* Language compiled to **C** (exact features: TBA, probably at the end of the main development, just around the time of the project evaluation).
10+
* Language compiled to **C**.
1111

1212
## Target group
13-
* This project aims to cater to people who are interested in Ada, want a quick setup with simple gui. The only thing you need is a prior knowledge of C language, so it's an interesting programming trivia for example for people on 2 semester of **ISI on AGH**. You can explore ada examples that are stored in example folder :)
13+
* This project aims to cater to people who are interested in Ada, want a quick setup with simple GUI. The only thing you need is a prior knowledge of C language (or just how to compile it further), so it's an interesting programming trivia for example for people on the second semester of **ISI on AGH**. You can explore GB examples that are stored in inputs folder :)
1414

1515
## Project structure
1616
```
@@ -25,12 +25,14 @@ GreekBase
2525
├── src/
2626
│ ├── ast_builder.py ← used for generating AST tree from ANTLR tree
2727
│ ├── astGreek.py ← AST tree node classes
28+
│ ├── error_listener.py ← syntax ANTLR errors handling etc.
2829
│ ├── semantic_checker.py ← semantic errors handling etc.
2930
│ ├── codegen.py ← C (from AST) code generator
3031
│ ├── compiler_core.py ← logic of compiler used in main and gui
3132
│ └── gui.py ← graphic interface for compiler
3233
├── inputs/ ← example source files
3334
├── output/ ← generated C source files
35+
├── requirements.txt ← list of packages required to run the compiler (compatible with pip)
3436
├── run.sh ← bash (Linux etc.) script for generating ANTLR files
3537
├── run.bat ← bat (Windows) equivalent of the above one
3638
└── main.py ← main file that starts the compiler
@@ -53,27 +55,32 @@ pip install -r ./requirements.txt
5355
./[run.sh](./run.sh)
5456
in order to generate the parser and its tools needed later, but they should be already generated in ./[antlr/generated/](./antlr/generated/).
5557

56-
Example input files are in ./[inputs](./inputs) directory and they have .gb extension.
57-
For now, printing the Abstract Syntax Tree is possible, as well as receiving semantic errors and warnings in the console.
58+
Example input files are in ./[inputs](./inputs) directory and they have .gb extension (.adan also supported to honor the archetype).
59+
For now, printing the Abstract Syntax Tree is possible, as well as receiving syntax errors, semantic errors and warnings in the console or GUI.
5860
Output C source file is (by default) saved to ./[output/](./output/) directory if there are no [Error]s.
5961

60-
2. You can use the graphical interface by running the ./[main.py](./main.py) file without any arguments.
62+
2. You can use the graphical interface by running the ./[main.py](./main.py) file without any command arguments.
6163

62-
3. For specific information about the compiler usage in command line interface, you can run:
63-
```
64+
3. For specific information about the compiler usage in the command line interface, you can run:
65+
```bash
6466
python main.py --help
6567
```
6668

6769
4. Compile the GreekBase language source file by typing its path as the first argument:
68-
```
70+
```bash
6971
python main.py example.gb
7072
```
7173

7274
5. There is an option: -o output_path:
73-
```
75+
```bash
7476
python main.py example.gb -o my_path/my_name.c
7577
```
7678

79+
6. If there is a need for an abstract syntax tree program object print:
80+
```bash
81+
python main.py example.gb -o my_path/my_name.c --ast
82+
```
83+
7784
### 3. Example
7885
1. Source file (.gb):
7986
```ada
@@ -140,3 +147,14 @@ return 0;
140147
}
141148

142149
```
150+
151+
### 4. Features:
152+
* bulit-in types: int, float, char, simplified string, bool
153+
* if conditions
154+
* built-in arithmetic: multiplication, division, modulo, addition, substraction, bracketing
155+
* variables and their declarations
156+
* loops (while)
157+
* assignments
158+
* print statements
159+
* functions
160+
* etc.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
tk
33

44
# colours in GUI
5-
pygments==2.19.1
5+
pygments

0 commit comments

Comments
 (0)