spec: refine rules about terminating statements
spec: refine rules about terminating statements

Per a suggestion from mdempsky.

Both gc and gccgo consider a statement list as terminating if the
last _non_empty_ statement is terminating; i.e., trailing semis are
ok. Only gotype followed the current stricter rule in the spec.

This change adjusts the spec to match gc and gccgo behavior. In
support of this change, the spec has a matching rule for fallthrough,
which in valid positions may be followed by trailing semis as well.

For details and examples, see the issue below.

Fixes #14422.

Change-Id: Ie17c282e216fc40ecb54623445c17be111e17ade
Reviewed-on: https://go-review.googlesource.com/19981
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

Cofyc/go,codestation/go,vsekhar/elastic-go,CAFxX/go,polyverse-security/go,ImJasonH/go,vsekhar/elastic-go,ganboing/go-esx,josharian/go,ganboing/go-esx,Cofyc/go,golang/go,golang/go,derekmarcotte/go,momchil-velikov/go,Cofyc/go,suncycheng/go,goodlang/good,linux-on-ibm-z/go,Cofyc/go,polyverse-security/go,suncycheng/go,momchil-velikov/go,suncycheng/go,momchil-velikov/go,linux-on-ibm-z/go,CAFxX/go,momchil-velikov/go,golang/go,linux-on-ibm-z/go,theif519/go,josharian/go,nawawi/go,Cofyc/go,josharian/go,theif519/go,cloudflare/go,nawawi/go,4ad/go,akutz/go,codestation/go,akutz/go,akutz/go,theif519/go,linux-on-ibm-z/go,derekmarcotte/go,cloudflare/go,momchil-velikov/go,nawawi/go,linux-on-ibm-z/go,derekmarcotte/go,goodlang/good,codestation/go,4ad/go,ganboing/go-esx,ImJasonH/go,akutz/go,4ad/go,polyverse-security/go,vsekhar/elastic-go,goodlang/good,golang/go,akutz/go,ganboing/go-esx,suncycheng/go,ImJasonH/go,derekmarcotte/go,ganboing/go-esx,codestation/go,akutz/go,nawawi/go,ImJasonH/go,nawawi/go,Cofyc/go,theif519/go,vsekhar/elastic-go,goodlang/good,4ad/go,golang/go,Cofyc/go,codestation/go,codestation/go,josharian/go,polyverse-security/go,golang/go,linux-on-ibm-z/go,vsekhar/elastic-go,codestation/go,linux-on-ibm-z/go,polyverse-security/go,golang/go,4ad/go,vsekhar/elastic-go,cloudflare/go,ImJasonH/go,akutz/go,vsekhar/elastic-go,codestation/go,cloudflare/go,ganboing/go-esx,cloudflare/go,polyverse-security/go,4ad/go,4ad/go,theif519/go,nawawi/go,christopher-henderson/Go,cloudflare/go,polyverse-security/go,nawawi/go,cloudflare/go,CAFxX/go,CAFxX/go,derekmarcotte/go,CAFxX/go,ImJasonH/go,josharian/go,ganboing/go-esx,theif519/go,linux-on-ibm-z/go,vsekhar/elastic-go,josharian/go,goodlang/good,polyverse-security/go,CAFxX/go,theif519/go,ganboing/go-esx,derekmarcotte/go,golang/go,goodlang/good,ImJasonH/go,akutz/go,momchil-velikov/go,cloudflare/go,goodlang/good,derekmarcotte/go,suncycheng/go,suncycheng/go,CAFxX/go,josharian/go,theif519/go,goodlang/good,CAFxX/go,4ad/go,josharian/go,Cofyc/go,derekmarcotte/go,suncycheng/go,momchil-velikov/go,nawawi/go,suncycheng/go,ImJasonH/go,momchil-velikov/go