72
1
using System; using System.Text; using System.Linq; using System.Diagnostics;
2
3
public static class Program
4
{
5
// Based on http://www.codeproject.com/Articles/13503/Stripping-Accents-from-Latin-Characters-A-Foray-in
6
// Proper Normalization
7
public static string UnicodeToANSI(this string s)
8
{
9
var sb = new StringBuilder();
10
sb.Append(s.Normalize(NormalizationForm.FormKD)
11
.Where(x => (x > 30 && x <= 255))
12
.ToArray());
13
return sb.ToString();
14
}
15
16
//ANSI characters 32 to 127 correspond to those in the 7-bit ASCII character set,
17
public static string ReducetoASCII(this string s)
18
{
19
StringBuilder sb = new StringBuilder(s.Length);
20
foreach (char c in s)
21
{
22
if ((int)c > 255) // remove chars > 127
23
continue;
24
if ((int)c < 32) // remove control characters
Cached Result
OS
---------------------
int Data_1;
float Data_2;
double Data_3 = 3;
int main(int a, int b, float X, double Y2)
{
int Data_A;
double Data_B = 25.45;
if(x > y)
if(x < y)
int a = b;
else
int a = c;
return 0;
};
void f1(void)
{
int a = 5;
goto Lb_1;
return;
};
------------------
TOKEN LIST:
TYPE VALUE
BuildInType "int"
Identifier "Data_1"
Punctuator ";"
BuildInType "float"
Identifier "Data_2"
Punctuator ";"
BuildInType "double"
Identifier "Data_3"
Operation "="
Number "3"
Punctuator ";"
BuildInType "int"
Identifier "main"
Punctuator "("
BuildInType "int"
Identifier "a"
Punctuator ","
BuildInType "int"
Identifier "b"
Punctuator ","
BuildInType "float"
Identifier "X"
Punctuator ","
BuildInType "double"
Identifier "Y2"
Punctuator ")"
Punctuator "{"
BuildInType "int"
Identifier "Data_A"
Punctuator ";"
BuildInType "double"
Identifier "Data_B"
Operation "="
Number "25.45"
Punctuator ";"
ControlKeyWord "if"
Punctuator "("
Identifier "x"
Operation ">"
Identifier "y"
Punctuator ")"
ControlKeyWord "if"
Punctuator "("
Identifier "x"
Operation "<"
Identifier "y"
Punctuator ")"
BuildInType "int"
Identifier "a"
Operation "="
Identifier "b"
Punctuator ";"
ControlKeyWord "else"
BuildInType "int"
Identifier "a"
Operation "="
Identifier "c"
Punctuator ";"
ControlKeyWord "return"
Number "0"
Punctuator ";"
Punctuator "}"
Punctuator ";"
BuildInType "void"
Identifier "f1"
Punctuator "("
BuildInType "void"
Punctuator ")"
Punctuator "{"
BuildInType "int"
Identifier "a"
Operation "="
Number "5"
Punctuator ";"
ControlKeyWord "goto"
Identifier "Lb_1"
Punctuator ";"
ControlKeyWord "return"
Punctuator ";"
Punctuator "}"
Punctuator ";"
EOF ""
int Data_1;
float Data_2;
double Data_3 = 3;
int main(int a, int b, float X, double Y2)
{
int Data_A;
double Data_B = 25.45;
if(x > y)
{
if(x < y)
{
int a = b;
}
else
{
int a = c;
}
}
return 0;
}
void f1()
{
int a = 5;
goto Lb_1;
return;
}
OS
Command exited with non-zero status 58