91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡(jiǎn)介

這是我在大三的時(shí)候解釋器實(shí)踐的課程設(shè)計(jì),是用C#開(kāi)發(fā)的,包括詞法分析、語(yǔ)法分析和編譯執(zhí)行階段,文檔比較齊全,可供初步學(xué)習(xí)解釋器的同學(xué)看看,但不鼓勵(lì)直接拿來(lái)當(dāng)作業(yè)用,起碼也得自己看看源碼,分析分析下,對(duì)自己也好

資源截圖

代碼片段和文件信息

/*
?*?作者:黎國(guó)梁
?*?班級(jí):三班
?*?學(xué)號(hào):200632580088
?*/
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Text.Regularexpressions;
using?System.IO;

namespace?CMMCompiler
{
????///?
????///?AccessTable類包含中間代碼訪問(wèn)符號(hào)表的方法
????///?

????class?AccessTable?:?MidCode
????{
????????//可以為VARGTARGSARG和常數(shù)
????????string?ARG?=?““;

????????//可以為標(biāo)識(shí)符
????????string?IN_1?=?““;

????????//數(shù)組下標(biāo)為標(biāo)識(shí)符或者常數(shù)如果不是數(shù)組為空.
????????string?IN_2?=?““;

????????//為純數(shù)字用來(lái)判斷數(shù)組下標(biāo)是否為常數(shù)?還是?標(biāo)識(shí)符
????????string?pattern?=?@“^[0-9]+$“;

????????///?
????????///?此方法,分解VARG(A)等,為VARGA,返回A
????????///?

????????///?需要分解的對(duì)象
????????///?返回A變量
????????private?string?find_Table_Kind(string?result)
????????{
????????????int?n?=?0;
????????????ARG?=?““;
????????????IN_1?=?““;
????????????IN_2?=?““;

????????????char[]?c?=?result.ToCharArray();

????????????while?(n?????????????{
????????????????ARG?=?ARG?+?c[n].ToString();?//得到ARG用于訪問(wèn)表名
????????????????n++;
????????????}

????????????n++;
????????????while?(n?????????????{
????????????????IN_1?=?IN_1?+?c[n].ToString();?//得到IN_1用于查找表內(nèi)成員
????????????????n++;
????????????}

????????????n++;
????????????while?(n?????????????{
????????????????IN_2?=?IN_2?+?c[n].ToString();?//得到IN_2用于訪問(wèn)數(shù)組內(nèi)部變量
????????????????n++;
????????????}

????????????return?IN_1;
????????}

????????///?
????????///?此方法返回result對(duì)應(yīng)的所在表的value值
????????///?

????????///?需要返回值的對(duì)象
????????///?
????????public?string?getValue(string?result)
????????{
????????????IN_1?=?find_Table_Kind(result);
????????????switch?(ARG)
????????????{
????????????????case?“VARG“:?//標(biāo)識(shí)符
????????????????????int?indexID?=?IDlist.IndexOf(IN_1);
????????????????????IDtable?BStmp?=?(IDtable)IDtablelist[indexID];
????????????????????return?BStmp.Value;
????????????????case?“TARG“:?//臨時(shí)變量
????????????????????int?indexTempID?=?TempIDlist.IndexOf(IN_1);
????????????????????TempIDtable?LStmp?=?(TempIDtable)TempIDtablelist[indexTempID];
????????????????????return?LStmp.Value;
????????????????case?“SARG“:?//數(shù)組

????????????????????try?//如果數(shù)組出界返回一個(gè)空值null
????????????????????{
????????????????????????if?(!Regex.IsMatch(IN_2?pattern))?//如果數(shù)組下標(biāo)為常數(shù)
????????????????????????{
????????????????????????????int?indexBS1?=?IDlist.IndexOf(IN_2);
????????????????????????????IDtable?BStmp1?=?(IDtable)IDtablelist[indexBS1];
????????????????????????????IN_2?=?BStmp1.Value;?//得到數(shù)組下標(biāo)的值
????????????????????????}

????????????????????????int?indexSZ?=?SZlist.IndexOf(IN_1);
????????????????????????SZtable?SZtmp?=?(SZtable)SZtablelist[indexSZ];
????????????????????????if?(Convert.ToInt32(IN_2)?>?Convert.ToInt32(SZtmp.Length)?-?1)
?????????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????6656??2009-01-01?12:45??CMM編譯器\CMMCompiler\CMMCompiler\AccessTable.cs

?????文件??????39359??2009-01-01?12:46??CMM編譯器\CMMCompiler\CMMCompiler\Analysis.cs

?????文件??????94208??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\bin\Debug\CMMCompiler.exe

?????文件?????151040??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\bin\Debug\CMMCompiler.pdb

?????文件??????14328??2009-12-20?13:16??CMM編譯器\CMMCompiler\CMMCompiler\bin\Debug\CMMCompiler.vshost.exe

?????文件????????490??2008-04-30?03:19??CMM編譯器\CMMCompiler\CMMCompiler\bin\Debug\CMMCompiler.vshost.exe.manifest

?????文件??????89600??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\bin\Release\CMMCompiler.exe

?????文件?????144896??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\bin\Release\CMMCompiler.pdb

?????文件??????????1??2008-12-30?14:56??CMM編譯器\CMMCompiler\CMMCompiler\ClassDiagram1.cd

?????文件???????5289??2009-10-26?11:11??CMM編譯器\CMMCompiler\CMMCompiler\CMMCompiler.csproj

?????文件???????5814??2007-12-30?21:53??CMM編譯器\CMMCompiler\CMMCompiler\Form3.resx

?????文件??????16185??2009-01-01?12:46??CMM編譯器\CMMCompiler\CMMCompiler\Interpret.cs

?????文件??????22683??2009-01-01?12:46??CMM編譯器\CMMCompiler\CMMCompiler\LexicalAnalysis.cs

?????文件??????13294??2008-10-09?16:20??CMM編譯器\CMMCompiler\CMMCompiler\Logo.ico

?????文件??????16134??2009-01-01?12:50??CMM編譯器\CMMCompiler\CMMCompiler\MainForm.cs

?????文件??????23445??2009-01-01?12:50??CMM編譯器\CMMCompiler\CMMCompiler\MainForm.Designer.cs

?????文件??????26811??2009-01-01?12:50??CMM編譯器\CMMCompiler\CMMCompiler\MainForm.resx

?????文件??????22715??2009-01-01?12:49??CMM編譯器\CMMCompiler\CMMCompiler\MidCode.cs

?????文件???????5052??2009-01-01?13:03??CMM編譯器\CMMCompiler\CMMCompiler\obj\CMMCompiler.csproj.FileListAbsolute.txt

?????文件????????995??2009-12-20?13:16??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.csproj.FileListAbsolute.txt

?????文件????????777??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.csproj.GenerateResource.Cache

?????文件??????94208??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.exe

?????文件??????13860??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.MainForm.resources

?????文件?????151040??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.pdb

?????文件???????4380??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\CMMCompiler.Properties.Resources.resources

?????文件???????5120??2009-10-26?11:13??CMM編譯器\CMMCompiler\CMMCompiler\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件???????1011??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\obj\Release\CMMCompiler.csproj.FileListAbsolute.txt

?????文件????????777??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\obj\Release\CMMCompiler.csproj.GenerateResource.Cache

?????文件??????89600??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\obj\Release\CMMCompiler.exe

?????文件??????13860??2009-10-26?11:12??CMM編譯器\CMMCompiler\CMMCompiler\obj\Release\CMMCompiler.MainForm.resources

............此處省略48個(gè)文件信息

評(píng)論

共有 條評(píng)論