_Coroutine IntegerLiteral { char ch; // character passed by cocaller // YOU ADD MEMBERS HERE void main(); // coroutine main public: enum { EOT = '\003' }; // end of text _Exception Match { // last character match public: uintmax_t value; // value of integer literal Match( uintmax_t value ) : value( value ) {} }; _Exception Error {}; // last character invalid void next( char c ) { ch = c; // communication input resume(); // activate } }; /* Test data 123 0123 0x123 0b1011 123u 123L 123ul 123'456 0x 018 123uu W 0b102 1234567890123456789012 123'346' 0x'ff */