equal
deleted
inserted
replaced
1 /** |
1 /** |
2 * Ein-Pass-Compiler |
2 * Ein-Pass-Compiler |
3 * Adapted from: http://de.wikipedia.org/wiki/Compiler |
3 * Adapted from: http://de.wikipedia.org/wiki/Compiler |
4 */ |
4 */ |
5 |
5 |
|
6 #include <stdio.h> |
6 #include <stdlib.h> |
7 #include <stdlib.h> |
7 #include <stdio.h> |
|
8 #include <string.h> |
8 #include <string.h> |
9 |
9 |
10 #define MODE_POSTFIX 0 |
10 #define MODE_POSTFIX 0 |
11 #define MODE_ASSEMBLY 1 |
11 #define MODE_ASSEMBLY 1 |
12 #define MAX 20 |
12 #define MAX 20 |
108 compile_mode = MODE_ASSEMBLY; |
108 compile_mode = MODE_ASSEMBLY; |
109 pos = 0; |
109 pos = 0; |
110 lookahead = *expression; |
110 lookahead = *expression; |
111 expr (); |
111 expr (); |
112 |
112 |
113 return 0; |
113 return EXIT_SUCCESS; |
114 } |
114 } |