3c1f479b9d
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
243 lines
6.3 KiB
C#
243 lines
6.3 KiB
C#
/*
|
|
Copyright (C) 2012 Jeroen Frijters
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
|
Jeroen Frijters
|
|
jeroen@frijters.net
|
|
|
|
*/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Ildasm
|
|
{
|
|
partial class Disassembler
|
|
{
|
|
static readonly HashSet<string> keywords = new HashSet<string>
|
|
{
|
|
"abstract",
|
|
"add",
|
|
"algorithm",
|
|
"alignment",
|
|
"and",
|
|
"ansi",
|
|
"any",
|
|
"arglist",
|
|
"array",
|
|
"as",
|
|
"assembly",
|
|
"assert",
|
|
"at",
|
|
"auto",
|
|
"autochar",
|
|
"beq",
|
|
"bge",
|
|
"bgt",
|
|
"ble",
|
|
"blt",
|
|
"blob",
|
|
"bool",
|
|
"box",
|
|
"br",
|
|
"break",
|
|
"brfalse",
|
|
"brtrue",
|
|
"bstr",
|
|
"bytearray",
|
|
"call",
|
|
"callconv",
|
|
"calli",
|
|
"callvirt",
|
|
"carray",
|
|
"catch",
|
|
"castclass",
|
|
"cdecl",
|
|
"ceq",
|
|
"cf",
|
|
"cgt",
|
|
"char",
|
|
"ckfinite",
|
|
"clt",
|
|
"class",
|
|
"clsid",
|
|
"cpblk",
|
|
"cpobj",
|
|
"currency",
|
|
"custom",
|
|
"date",
|
|
"decimal",
|
|
"default",
|
|
"demand",
|
|
"deny",
|
|
"div",
|
|
"dup",
|
|
"endfilter",
|
|
"endfinally",
|
|
"enum",
|
|
"error",
|
|
"explicit",
|
|
"extends",
|
|
"extern",
|
|
"false",
|
|
"family",
|
|
"fastcall",
|
|
"fault",
|
|
"field",
|
|
"filetime",
|
|
"filter",
|
|
"final",
|
|
"finally",
|
|
"fixed",
|
|
"flags",
|
|
"float",
|
|
"float32",
|
|
"float64",
|
|
"forwarder",
|
|
"handler",
|
|
"hresult",
|
|
"il",
|
|
"in",
|
|
"int",
|
|
"illegal",
|
|
"implements",
|
|
"import",
|
|
"init",
|
|
"initblk",
|
|
"initobj",
|
|
"instance",
|
|
"int8",
|
|
"int16",
|
|
"int32",
|
|
"int64",
|
|
"interface",
|
|
"isinst",
|
|
"iunknown",
|
|
"jmp",
|
|
"lasterr",
|
|
"ldarg",
|
|
"ldarga",
|
|
"ldelem",
|
|
"ldelema",
|
|
"ldfld",
|
|
"ldflda",
|
|
"ldftn",
|
|
"ldlen",
|
|
"ldloc",
|
|
"ldloca",
|
|
"ldnull",
|
|
"ldobj",
|
|
"ldsfld",
|
|
"ldsflda",
|
|
"ldstr",
|
|
"ldtoken",
|
|
"leave",
|
|
"legacy",
|
|
"library",
|
|
"literal",
|
|
"localloc",
|
|
"lpstr",
|
|
"lpvoid",
|
|
"lpwstr",
|
|
"managed",
|
|
"marshal",
|
|
"method",
|
|
"mkrefany",
|
|
"modopt",
|
|
"modreq",
|
|
"mul",
|
|
"native",
|
|
"neg",
|
|
"nested",
|
|
"newarr",
|
|
"newobj",
|
|
"nomangle",
|
|
"nop",
|
|
"not",
|
|
"object",
|
|
"off",
|
|
"on",
|
|
"opt",
|
|
"or",
|
|
"out",
|
|
"permitonly",
|
|
"pinned",
|
|
"pop",
|
|
"prefix1",
|
|
"prefix2",
|
|
"property",
|
|
"record",
|
|
"refanytype",
|
|
"refanyval",
|
|
"rem",
|
|
"ret",
|
|
"retargetable",
|
|
"rethrow",
|
|
"request",
|
|
"runtime",
|
|
"sealed",
|
|
"sequential",
|
|
"serializable",
|
|
"sizeof",
|
|
"shl",
|
|
"shr",
|
|
"starg",
|
|
"stdcall",
|
|
"stelem",
|
|
"stfld",
|
|
"stloc",
|
|
"stobj",
|
|
"storage",
|
|
"stored_object",
|
|
"stream",
|
|
"strict",
|
|
"string",
|
|
"struct",
|
|
"stsfld",
|
|
"sub",
|
|
"synchronized",
|
|
"thiscall",
|
|
"tls",
|
|
"to",
|
|
"true",
|
|
"type",
|
|
"uint",
|
|
"uint8",
|
|
"uint16",
|
|
"uint32",
|
|
"uint64",
|
|
"unbox",
|
|
"unicode",
|
|
"unmanaged",
|
|
"unsigned",
|
|
"unused",
|
|
"value",
|
|
"variant",
|
|
"vector",
|
|
"virtual",
|
|
"void",
|
|
"wchar",
|
|
"winapi",
|
|
"with",
|
|
"x86",
|
|
"xor",
|
|
};
|
|
}
|
|
}
|