노현종

언어별 예약어 목록

......@@ -76,7 +76,7 @@ namespace VulnCrawler
Console.WriteLine(item);
}
return;
// return;
var directorys = Directory.GetDirectories(@"c:\VulnPy");
if (directorys.Length == 0) {
Console.WriteLine("Repository 목록 찾기 실패");
......
......@@ -14,7 +14,10 @@ namespace VulnCrawler
public abstract class VulnAbstractCrawler
{
private static readonly string[] ReservedList = { "if", "return", "break", "while", "typedef" };
protected abstract string[] ReservedList { get; }
// = { "if", "return", "break", "while", "typedef" };
/// <summary>
/// 생성자
/// 경로를 입력받아서(path)
......
......@@ -10,6 +10,8 @@ namespace VulnCrawler
{
public class VulnC : VulnAbstractCrawler
{
protected override string[] ReservedList => new string[] { "if", "return", "break", "while", "typedef" };
protected override string RegexFuncPattern => $@"@@ \-(?<{OldStart}>\d+),(?<{OldLines}>\d+) \+(?<{NewStart}>\d+),(?<{NewLines}>\d+) @@ (?<{MethodName}>(static)? [\w]+ [\w]+)\([\w \*\,\t\n]*\)";
protected override string Extension => ".c";
......
......@@ -20,6 +20,8 @@ namespace VulnCrawler
protected override string Extension => ".py";
protected override string RegexFuncPattern => $@"@@ \-(?<{OldStart}>\d+),(?<{OldLines}>\d+) \+(?<{NewStart}>\d+),(?<{NewLines}>\d+) @@ def (?<{MethodName}>\w+)";
protected override string[] ReservedList => throw new NotImplementedException();
// protected override Regex MethodExtractor => new Regex(RegexFuncPattern);
......