Skip to content

Commit

Permalink
Merge pull request #30 from mrLSD/feat/refactore-extend-expression
Browse files Browse the repository at this point in the history
Feat: refactore extend expression
  • Loading branch information
mrLSD authored Mar 26, 2024
2 parents fb7afaa + acf80b8 commit 76126a5
Show file tree
Hide file tree
Showing 20 changed files with 783 additions and 556 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "semantic-analyzer"
version = "0.4.0"
version = "0.4.1"
authors = ["Evgeny Ukhanov <mrlsd@ya.ru>"]
description = "Semantic analyzer library for compilers written in Rust for semantic analysis of programming languages AST"
keywords = ["compiler", "semantic-analisis", "semantic-alalyzer", "compiler-design", "semantic"]
Expand All @@ -20,7 +20,7 @@ doctest = false

[dependencies]
nom_locate = "4.2"
serde = { version = "1", features = ["derive"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }

[dev-dependencies]
serde_json = "1"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
Semantic analyzer is an open source semantic analyzer for programming languages
that makes it easy to build your own efficient compilers with extensibility in mind.

## 🌀 What is the library for and what tasks does it solve
## 🌀 What the library is for and what tasks it solves

Creating a compilers for a programming language is process that involves several key
stages. Most commonly it is:
stages. Most commonly they are:

▶️ **Lexical Analysis (Lexer)**: This stage involves breaking down the input stream
of characters into a series of tokens. Tokens are the atomic elements of the programming language, such as identifiers, keywords, operators, etc.
Expand All @@ -32,7 +32,7 @@ This can include dead code elimination, expression simplification, etc.
▶️ **Code Generation**: This is the final stage where the compiler transforms the optimized intermediate representation (IR) into
machine code specific to the target architecture.

This library represent **Semantic Analysis** stage.
This library represents **Semantic Analysis** stage.

### 🌻 Features

Expand Down Expand Up @@ -122,7 +122,7 @@ The ability to implement custom instructions for these custom expressions in the
## 🛋️ Examples

- 🔎 There is the example implementation separate project [💾 Toy Codegen](https://github.com/mrLSD/toy-codegen).
The project uses the `SemanticStack` results and converts them into **Code Generation** logic. Which clearly shows the
The project uses the `SemanticStack` results and converts them into **Code Generation** logic which clearly shows the
possibilities of using the results of the `semantic-analyzer-rs` `SemanticStackContext` results. LLVM is used as a
backend, [inkwell](https://github.com/TheDan64/inkwell) as a library for LLVM codegen, and compiled into an executable
program. The source of data is the AST structure itself.
Expand All @@ -136,7 +136,7 @@ Available library rust features:
nuance is that any library that implements `Serde` can act as a
serializer `codec`. For example formats: `json`, `toml`, `yaml`,
`binary`, and many others that can use `serde` library.
The main entities, which apply the `codec` feature is:
The main entities, which apply the `codec` feature are:
- [x] `AST` ↪️ AST data source can be presented with serialized source.
This is especially useful for designing and testing `Codegen`, AST data
transfer pipeline, and also for use as a data generation source for
Expand Down
Loading

0 comments on commit 76126a5

Please sign in to comment.