-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompilers.h
More file actions
123 lines (108 loc) · 4.04 KB
/
Compilers.h
File metadata and controls
123 lines (108 loc) · 4.04 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
************************************************************
* COMPILERS COURSE - Algonquin College
* Code version: Summer, 2023
* Author: Hadiyah Khan
* Professors: Paulo Sousa
************************************************************
###################################################
# #
# ALGONQUIN @@@@@@@ COLLEGE #
# @@-----------@@ #
# @@@@|I R O N C L A D|@@@@ #
# @@@@@@@@-----------@@@@@@@@ #
# @@@@@@@@@@@@@ @@@@@@@ @@@@@@@ #
# @@@@@@@@@@@@@ @@@ @@@@@@ #
# @@@@@@@ @@@@@ @@@@ @@@@@@@@ #
# @@@@@@@ @@@@@ @@@@@@@ @@@@@@@@@@ #
# @@@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@@ #
# @@@@@@@@@@ @@ @@@@ @@@@@@ #
# @@@@@@@@@@@@@@@ @@@@@ @@@@ @@@@ @@ @@ #
# @@@@@@@@@@@@@@@ @@@@@ @@@@@ @@@@@@@@@ @@ #
# @@@@@ @@@@ @@@ @@@ @@@ @@@@ @@@@@@@ #
# @@@@ @@@@ @@@ @@@ @@@ @@@ @@@@@@ #
# @@@@ @@@@@@@ @@@@@ @@@@@@ #
# @@@@@@@@@@@ @@@ @@@ @@@ @@@@@@@@@@ #
# @@@@@@@@@@@ @@@ @@@@@@ @@@@@ @@@@@@@@@ #
# @@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@ #
# @@@@@@@@@ @@@ @@@@@@@@@@@ #
# @@@@@@ @@ @@@@@@@@@ #
# @@@@@ @@@@@ @@@@@@@@@ #
# @@@@@@@@@@@@@@@@@@@@@@@@@ #
# @@@@@@@@@@@@@@@@@@@ #
# COMPILERS @@@@@@@@@@@ 2023-S #
# #
###################################################
*/
/*
************************************************************
* File name: Compilers.h
* Compiler: MS Visual Studio 2022
* Course: CST 8152 Compilers, Lab Section: [011, 012]
* Assignment: A12, A22, A32.
* Date: May 01 2023
* Professor: Paulo Sousa
* Purpose: This file defines the functions called by main function.
* Function list: mainReader(), mainScanner(), mainParser().
*************************************************************/
#ifndef COMPILERS_H_
#define COMPILERS_H_
#define DEBUG 0
/*
* ............................................................................
* ADVICE 1:
* Please check the "TODO" labels to develop your activity.
*
* ADVICE 2: This file must be updated according to each assignment
* (see the progression: reader > scanner > parser).
* ............................................................................
*/
/* TO_DO: Adjust your language (cannot be "Mold") */
/* Language name */
#define STR_LANGNAME "IronClad"
/* Logical constants - adapt for your language */
#define true 1
#define false 0
/*
------------------------------------------------------------
Data types definitions
NOTE: Some types may not be directly used by your language,
but they can be necessary for conversions.
------------------------------------------------------------
*/
/* TO_DO: Define your typedefs */
typedef char i8;
typedef char* String;
typedef int i32;
typedef float real;
typedef void Void;
typedef unsigned char Bool ;
typedef unsigned char Byte;
typedef long i64;
typedef double f64;
/*
------------------------------------------------------------
Programs:
1: Reader - invokes MainReader code
2: Scanner - invokes MainScanner code
3: Parser - invokes MainParser code
------------------------------------------------------------
*/
enum PROGRAMS {
PGM_READER = 'R',
PGM_SCANNER = 'S',
PGM_PARSER = 'P'
};
/*
------------------------------------------------------------
Main functions signatures
(Code will be updated during next assignments)
------------------------------------------------------------
*/
i32 mainReader(i32 argc, String* argv);
/* TO_DO: Remove comment for next assignmens: Scanner: A22 and Parser: A32
*/
i32 mainScanner(i32 argc, String* argv);
i32 mainParser(i32 argc, String* argv);
Void printLogo();
#endif