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