View Issue Details

IDProjectCategoryView StatusLast Update
00011451003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2018-11-29 16:28
Reporteryannregisgianas Assigned To 
PrioritynormalSeverityEditorialTypeError
Status ClosedResolutionRejected 
NameYann REGIS-GIANAS
OrganizationUniversity Paris Diderot
User Reference
SectionSection 2.10.2
Page Number0
Line Number0
Interp Status---
Final Accepted Text
Summary0001145: compound-list does not required a terminating semicolon even in compound commands, which is contradictory with implementations.
DescriptionThe shell grammar is defining the non terminal for compound_list as follows:

      compound_list : linebreak term | linebreak term separator ;

and this non terminal is used in compound_commands like "until" for instance:

               until_clause : Until compound_list do_group ;

However, a "term" may derive a simple command like "a".

Therefore, the following script seems accepted by the grammar:

                                   until a do b; done

while the usual shell implementations require a semicolon or a newline to be inserted just after the "a" for this script to be syntactically correct.
Desired ActionFix the grammar to comply with implementations.
TagsNo tags attached.

Relationships

related to 0001046 Closed 1003.1(2013)/Issue7+TC1 Grammar production if_clause allows "if command then" 

Activities

geoffclare

2017-06-15 08:55

manager   bugnote:0003764

Last edited: 2018-11-29 16:27

The command:

until a do b; done

is not accepted by the grammar because in the grammar do_group requires a "do" keyword to be present, and this command does not have one. (The word "do" in this command is an ordinary word to be passed as an argument to "a"; it is not recognised as a keyword.)

This appears to be the same misinterpretation of the shell grammar rules as was made in 0001046.

Update: this bug was discussed in the Nov 29, 2018 teleconference and is being rejected for the reason given above.

Issue History

Date Modified Username Field Change
2017-06-15 08:17 yannregisgianas New Issue
2017-06-15 08:17 yannregisgianas Name => Yann REGIS-GIANAS
2017-06-15 08:17 yannregisgianas Organization => University Paris Diderot
2017-06-15 08:17 yannregisgianas Section => Section 2.10.2
2017-06-15 08:17 yannregisgianas Page Number => 0
2017-06-15 08:17 yannregisgianas Line Number => 0
2017-06-15 08:55 geoffclare Note Added: 0003764
2017-06-15 08:55 geoffclare Relationship added related to 0001046
2018-11-29 16:27 geoffclare Note Edited: 0003764
2018-11-29 16:27 geoffclare Note Edited: 0003764
2018-11-29 16:28 geoffclare Interp Status => ---
2018-11-29 16:28 geoffclare Status New => Closed
2018-11-29 16:28 geoffclare Resolution Open => Rejected