implement lexical analysis function for c-minus

This commit is contained in:
2025-10-02 07:14:04 +09:00
parent 87931e8cc2
commit 9af73c5a15
9 changed files with 600 additions and 354 deletions

16
src/test.cm Normal file
View File

@@ -0,0 +1,16 @@
/* A program to perform Euclid's
Algorithm to compute gcd */
int gcd(int u, int v)
{
if(v == 0) return u;
else return gcd(v, u- u/v * v);
/* hello u-u/v*v == u mod v */
}
void main()
{
int x; int y;
x = input(); y = input();
print(gcd(x, y));
}