Re: ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]

2018-06-27 Thread Chet Ramey
On 6/27/18 10:33 AM, Piotr Grzybowski wrote: > > On 27 Jun 2018, at 14:57, Chet Ramey wrote: > >> On 6/27/18 6:59 AM, Piotr Grzybowski wrote: >> >>> +function_newline_list: '(' ')' | function_newline_list '\n' >>> + ; >>> + >> >> This would appear to allow constructs like >> >> foo() >> ()

Re: Directing into a variable doesn't work

2018-06-27 Thread tetsujin
When I initially read this thread, I was concerned about the idea of adding yet another mutation of the redirect syntax. Like how far does this go? Would we introduce a "" someday for some other bit of functionality? Ideally, I think it would be better if this could be done with pipe syntax

Re: ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]

2018-06-27 Thread Piotr Grzybowski
On 27 Jun 2018, at 14:57, Chet Ramey wrote: > On 6/27/18 6:59 AM, Piotr Grzybowski wrote: > >> +function_newline_list: '(' ')' | function_newline_list '\n' >> + ; >> + > > This would appear to allow constructs like > > foo() > () () > { > function body > } only by the look of thi

Re: ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]

2018-06-27 Thread Chet Ramey
On 6/27/18 6:59 AM, Piotr Grzybowski wrote: > +function_newline_list: '(' ')' | function_newline_list '\n' > + ; > + This would appear to allow constructs like foo() () () { function body } -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lon

./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]

2018-06-27 Thread Piotr Grzybowski
Hey, I case anyone noticed, in the current devel there is shift/reduce conflict reported by bison. Those usually are a symptom of not fully controlled grammar, and I would like to think that we are in full control over parse.y. It is caused by function_def rule, namely the combination of '(' a