-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimpledecl.c
94 lines (76 loc) · 1.39 KB
/
simpledecl.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* Some simple declarations which the code so far is capable of parsing */
// Scalars
char Tea;
int Sugar;
float Rum;
double Whale;
// Initialised scalars
char Ship = 'S' + 1;
int Sailors = 7 * 6;
float Soon = 12.0f;
double Cargo = 153e4;
// Pointers
void *Sail = 0;
char **Billy = 0;
int *Heave = 0;
float **Rope = 0;
double *Anchor = 0;
// Arrays
char NameOfTheWhale[128];
int Mast[2 * 2];
float Cask[14 + 2];
double Funnel[3];
char *CrewNames['*'];
void *ParrotNames['\x0f'];
// Functions
void PutToSea();
char SeenWhale();
int Blow();
float Buoyancy(void);
double ConsumeRum(void);
char *NameOfTheShip();
char *NameOfTheShip(void)
{
int tea;
register int quickTea;
static char *namePtr;
char *billy;
char captainsInitial;
register char notSoFast;
static char bosunsInitial;
register float heading;
static float buoy;
auto double knots;
static int seaState;
static double funnel;
namePtr;
bosunsInitial;
buoy;
seaState++;
funnel;
tea++;
billy;
captainsInitial--;
knots;
quickTea = 33;
notSoFast = 'S';
heading;
quickTea++;
notSoFast--;
quickTea;
notSoFast;
return 42;
}
int TonguingIsDone = 0; // Cutting strips of blubber
void TakeOurLeaveAndGo(void)
{
static int seaState;
register int parrot;
parrot = 8;
seaState--;
return;
}
void main(void)
{
Sail = NameOfTheShip();
}