Author: Stan Eisenstat
Subject: Re: [Cs323] ordering
Date: Friday, 25 Sep 2020, 08:39:17
> Message Posted By: Unknown
>
> a>c b=d
>
> If we see the following, then first we see a TEXT, and then see a redir.
> However, by the grammar, once u see a TEXT in the simple rule, how does
> the rule extend to read the >c. The next subrule after TEXT in simple is
> [prefix] TEXT, but the prefix woulnd't account for the "a".
The rule is
[simple] = TEXT / [prefix] TEXT / TEXT [suffix] / [prefix] TEXT [suffix]
Since the first token "a" is a TEXT but not a NAME=VAL,
the choices are reduced to
[simple] = TEXT / TEXT [suffix]
As described in my last post, you cannot stop and return
just the TEXT, but must continue parsing since the ">"
could be part of a [redir] (and must be for the entire
command to be syntactically correct).
--Stan-
PREV
INDEX
NEXT