-
Notifications
You must be signed in to change notification settings - Fork 0
/
p02lex.h
53 lines (53 loc) · 2.28 KB
/
p02lex.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
#ifndef p02lex_h
#define p02lex_h 1
//--------------------------------------------------------------------
// File p02lex.h defines class Lexer.
//--------------------------------------------------------------------
// Author 1: Steven Chambers
// Student ID: *20342421
// E-Mail: [email protected]
// Author 2: Melicent King
// Student ID: *20355157
// E-mail: [email protected]
// Course: CMSC 4023 - Programming Languages
// CRN: 12105
// Project: p02
// Due: November 5, 2014
// Account: tt060
//--------------------------------------------------------------------
//C++ Standard include files
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Standard C and C++ include files
//--------------------------------------------------------------------
#include <cstdio>
#include <fstream>
#include <iostream>
//--------------------------------------------------------------------
// Token Definitions
//--------------------------------------------------------------------
//#include "p02tkn.h"
//--------------------------------------------------------------------
//Namespaces
//--------------------------------------------------------------------
using namespace std;
//--------------------------------------------------------------------
//Function: yylex
//Function yylex is the expner. Function yylex returns an integer
//token code as defined above or 0 if end-of-file has been
//reached.
//--------------------------------------------------------------------
#ifdef __cplusplus
extern "C"
#endif
int yylex (void);
//--------------------------------------------------------------------
//Class Lexer defines the attributes of a Scanner
//--------------------------------------------------------------------
class Lexer {
public:
Lexer(FILE* i); //Constructor used to redirect the keyboard
//(stdin) to file i.
int Scan();
};
#endif