• 大小: 873KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-18
  • 语言: 其他
  • 标签:

资源简介

这才是正宗的,网上本搜不到,吴鹏s、b,吴丰收s、b的都是错的。

资源截图

代码片段和文件信息


#ifndef LEX_C
#define LEX_C
#include 
#include “Lexical.h“
using namespace std;

int Lexical::serial=1;
int Lexical::nextstat = 1;
Lexical::Lexical() {}

Lexical::Lexical(string inputFilestring outputFileName) {
// Initializing keywordTable
            keywordTable[0] = “if“;
                keywordTable[1] = “then“;
                keywordTable[2] = “double“;
                keywordTable[3] = “end“;
                keywordTable[4] = “float“;
                keywordTable[5] = “int“;
                keywordTable[6] = “long“;
                keywordTable[7] = “short“;
                keywordTable[8] = “signed“;
                keywordTable[9] = “unsigned“;
                keywordTable[10] = “begin“;
                keywordTable[11] = “for“;
                keywordTable[12] = “else“;
                keywordTable[13] = “switch“;
                keywordTable[14] = “case“;
                keywordTable[15] = “default“;
                keywordTable[16] = “return“;
                keywordTable[17] = “sizeof“;
                keywordTable[18] = “typedef“;
                keywordTable[19] = “volatile“;
                keywordTable[20] = “while“;
                keywordTable[21] = “break“;
                keywordTable[22] = “continue“;
                keywordTable[23] = “auto“;
                keywordTable[24] = “extern“;
                keywordTable[25] = “class“;
                keywordTable[26] = “public“;
                keywordTable[27] = “static“;
                keywordTable[28] = “private“;
                keywordTable[29] = “protected“;
                keywordTable[30] = “include“;
keywordTable[31] = “void“;
   keywordTable[32] = “enum“;
   keywordTable[33] = “char“;
   keywordTable[34] = “const“;



//Initializing separator table
                separators[0] = ‘;‘;              
separators[1] = ‘{‘;
                separators[2] = ‘}‘;
                separators[3] = ‘(‘;
                separators[4] = ‘)‘;
                separators[5] = ‘[‘;
                separators[6] = ‘]‘;
separators[7] = ‘#‘;

// Initializing operator table
                operators[0] = “+“;
                operators[1] = “-“;
                operators[2] = “*“;
                operators[3] = “/“;
                operators[4] = “%“;
                operators[5] = “++“;
                operators[6] = “--“;
                operators[7] = “>“;
                operators[8] = “<“;
                operators[9] = “==“;
                operators[10] = “>=“;
                operators[11] = “<=“;
                operators[12] = “!=“;
                operators[13] = “&&“;
                operators[13] = “||“;
                operators[14] = “!“;
                operators[15] = “>>“;
                operators[16] = “<<“;
                operators[17] = “=“;
                operators[18] = “?:“;
                operators[19] = ““;
                operators[20] = “&“;
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        362  2012-01-04 17:46  汇编课程设计报告及源文件(含测试用例)\output.txt

     文件      73216  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.exe

     文件     498056  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.ilk

     文件     699392  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.pdb

     文件      18249  2011-01-09 18:42  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Lexical.cpp

     文件       4338  2011-01-09 18:35  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Lexical.h

     文件      18163  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\simplePrece.cpp

     文件       2153  2011-01-08 20:27  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\SStack.h

     文件       8370  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\BuildLog.htm

     文件     102057  2011-01-09 18:42  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\Lexical.obj

     文件         65  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\mt.dep

     文件      81162  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\simplePrece.obj

     文件        663  2011-01-09 18:42  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.exe.embed.manifest

     文件        728  2011-01-09 18:42  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.exe.embed.manifest.res

     文件        621  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\syntax-directed-translation_symple-prece.exe.intermediate.manifest

     文件     240640  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\vc90.idb

     文件     233472  2011-01-10 08:09  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug\vc90.pdb

     文件       4174  2011-01-08 13:23  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.vcproj

     文件       1405  2012-01-04 17:47  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.vcproj.JIEZ.Administrator.user

     文件       1427  2011-04-05 22:39  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.vcproj.WIN-F681MFHS99J.Administrator.user

     文件    1256448  2012-01-04 17:47  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.ncb

     文件        991  2011-01-08 13:11  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.sln

    ..A..H.     32768  2012-01-04 17:47  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece.suo

     文件        113  2012-01-04 17:28  汇编课程设计报告及源文件(含测试用例)\testCase1.txt

     文件        189  2012-01-04 17:29  汇编课程设计报告及源文件(含测试用例)\testCase2.txt

     文件        301  2012-01-04 17:40  汇编课程设计报告及源文件(含测试用例)\testCase3.txt

     文件        207  2012-01-04 17:41  汇编课程设计报告及源文件(含测试用例)\testCase4.txt

     文件     591538  2011-01-10 08:45  汇编课程设计报告及源文件(含测试用例)\编译原理课程设计-0807曾永杰 .doc

     目录          0  2012-01-04 17:50  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\syntax-directed-translation_symple-prece\Debug

     目录          0  2012-01-04 17:50  汇编课程设计报告及源文件(含测试用例)\syntax-directed-translation_symple-prece\Debug

............此处省略6个文件信息

评论

共有 条评论

相关资源