Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000648 [1003.1(2008)/Issue 7] Shell and Utilities Comment Error 2013-01-18 20:44 2019-06-10 08:55
Reporter rhansen View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Richard Hansen
Organization
User Reference
Section 2.3, 2.10.1
Page Number 2300, 2325
Line Number 72448, 73415
Interp Status ---
Final Accepted Text See Note: 0001457.
Summary 0000648: Special treatment of <newline> in tokenization rules is unnecessary
Description According to the definition of "operator" in XBD 3.255 and 3.113, a <newline> is an operator. Thus, the special treatment of <newline> in sections 2.3 and 2.10.1 is unnecessary.

Section 2.3 contains the following token recognition rules (lines 72445-72448):

    6. If the current character is not quoted and can be used as the first character of a new operator, the current token (if any) shall be delimited. The current character shall be used as the beginning of the next (operator) token.
    7. If the current character is an unquoted <newline>, the current token shall be delimited.

In the above, an unquoted <newline> matches rule #6. Because lines 72411-72412 say that the first applicable rule is applied, rule #7 will never be applied and is thus unnecessary.

Section 2.10.1 contains the following token recognition rules (lines 73415-73416):

    1. A <newline> shall be returned as the token identifier NEWLINE.
    2. If the token is an operator, the token identifier for that operator shall result.

If rule #1 is deleted, rule number #2 will apply to unquoted <newlines>, returning the token identifier NEWLINE. Thus, rule #1 is unnecessary.
Desired Action Delete 2.3 rule #7 (line 72448) and 2.10.1 rule #1 (line 73415).
Tags tc2-2008
Attached Files

- Relationships
related to 0000736Closed 1003.1(2013)/Issue7+TC1 grammatically accept zero or more Shell commands 

-  Notes
(0001454)
rhansen (manager)
2013-01-24 17:58
edited on: 2013-01-24 18:02

Section 2.10.1 (Shell Grammar Rules) implies that newline, semicolon, ampersand, less than, greater than, pipe, left paren, and right paren are not operators in at least the context of section 2.10. This suggests that perhaps 2.3 rule #7 and 2.10.1 rule #1 are actually required.

I propose modifying the grammar in section 2.10 to make it clear that they are operators and that the section 2.10 definition of operator matches the XBD 3.255 definition of operator. Here are my new suggested changes:

  * in section 2.10:
    - change the comment:
          /* The following are the operators mentioned above */
      to:
          /* The following are operators */
    - move '%token NEWLINE' below the comment '/* The following are operators */'
    - add the following tokens with the other operator tokens:
         %token AMPERSAND /* '&' */
         %token LPAREN /* '(' */
         %token RPAREN /* ')' */
         %token SEMI /* ';' */
         %token PIPE /* '|' */
         %token LTHAN /* '<' */
         %token GTHAN /* '>' */
    - make the following replacements:
         '&' -> AMPERSAND
         '(' -> LPAREN
         ')' -> RPAREN
         ';' -> SEMI
         '|' -> PIPE
         '<' -> LTHAN
         '>' -> GTHAN
    - delete 2.10.1 rule #1
  * in section 2.3:
    - delete 2.3 rule #7

The new tokens are all uppercase to be consistent with the conventions described in XCU section 1.3 (Grammar Conventions).

(0001457)
rhansen (manager)
2013-02-07 16:09
edited on: 2013-02-07 17:27

Geoff Clare suggested the following alternative change, which I prefer:

 * in section 2.10, change the comment:

      /* The following are the operators mentioned above */

   to:

      /* The following are the operators (see XBD 3.255) containing more
         than one character */

 * Delete 2.3 rule #7 (line 72448) and 2.10.1 rule #1 (line 73415).
 * renumber the lists in 2.3 and 2.10.1


- Issue History
Date Modified Username Field Change
2013-01-18 20:44 rhansen New Issue
2013-01-18 20:44 rhansen Status New => Under Review
2013-01-18 20:44 rhansen Assigned To => ajosey
2013-01-18 20:44 rhansen Name => Richard Hansen
2013-01-18 20:44 rhansen Section => 2.3, 2.10.1
2013-01-18 20:44 rhansen Page Number => 2300, 2325
2013-01-18 20:44 rhansen Line Number => 72448, 73415
2013-01-24 17:58 rhansen Note Added: 0001454
2013-01-24 18:02 rhansen Note Edited: 0001454
2013-02-07 16:09 rhansen Note Added: 0001457
2013-02-07 17:27 rhansen Note Edited: 0001457
2013-02-07 17:29 Don Cragun Interp Status => ---
2013-02-07 17:29 Don Cragun Final Accepted Text => See Note: 0001457.
2013-02-07 17:29 Don Cragun Status Under Review => Resolved
2013-02-07 17:29 Don Cragun Resolution Open => Accepted As Marked
2013-02-08 08:16 Don Cragun Tag Attached: tc2-2008
2013-08-29 16:21 nick Relationship added related to 0000736
2019-06-10 08:55 agadmin Status Resolved => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker