You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/julec/README.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,12 @@ That's why paths are adjusted accordingly.
11
11
12
12
> Some important parts of the reference compiler are publicly available in the standard library. See [`std/jule`](https://github.com/julelang/jule/tree/master/std/jule) library.
JuleC has a structure that handles processes step by step. \
17
15
The working principle of the compiler roughly consists of the steps described below.
18
16
19
-
After obtaining the source code, the first step is to perform lexical analysis
17
+
After obtaining the source code, the first step is to perform lexical analysis.
20
18
As a result of lexical analysis, the tokens of the source code are obtained.
21
-
These tokens are then used to generate AST.
19
+
These tokens will be used to generate AST by parser.
22
20
23
21
Parser, which performs the syntax check and builds the AST tree of the code, is responsible for the next step.
24
22
Parser gives an AST as a result, which is ready for semantic analysis.
@@ -35,17 +33,17 @@ The middle-end performs possible optimizations on the IR independent of the targ
35
33
Depending on the middle-end compiler configurations, it may produce different optimizations or not optimize at all.
36
34
37
35
38
-
The final final stage is code generation. \
39
-
This stage is the stage where the compiler generates object code.
36
+
The final stage is code generation. \
37
+
This stage is the stage where the compiler generates object code from IR.
40
38
41
39
### 1. Lexer
42
40
43
-
The package [``./token``](https://github.com/julelang/jule/tree/master/std/jule/token) is Lexer. \
41
+
The package [``./token``](https://github.com/julelang/jule/tree/master/std/jule/token) is the Lexer. \
44
42
Makes lexical analysis and segments Jule source code into tokens.
45
43
46
44
### 2. Parser
47
45
48
-
The package [``./parser``](https://github.com/julelang/jule/tree/master/std/jule/parser) is Parser. \
46
+
The package [``./parser``](https://github.com/julelang/jule/tree/master/std/jule/parser) is the Parser. \
49
47
Makes syntax analysis and builds abstract syntax tree (AST) of code.
50
48
51
49
### 3. Sema
@@ -64,7 +62,6 @@ These optimizations are optimizations that are independent of the target system,
64
62
Stages such as generating machine code, generating C++ code are included here. \
65
63
Actually, JuleC just generates C++ code for now.
66
64
67
-
68
65
## Developer Reference
69
66
70
67
-**(1)** All definitions should be listed when obtained after semantic analysis. This sorting should be done by dependency. Jule provides an orderer algorithm for this. After semantic analysis, all definitions must be sorted and ready. If this sorted data is needed in the next stages, everything is considered to be in order. Assumed as already ordered.
0 commit comments