@@ -88,83 +88,83 @@ Met le ici
88
88
You must have ` gcc ` , ` bison ` or ` yacc ` , ` flex ` or ` lex ` and ` glib ` .
89
89
90
90
---
91
- > ** Warning!** For all commands, do not enter the ` $ ` or the ` > ` !
91
+ > ** Warning!** For all commands, do not enter the ` $ ` , the ` # ` or the ` C:\ >` !
92
92
---
93
93
94
94
### 1: Go to your directory
95
95
96
96
#### Windows
97
97
98
- On Windows, enter this command:
98
+ On Windows, type this command:
99
99
100
100
``` bat
101
- > cd <directory name>
101
+ cd <directory name>
102
102
```
103
103
104
104
` <directory name> ` is the directory where you installed folder "4u vX.X.X" (X.X.X is your version number).
105
105
The path is like ` C:\Users\user\Documents\src\'4U 0.0.0' `
106
106
107
107
#### Linux
108
108
109
- On Linux, enter this command:
109
+ On Linux, type this command:
110
110
111
111
``` bash
112
- $ cd < directory name>
112
+ cd < directory name>
113
113
```
114
114
115
115
` <directory name> ` is the directory where you installed folder "4u vX.X.X" (X.X.X is your version number).
116
116
The path is like ` /home/user/Documents/src/'4U 0.0.0' ` or ` ~/Documents/src/'4U 0.0.0' ` .
117
117
118
118
### 2: Compile the lexical analyzer
119
119
120
- Enter this command (if you use ` flex ` ):
120
+ Type this command (if you use ` flex ` ):
121
121
122
122
``` bash
123
- $ flex -o lexique_4u.c lexique_4u.lex
123
+ flex -o lexique_4u.c lexique_4u.lex
124
124
```
125
125
126
126
### 3: Compile the syntax analyzer
127
-
128
- Enter this command (if you use ` bison ` ):
127
+
128
+ Type this command (if you use ` bison ` ):
129
129
130
130
``` bash
131
- $ bison -d syntax_4u.y
131
+ bison -d syntax_4u.y
132
132
```
133
133
134
134
### 4: Compile the compiler
135
135
136
136
#### v0.x.x
137
137
138
- Enter this command (if you use ` gcc ` ) to compile the compiler:
138
+ Type this command (if you use ` gcc ` ) to compile the compiler:
139
139
140
140
``` bash
141
- $ gcc lexique_4u.c syntax_4u.tab.c generation_code.c ` pkg-config --cflags --libs glib-2.0` -o 4u
141
+ gcc lexique_4u.c syntax_4u.tab.c generation_code.c ` pkg-config --cflags --libs glib-2.0` -o 4u
142
142
```
143
143
144
144
#### v1.x.x
145
145
146
- Enter this command (if you use ` gcc ` ) to compile the compiler:
146
+ Type this command (if you use ` gcc ` ) to compile the compiler:
147
147
148
148
``` bash
149
- $ gcc lexique_4u.c syntax_4u.tab.c generation_code_c.c generation_code_js.c ` pkg-config --cflags --libs glib-2.0` -o 4u
149
+ gcc lexique_4u.c syntax_4u.tab.c generation_code_c.c generation_code_js.c ` pkg-config --cflags --libs glib-2.0` -o 4u
150
150
```
151
151
152
152
### 5: Execute the 4U program
153
153
154
- Enter this command (if you use ` gcc ` ) in a terminal to transform the 4U code in C:
154
+ Type this command (if you use ` gcc ` ) in a terminal to transform the 4U code in C:
155
155
156
156
``` bash
157
- $ ./4u program.4u
157
+ ./4u program.4u
158
158
```
159
159
160
160
` <program.4u> ` is the name of your program.
161
161
162
162
### 6: Compile the program
163
163
164
- Enter this command to compile the C program:
164
+ Type this command to compile the C program:
165
165
166
166
``` bash
167
- $ gcc program.c
167
+ gcc program.c
168
168
```
169
169
170
170
` <program.c> ` is the name of your program (compiled).
@@ -173,18 +173,18 @@ $ gcc program.c
173
173
174
174
#### Windows
175
175
176
- Enter this command to run the compiled program:
176
+ Type this command to run the compiled program:
177
177
178
178
``` bat
179
- > ./a.exe
179
+ ./a.exe
180
180
```
181
181
182
182
#### Linux
183
183
184
- Enter this command to run the compiled program:
184
+ Type this command to run the compiled program:
185
185
186
186
``` bash
187
- $ ./a.out
187
+ ./a.out
188
188
```
189
189
190
190
### 8: End
@@ -193,7 +193,7 @@ It's OK! Your code was executed! If you want to re-execute your code (and it's n
193
193
Else, you can execute (if you want):
194
194
195
195
``` bash
196
- $ cd
196
+ cd
197
197
```
198
198
199
199
## Compile Command
@@ -207,8 +207,9 @@ You can go [here](/commands) for more informations.
207
207
To compile command, here is a simple way to do it on Windows. Go to the 4U command file and type:
208
208
209
209
``` bat
210
- > mkdir bin
211
- > gcc *.c -o bin/4U
210
+ C:\> mkdir bin
211
+
212
+ C:\> gcc *.c -o bin/4U
212
213
```
213
214
214
215
It will create an executable. If you want to use it all days, we really recommend add the ` bin/ ` folder into the PATH.
0 commit comments