From e2be0f7276f6ea2d8290dea1ffd89c98f6ac0b9e Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 9 Jul 2018 13:37:09 +1000 Subject: [PATCH] cmd/goyacc: include arguments in DO NOT EDIT marker A follow-on to CL122095, which normalized the marker but did not include the arguments. Output now looks like this: // Code generated by goyacc -o expr.go -p expr expr.y. DO NOT EDIT. Change-Id: I20577ea90943516f45478d778353b5bd2f485dfa Reviewed-on: https://go-review.googlesource.com/122540 Reviewed-by: Brad Fitzpatrick --- cmd/goyacc/yacc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/goyacc/yacc.go b/cmd/goyacc/yacc.go index 5e77e2f5e6..92764014c5 100644 --- a/cmd/goyacc/yacc.go +++ b/cmd/goyacc/yacc.go @@ -387,7 +387,7 @@ func setup() { yaccpar = strings.Replace(yaccpartext, "$$", prefix, -1) openup() - fmt.Fprintf(ftable, "// Code generated by goyacc. DO NOT EDIT.") + fmt.Fprintf(ftable, "// Code generated by goyacc %s. DO NOT EDIT.", strings.Join(os.Args[1:], " ")) defin(0, "$end") extval = PRIVATE // tokens start in unicode 'private use'