[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it always possible to make a non-reentrant parser reentrant?
From: |
Akim Demaille |
Subject: |
Re: Is it always possible to make a non-reentrant parser reentrant? |
Date: |
Tue, 12 Feb 2019 17:41:20 +0100 |
> Le 9 févr. 2019 à 00:21, Peng Yu <address@hidden> a écrit :
>
> Hi Simon,
>
>> Normally, you'd use lexer states to activate/deactivate rules. The
>> primitive approach would be
>>
>> %x INITIAL HEREDOC
>
> I see %x is from flex. Bash can support nested heredoc. How can it be
> implemented in flex?
Flex offers push/pop for start conditions. See yypush_buffer_state
and yypop_buffer_state.
Re: Is it always possible to make a non-reentrant parser reentrant?, Simon Richter, 2019/02/08