12345678910111213141516171819202122232425262728293031
#include <iostream> #include <string> using namespace std; string input; string output; string type; void Scan () { if (input == "Console") {output = "Console", type = "Ident";} else if (input == "[") output = "L_Farad"; else if (input == "]") output = "R_Farad"; else if (input == "(") output = "L_Cow"; else if (input == ")") output = "R_Cow"; else if (input == "*") output = "Star"; else if (input == "Write") output = "Write"; else if (input == "Wait") output = "Wait"; else if (input == ";") output = "Colon"; else if (input == "//") output = "Comment"; } void Parse () { ?????? } int main () { cin >> input; Scan(); cout << output; cin.get (); cin.get (); return 0; }
123456
//my comment Console[ Write(*Hello*); Wait(); ]