[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: generate the default semantic action
From: |
Hans Åberg |
Subject: |
Re: RFC: generate the default semantic action |
Date: |
Sun, 14 Oct 2018 18:13:39 +0200 |
> On 14 Oct 2018, at 16:54, Akim Demaille <address@hidden> wrote:
>
> Le 14 oct. 2018 à 16:43, Akim Demaille <address@hidden> a écrit :
>
>> Yes, I read that too, and found it extremely ambiguous.
>
> And Steve Johnson’s paper is just the same.
>
> https://www.epaperpress.com/lexandyacc/download/yacc.pdf
>
> By default, the value of a rule is the value of the first element in it ($1).
> Thus, grammar rules of the form
> A:B;
> frequently need not have an explicit action.
POSIX probably got it from there through copy-and-paste, then. So rules with
empty RHS do not have any default value. What happen with Bison's default value
in such a case, that is, what does it get when there is no $1?
Re: RFC: generate the default semantic action, Paul Eggert, 2018/10/14