仓酷云 发表于 2015-1-16 22:50:21

ASP.NET教程之OK.这个是完全的VB.NET的语法剖析程序。...

如果英语好,口才好,加上女孩子的优势说不定有机会进去做做别的工具)usingSystem;
usingSystem.Text;
usingSystem.Text.RegularExpressions;

namespaceCom.OSLeague.Component
{
///<summary>
///语法剖析器,将一切Code依据语法举行变色
///<listtype="VB">撑持VB.NET</list>
///<listtype="CS">撑持CS</list>
///<author>失落失落</author>
///<date>2002年5月14日</date>
///<Memo>
///实习正则表达式
///</Memo>
///</summary>
publicclassCodeAnalysis
{

//
//界说HTML入手下手和停止的语句,用于语法变色
//

conststringTAG_FNTRED=@"<fontcolor=""red"">";
conststringTAG_FNTBLUE=@"<fontcolor=""blue"">";
conststringTAG_FNTGRN=@"<fontcolor=""green"">";
conststringTAG_FNTMRN=@"<fontcolor=""maroon"">";
conststringTAG_FNTBLACK=@"<fontcolor=""black"">";
conststringTAG_EFONT=@"</font>";
conststringTAG_SPNYELLOW=@"<spanstyle=""background-color:yellow;"">";
conststringTAG_ESPAN=@"</span>";
conststringTAG_B=@"<b>";
conststringTAG_EB=@"</b>";
conststringTAG_COMMENT=@"<fontcolr=#008200>";
conststringTAG_ECOMMENT=@"</font>";

//



publicCodeAnalysis()
{
//
//TODO:在此处增加机关函数逻辑
//
}



///<summary>
///处置VB.NET代码,黑色化..
///</summary>
///<paramname="Code">传进的Code</param>
///<returns>处置事后的代码</returns>
publicstringParseVB(stringCode)
{
//
//界说VB.NET中关头字,将其存为数组
//

string[]VB_Keyword=newstring[]
{
"AddHandler","AddressOf","AndAlso","Alias","And","Ansi","As","Assembly","Auto","Boolean",
"ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar",
"CDate","CDec","CDbl","Char","CInt","Class","CLng","CObj","Const",
"CShort","CSng","CStr","CType","Date","Decimal","Declare","Default",
"Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End",
"Enum","Erase","Error","Event","Exit","False",
"Finally","For","Friend","Function","Get","GetType","GoTo","Handles","If",
"Implements","Imports","In","Inherits","Integer","Interface",
"Is","Let","Lib","Like","Long","Loop","Me","Mod","Module",
"MustInherit","MustOverride","MyBase","MyClass","Namespace","New","Next","Not","Nothing",
"NotInheritable","NotOverridable","Object","On","Option","Optional","Or","OrElse",
"Overloads","Overridable","Overrides","ParamArray","Preserve","Private","Property","Protected","Public",
"RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return",
"Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop",
"String","Structure","Sub","SyncLock","Then","Throw",
"To","True","Try","TypeOf","Unicode","Until","Variant","When","While",
"With","WithEvents","WriteOnly","Xor"
};



//
//设定转换代码色彩
//

stringReplaceVBComment=TAG_COMMENT+"$1"+TAG_ECOMMENT;
stringReplaceVBKeyword=TAG_FNTBLUE+"${char}"+TAG_EFONT;
//入手下手转换
for(inti=0;i<VB_Keyword.Length;i++)
{
stringTempDirectives=@"(?<char>(s"+VB_Keyword+"|"+VB_Keyword+@"s))";
Code=Regex.Replace(Code,TempDirectives,ReplaceVBKeyword,RegexOptions.IgnoreCase);
Code=Regex.Replace(Code,@"(?<x>[^
]*)",ReplaceVBComment);
Code=Regex.Replace(Code,@"REM(?<x>[^
]*)",ReplaceVBComment);
}
returnCode;
}
}<
就安全性而言,Java已经远远低于VB.NET,更无法与安全性著称的C#相比。

老尸 发表于 2015-1-17 09:44:24

微软又推出ASP.NET。这不是ASP的简单升级,而是全新一代的动态网页实现系统,用于一台WEB服务器建立强大的应用程序。是微软发展的新体系结构.NET的一部分,是ASP和.NET技术的结合。

admin 发表于 2015-1-20 15:28:17

关于ASP.NET功能上,ASP.NET比微软以前的ASP(96年出现)有更强大的library,更好的稳定性。ASP.NET可以使用.NETFramework中所有组件(也就是说.NET能实现的,ASP.NET一样能实现)。

灵魂腐蚀 发表于 2015-1-29 12:16:20

是目前ASP在UNIX/Linux上的应用可以说几乎为0)。所以平台的局限性和ASP自身的安全性限制了ASP的广泛应用。

再见西城 发表于 2015-2-6 00:41:46

但是目前在CGI中使用的最为广泛的是Perl语言。所以,狭义上所指的CGI程序一般都是指Perl程序,一般CGI程序的后缀都是.pl或者.cgi。

飘灵儿 发表于 2015-2-14 17:18:48

由于JSP/Servlet都是基于Java的,所以它们也有Java语言的最大优点——平台无关性,也就是所谓的“一次编写,随处运行(WORA–WriteOnce,RunAnywhere)”。除了这个优点,JSP/Servlet的效率以及安全性也是相当惊人的。

简单生活 发表于 2015-3-4 08:42:16

代码逻辑混乱,难于管理:由于ASP是脚本语言混合html编程,所以你很难看清代码的逻辑关系,并且随着程序的复杂性增加,使得代码的管理十分困难,甚至超出一个程序员所能达到的管理能力,从而造成出错或这样那样的问题。

活着的死人 发表于 2015-3-11 18:04:54

提供基于组件、事件驱动的可编程网络表单,大大简化了编程。还可以用ASP.NET建立网络服务。

若相依 发表于 2015-3-19 05:54:02

网页从开始简单的hmtl到复杂的服务语言,走过了10多个年头,各种技术层出不穷,单个的主流技术也在不断翻新的版本,现在分析下各种语言的区别、优势、劣势、开发注意事项!

谁可相欹 发表于 2015-3-27 08:45:39

能产生和执行动态、交互式、高效率的站占服务器的应用程序。运用ASP可将VBscript、javascript等脚本语言嵌入到HTML中,便可快速完成网站的应用程序,无需编译,可在服务器端直接执行。容易编写。
页: [1]
查看完整版本: ASP.NET教程之OK.这个是完全的VB.NET的语法剖析程序。...