Skip to content

Commit

Permalink
Merge branch 'master' of github.com:psde/codepeiler
Browse files Browse the repository at this point in the history
  • Loading branch information
psde committed Jan 17, 2013
2 parents 08b5b42 + 816f378 commit 12176f2
Show file tree
Hide file tree
Showing 26 changed files with 21,087 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
int a;
int b;
int c;
int d;
int[5] e;

a = 2 + 4;
b = a + 6;
c = a + b;
d = a * b;

print(a);
print(b);
print(c);
print(d);
13 changes: 13 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
int a;
int b;
int c;
int d;
int e;

read(a);
read(b);
read(c);
read(d);

e = (((a * b) / c) + d);
print(e);
20 changes: 20 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
int a;
int b;

a = 0;
b = 1;

if(a = b)
{
}
else
{
};

while(a < 10)
{
b = b + 1;
a = a + 1;
};

print(b);
14 changes: 14 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int a;
int b;

a=5;
b=3;

if(a = b)
{
print(a);
}
else
{
print(b);
}
19 changes: 19 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
int a;
int b;
int c;
int d;
int e;

a = 3;
b = a * 5;
c = a + b;
d = 15 / a;
e = 0;

while(a > c){
a = a + 1;
if(a <=> 10)
{
e = e + 1;
};
};
18 changes: 18 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
int x;
int y;
int z;

x = 5;
y = 5;
z = 5;

x = y + 1;
while(z > 0){
x = x - 1;
y = y - 1;
z = z - 1;
};
while(y > 0){
x = z + 0;
y = z + 0;
};
29 changes: 29 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
int a;
int b;
int c;
int d;

d = 0;
read(a);
read(b);
read(c);

if(a < b)
{
if(c > 1)
{
while(d <=> 15)
{
d = d +1;
};
print(d);
}
else
{
print(1);
};
}
else
{
print(1);
};
13 changes: 13 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
int a;
int b;
int c;
int d;

b = 2;
c = 3;

a = ((5 + b) - (2 + 4));
b = ((a + 5) / 3);

print(a);
print(d);
29 changes: 29 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
int a;
int b;
int c;
int d;

a = 5;
b = 5;
c = 0;
d = 0;

if(a > 2)
{
while(c <=> 12)
{
d = d +1;
if(c < 5)
{
c = c + 1;
}
else
{
print(c);
};
};
}
else
{
print(0);
};
14 changes: 14 additions & 0 deletions code/Parser/Neue Testfiles/ParserTest9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int a;
int b;

a = 10;
read(c);

if(a < c)
{
print(c);
}
else
{
print(a);
};
21 changes: 21 additions & 0 deletions code/Parser/Neue Testfiles/ParserTestA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
int a;
int b;

a=1;
b=0;

while(b < 10)
{
a = a + b;
b = b + 1;
print(a);
print(b);
if(a = 10)
{
print(a);
}
else
{
print(b);
};
};
10 changes: 10 additions & 0 deletions code/Parser/Neue Testfiles/ParserTestB.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
int a;
int b;
int c;

a = 10;
b = 30;
c = 0;

c = (b / a) + ((3 * a) - 20);
print(c);
15 changes: 15 additions & 0 deletions code/Parser/Neue Testfiles/ParserTestC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
int a;
int b;
int c;

a=1;
b=2;
c=10;

while(c>0)
{
a = a+b;
c = c+1;
};

print(a);
5 changes: 5 additions & 0 deletions code/Parser/Parser-Test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int n;
int[3] m;
n = 3 + 4;
n = 3*n--5;
print (n);
4 changes: 4 additions & 0 deletions code/Parser/ParserTest0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int n;
n = 3 + 4;
n = 3*n--5;
print (n);
37 changes: 37 additions & 0 deletions code/Parser/ParserTest1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
int mod;
int div; */


/* 33 */
read(a);
/* 5 */
read(b);
/*127*/
read(c);

x=1;
y=a;
while(0 < b){
/* b % 2 */
div = b/2;
mod = b - (div * 2);
if (mod = 1){
/* (x*y)%c */
div = (x*y)/c;
mod = (x*y) - (div * c);
x = mod;
} else {};
/* (y*y)%c */
div = (y*y)/c;
mod = (y*y) - (div * c);
y = mod; /* squaring the base*/
b = b / 2;
};
/* x % c */
div = x/c;
mod = x - (div * c);

print(mod);
print(89);

20 changes: 20 additions & 0 deletions code/Parser/ParserTest10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
int a;
int b;

a = 0;
b = 1;

if(a = b)
{
}
else
{
};

while(a < 10)
{
b = b + 1;
a = a + 1;
};

print(b);
14 changes: 14 additions & 0 deletions code/Parser/ParserTest11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int a;
int b;

a=5;
b=3;

if(a = b)
{
print(a);
}
else
{
print(b);
}
Loading

0 comments on commit 12176f2

Please sign in to comment.