Skip to content
Discussion options

You must be logged in to vote

OK, I see. Thank you for your support. Could I use yyless(0) in the <<EOF>> rule to handle that case of inter-chunk tokens ? I.e. switch the buffer and then call yyless (0) to 'put back' any remaining bytes before returning ?

This won't suffice, because yyless(0) gets lost when you switch buffers. You could use yyless(0) and then use the mather's end() pointer into the buffer to fetch that data from pointer end() to the ending address of the buffer to copy that data into the new buffer. Then append more data after this into the new buffer.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@esohns
Comment options

Comment options

You must be logged in to vote
3 replies
@esohns
Comment options

@Robert-van-Engelen
Comment options

Answer selected by esohns
@esohns
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question A technical question that has or needs clarification
3 participants