> 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() results.

WORD
WORD
simple_command_element -> WORD
simple_command -> simple_command_element
simple_command_element -> WORD
simple_command -> simple_command simple_command_element
WORD
simple_command_element -> WORD
simple_command -> simple_command simple_command_element
\n
command -> simple_command
pipeline -> command
pipeline_command -> pipeline
simple_list1 -> pipeline_command
simple_list -> simple_list1
simple_list_terminator -> '\n'
inputunit -> simple_list simple_list_terminator
yacc_EOF
inputunit -> yacc_EOF

If yacc_EOF were to be removed, do you see how to redesigned this
subset of grammar rules? Thanks. (Since this subset is much smaller
than the full grammar, I think it should be easy to see how to remove
yacc_EOF, yet maintain the same functionality of the grammar?)

-- 
Regards,
Peng

_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to