From: Russ Cox Date: Mon, 31 Jan 2011 22:42:10 +0000 (-0500) Subject: ebnflint: exit with non-zero status on error X-Git-Tag: weekly.2011-02-01~27 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=614391860aedf7d9794439c39fa42de2637d8198;p=gostls13.git ebnflint: exit with non-zero status on error Tweak spec to avoid ebnflint complaints. R=gri CC=golang-dev https://golang.org/cl/3973050 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 2d7f7768a5..8707591f66 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -4078,11 +4078,11 @@ SelectStmt = "select" "{" { CommClause } "}" . CommClause = CommCase ":" { Statement ";" } . CommCase = "case" ( SendExpr | RecvExpr) | "default" . SendExpr = Expression "<-" Expression . +RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression . + -RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression . -

For all the send and receive expressions in the "select" diff --git a/src/cmd/ebnflint/ebnflint.go b/src/cmd/ebnflint/ebnflint.go index 10cb5b387a..5eb3987354 100644 --- a/src/cmd/ebnflint/ebnflint.go +++ b/src/cmd/ebnflint/ebnflint.go @@ -88,6 +88,7 @@ func main() { src, err := ioutil.ReadFile(filename) if err != nil { scanner.PrintError(os.Stderr, err) + os.Exit(1) } if path.Ext(filename) == ".html" { @@ -97,9 +98,11 @@ func main() { grammar, err := ebnf.Parse(fset, filename, src) if err != nil { scanner.PrintError(os.Stderr, err) + os.Exit(1) } if err = ebnf.Verify(fset, grammar, *start); err != nil { scanner.PrintError(os.Stderr, err) + os.Exit(1) } }