> Le 9 févr. 2019 à 00:21, Peng Yu <pengyu...@gmail.com> 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.
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to