|
9 | 9 | </div>
|
10 | 10 |
|
11 | 11 | Semantic analyzer is an open source semantic analyzer for programming languages
|
12 |
| -that makes it easy to build your own efficient compilers. |
| 12 | +that makes it easy to build your own efficient compilers with extensibility in mind. |
13 | 13 |
|
14 | 14 | ## 🌀 What is the library for and what tasks does it solve
|
15 | 15 |
|
@@ -53,6 +53,10 @@ Supported condition expressions and condition expression correctness check.
|
53 | 53 | ✅ **Building the Symbol Table**: For analyzing used the symbol table as data structure used by the semantic analyzer to keep track of
|
54 | 54 | symbols (variables, functions, constants) in the source code. Each entry in the symbol table contains the symbol's name, type, and scope related for block state, and other relevant information.
|
55 | 55 |
|
| 56 | +✅ **Generic expression value**: The ability to expand custom expressions for AST, |
| 57 | +according to compiler requirements. And the ability to implement custom instructions |
| 58 | +for these custom expressions in the **Semantic Stack Context**. |
| 59 | + |
56 | 60 | ### 🌳 Semantic State Tree
|
57 | 61 |
|
58 | 62 | The result of executing and passing stages of the semantic analyzer is: **Semantic State Tree**.
|
@@ -104,6 +108,17 @@ analysis and source code parsing, it is recommended to use: [nom is a parser com
|
104 | 108 |
|
105 | 109 | AST displays the **Turing complete** programming language and contains all the necessary elements for this.
|
106 | 110 |
|
| 111 | +## 🔋 🔌 Extensibility |
| 112 | + |
| 113 | +Since `AST` is predefined, but in real conditions it may be necessary to expand the |
| 114 | +functionality for the specific needs of the `compiler`, has been added the functionality |
| 115 | +of the `AST` extensibility and the additional generated set of `Instructions` for |
| 116 | +the **Semantic Stack Context**. |
| 117 | + |
| 118 | +- [x] 🚨 **Genetic expression value**: The ability to expand custom expressions for z, according to compiler requirements. |
| 119 | +The ability to implement custom instructions for these custom expressions in the |
| 120 | +**Semantic Stack Context**. |
| 121 | + |
107 | 122 | ## 🛋️ Examples
|
108 | 123 |
|
109 | 124 | - 🔎 There is the example implementation separate project [💾 Toy Codegen](https://github.com/mrLSD/toy-codegen).
|
|
0 commit comments