Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 366997

Summary: Parser can't handle echo foo > a b
Product: Gentoo Hosted Projects Reporter: Petteri Räty (RETIRED) <betelgeuse>
Component: libbashAssignee: Petteri Räty (RETIRED) <betelgeuse>
Status: RESOLVED OBSOLETE    
Severity: normal CC: qiaomuf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Petteri Räty (RETIRED) gentoo-dev 2011-05-12 14:53:28 UTC
betelgeuse@pena ~/gsoc/libbash $ ./ast_printer -e 'echo foo > a b'
-memory-(1)  : error 3 : ()* loopback of 121:55: ( ( BLANK )* PIPE ( BLANK )* command )*, at offset 12
    near [Index: 8 (Start: 162240441-Stop: 162240441) ='b', type<96> Line: 1 LinePos:12]
     : cannot match to any predicted input...
(LIST Tree Error Node)
betelgeuse@pena ~/gsoc/libbash $ ./ast_printer -e 'echo foo b > a'
(LIST (COMMAND (STRING echo) (STRING foo) (STRING b) (REDIR > (STRING a))))

These two expressions should produce the same AST. Redirection operators can be at any place in a simple command.
Comment 1 Pacho Ramos gentoo-dev 2018-01-25 17:57:53 UTC
Developer retired (and his mail address is not active anymore)