[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why yacc_EOF is used as a list_terminator for for_command?
From: |
Peng Yu |
Subject: |
Why yacc_EOF is used as a list_terminator for for_command? |
Date: |
Mon, 10 May 2021 11:25:08 -0500 |
Hi,
https://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n800
for_command contains the following rule.
| FOR WORD newline_list IN word_list list_terminator newline_list DO
compound_list DONE
https://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n1147
list_terminator is this. I can see why '\n' and ';' are included. But
it doesn't make sense to me why yacc_EOF is needed here.
list_terminator:'\n'
| ';'
| yacc_EOF
;
It may be useful to include yacc_EOF in other rules. But Is it correct
to include it here?
--
Regards,
Peng
- Why yacc_EOF is used as a list_terminator for for_command?,
Peng Yu <=
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Koichi Murase, 2021/05/10
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Peng Yu, 2021/05/10
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Koichi Murase, 2021/05/11
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Alex fxmbsw7 Ratchev, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Koichi Murase, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Alex fxmbsw7 Ratchev, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Koichi Murase, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Alex fxmbsw7 Ratchev, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Koichi Murase, 2021/05/12
- Re: Why yacc_EOF is used as a list_terminator for for_command?, Alex fxmbsw7 Ratchev, 2021/05/12