Re: Is it always possible to make a non-reentrant parser reentrant?

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>

> Le 9 févr. 2019 à 00:21, Peng Yu <[email protected]> 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.
_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.