CommClause = CommCase ":" { Statement ";" } .
CommCase = "case" ( SendExpr | RecvExpr) | "default" .
SendExpr = Expression "<-" Expression .
+RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression .
+</pre>
<!-- TODO(rsc):
RecvExpr = [ Expression [ "," Expression ] ( "=" | ":=" ) ] "<-" Expression .
-->
-RecvExpr = [ Expression ( "=" | ":=" ) ] "<-" Expression .
-</pre>
<p>
For all the send and receive expressions in the "select"
src, err := ioutil.ReadFile(filename)
if err != nil {
scanner.PrintError(os.Stderr, err)
+ os.Exit(1)
}
if path.Ext(filename) == ".html" {
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)
}
}