Skip to content

Parser with passive input? #175

Answered by ColinH
cppden asked this question in Q&A
Discussion options

You must be logged in to vote

The state of the parser consists of the State arguments and the current call stack with all of its automatic variables. This makes it rather impossible to return from a partial parsing run so that it can be resumed later. The classical way to achieve this kind of producer-consumer coupling is with coroutines (or with proper continuations, if available, which of course make everything easy). As soon as C++20 coroutines are fully functional in GCC or Clang I'll check them out in detail and hopefully they'll allow us to put something together.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by d-frey
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #175 on December 09, 2020 09:19.