-
Notifications
You must be signed in to change notification settings - Fork 0
/
memon.h
58 lines (53 loc) · 1.08 KB
/
memon.h
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
typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
typedef struct{
u32 noteLength; //l
u32 panel; //n
u32 tail; //p
u32 timing; //t
}Note;
typedef struct{
float BPM;
float offset;
}Metadata;
typedef struct{
char difficulty[4];
u32 level;
u32 resolution;
u32 noteCount;
Metadata info;
Note* notes;
}MemonInfo;
typedef enum{
LCURL, //0
RCURL, //1
COLON, //2
QUOTE, //3
COMMA, //4
LBRACKET, //5
RBRACKET, //6
BLANK, //7
NEWLINE, //8
NONE, //9
SCANEOF
}MemonToken;
void noteStatement();
void noteScanner();
float getFloatValue();
u32 getValue();
void getString(char* str);
void match(MemonToken expected);
void memonError();
MemonToken tokenScanner();
int isEmptySpace(char c);
void appendNote();
void copyNote(Note currNote, Note newNote);
void initializeMemon();
void addNotes();
void statement();
void statement_list();
void memon();
void parser();
void displayMemonInfo();
MemonInfo interpretMemonInfo(char* filename);