cznic / goyacc

github.com/cznic/goyacc has moved to modernc.org/goyacc
https://godoc.org/modernc.org/goyacc
BSD 3-Clause "New" or "Revised" License
207 stars 24 forks source link

Newline may get lost in semantic action #4

Closed cznic closed 9 years ago

cznic commented 9 years ago
$ cat test.y
%union {
    val string
}

%token <val> INT

%%

Start:
    INT
    {
        _ = $1
        return 0
    }
$ goyacc -o /dev/stdout 2>/dev/null test.y | grep valreturn
        _ = stack[sp-0].valreturn 0
$ 
cznic commented 9 years ago

Another failing case.