-
Notifications
You must be signed in to change notification settings - Fork 0
/
SyntacticalAnalyzer.h
48 lines (43 loc) · 1.27 KB
/
SyntacticalAnalyzer.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
/*******************************************************************************
* Assignment: Project 1 - Lexical Analyzer for Scheme to C++ Translator *
* Author: Dr. Watts *
* Date: Fall 2017 *
* File: LexicalAnalyzer.h *
* *
* Description: This file contains the *
*******************************************************************************/
#ifndef SYN_H
#define SYN_H
#include <iostream>
#include <fstream>
#include "LexicalAnalyzer.h"
#include "CodeGenerator.h"
using namespace std;
class SyntacticalAnalyzer
{
public:
SyntacticalAnalyzer (char * filename);
~SyntacticalAnalyzer ();
private:
LexicalAnalyzer * lex;
ofstream p2file;
token_type token;
CodeGen * cg;
int tabs;
int Program();
int Define();
int More_Defines();
int Stmt_List();
int Stmt();
int Literal();
int Quoted_Lit();
int More_Tokens();
int Param_List(bool first);
int Else_Part();
int Stmt_Pair();
int Stmt_Pair_Body();
int More_Pairs();
int Action();
int Any_Other_Token();
};
#endif