-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneral.h
More file actions
42 lines (36 loc) · 716 Bytes
/
general.h
File metadata and controls
42 lines (36 loc) · 716 Bytes
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
#include<iostream>
#include<stdio.h>
#include<ctype.h>
#include "symTable.h"
#ifndef _GENERAL_H_
#define _GENERAL_H_
/* Global declarations */
/* Variables */
extern char lexeme [100];
extern char nextChar;
extern int lexLen;
extern Symbol_table symbolTable;
/* Character classes */
extern int charClass;
#define LETTER 0
#define DIGIT 1
#define OPERATOR 99
#define NEWLINE_CLASS 100
/* Token codes */
extern int token;
extern int nextToken;
#define INT_LIT 10
#define IDENT 11
#define ASSIGN_OP 20
#define ADD_OP 21
#define SUB_OP 22
#define MULT_OP 23
#define DIV_OP 24
#define MOD_OP 25
#define POW_OP 26
#define LEFT_PAREN 27
#define RIGHT_PAREN 28
#define QUIT 29
#define DUMP 30
#define NEWLINE 31
#endif