forked from ztp130213/Soo-Complier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leviathan
authored and
Leviathan
committed
Oct 21, 2015
1 parent
e964f5d
commit cff276c
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// assembler.h | ||
// Lmachine | ||
// | ||
// Created by leviathan on 15/8/21. | ||
// Copyright (c) 2015年 leviathan. All rights reserved. | ||
// | ||
|
||
#pragma once | ||
#ifndef __Lmachine__assembler__ | ||
#define __Lmachine__assembler__ | ||
|
||
#include <iostream> | ||
#include "lvm_global.h" | ||
using namespace std; | ||
|
||
|
||
class Assembler | ||
{ | ||
public: | ||
Assembler(); | ||
int searchsymbol(string symbolname,int sign); | ||
int count_addrlabel(int index); | ||
void assemblerrun(); | ||
tokentype lexer(string &token,int index); | ||
void buildsymbol(); //build symbol table | ||
string int2string(int num); | ||
int searchcmd(string token); | ||
int searchreg(string token); | ||
int getopcode(string token); | ||
}; | ||
#endif /* defined(__Lmachine__assembler__) */ |