On Mon, Aug 11, 2014 at 10:58 PM, H. S. Teoh via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:

> In Flex, one way you can implement heredocs is to have a separate "mode"
> where the lexer is scanning for the ending string.  So basically you
> have a sub-lexer that treats the heredoc as three tokens, one that
> defines the ending string for the heredoc (which is never returned to
> the caller), one that contains the content of the heredoc, and the
> terminating token (also never returned to the caller).

Ah, a small, specialized sub-lexer. OK, I get it.

Reply via email to