> Le 11 févr. 2019 à 23:56, Peng Yu a écrit :
>
>> I have no idea. You'd have to study the grammar to see if there
>> are doing fancy things around yacc_EOF.
>
> declare -p BASH_SOURCE
>
> Here is what I got with the above one line bash code (with the newline
> at the end).
>
> The lines wi
> I have no idea. You'd have to study the grammar to see if there
> are doing fancy things around yacc_EOF.
declare -p BASH_SOURCE
Here is what I got with the above one line bash code (with the newline
at the end).
The lines with -> are the parsing rules activated. The rest lines are
yylex() re
Hi Peng,
> Le 11 févr. 2019 à 18:12, Peng Yu a écrit :
>
> Hi,
>
> yacc_EOF instead of 0 is used in `yylex()`.
>
> http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n3257
Which is
if (character == EOF)
{
EOF_Reached = 1;
return (yacc_EOF);
}
> The grammar explici
Hi,
yacc_EOF instead of 0 is used in `yylex()`.
http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n3257
The grammar explicitly relies on yacc_EOF.
http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n376
But this seems to be different from the normal usage in flex/bison.
For example, f