| 1 | #include "letter.ih" |
| 2 | |
| 3 | Letter coLetter() |
| 4 | { |
| 5 | char ch; |
| 6 | while (cin.get(ch)) |
| 7 | { |
| 8 | if (isalpha(ch)) |
| 9 | cout << "at `" << ch << "' remain in letter\n"; |
| 10 | else if (isdigit(ch)) |
| 11 | co_await Awaitable{ g_digit, "Letter", ch }; |
| 12 | else |
| 13 | co_await Awaitable{ g_start, "Letter", static_cast<int>(ch) }; |
| 14 | } |
| 15 | co_await Awaitable{ g_done, "Letter" }; |
| 16 | } |