30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/contest/driver/common.rb', line 30
def self.normalize_language label
case label
when "c", "C"
return "clang"
when "cpp", "C++", "c++"
return "cpp"
when "c++11", "C++11"
return "cpp11"
when "cs", "c#", "C#"
return "cs"
when "d", "D", "dlang"
return "dlang"
when "go", "golang"
return "golang"
when "hs", "haskell", "Haskell"
return "haskell"
when "java", "Java"
return "java"
when "ocaml", "ml", "OCaml"
return "ocaml"
when "Delphi", "delphi"
return "delphi"
when "pascal", "Pascal"
return "pascal"
when "perl", "Perl", "pl"
return "perl"
when "php", "PHP"
return "php"
when "python2"
return "python2"
when "python3", "python", "Python", "py"
return "python3"
when "ruby", "rb", "Ruby"
return "ruby"
when "scala", "Scala"
return "scala"
else
abort "unknown language @ normalize language"
end
end
|