Simplify the about_grammmar
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 19 Jul 2024 14:19:52 +0000 (16:19 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 19 Jul 2024 14:19:52 +0000 (16:19 +0200)
This is possible thanks to the grammar of minishell being simpler than
that of shell.

about_grammar

index bd34367dfb74dddcccc70253a3fea5010ce53b66..5b51e27323cb1a871249adc417f8095c3b77d548 100644 (file)
@@ -12,14 +12,8 @@ Grammar Rules:
        3. Redirection from here-document
                Quote removal
        7. Assignment preceding command name
-               a. First word
-                       If the TOKEN contains the character '=', a WORD is returned
-                       otherwise use rule 7b.
-               b. Not the first word
-                       If TOKEN contaion unqouted '=' character:
-                               -       if characters before '=' form valid name*
-                                       an ASSIGNMENT_WORD is returned
-                               -       otherwise a WORD is returned
+               If TOKEN contains unquoted character '=' and preceding that is a valid name
+               ASSIGNMENT_WORD is returned, otherwise WORD is returned
 
 *      A valid name consists solely of underscores, digits and alphabetics
        from the porable character set. The first character of a valid name