mirror of
https://github.com/golang/go
synced 2024-11-21 14:54:40 -07:00
go spec: fix error in production syntax
Fix analoguous error in ebnf.go which already correctly accepted an empty production. Fixes #1821. R=r CC=golang-dev https://golang.org/cl/4526056
This commit is contained in:
parent
5236814edd
commit
32b822f29a
@ -1,5 +1,5 @@
|
||||
<!-- title The Go Programming Language Specification -->
|
||||
<!-- subtitle Version of May 12, 2011 -->
|
||||
<!-- subtitle Version of May 13, 2011 -->
|
||||
|
||||
<!--
|
||||
TODO
|
||||
@ -46,7 +46,7 @@ The syntax is specified using Extended Backus-Naur Form (EBNF):
|
||||
</p>
|
||||
|
||||
<pre class="grammar">
|
||||
Production = production_name "=" Expression "." .
|
||||
Production = production_name "=" [ Expression ] "." .
|
||||
Expression = Alternative { "|" Alternative } .
|
||||
Alternative = Term { Term } .
|
||||
Term = production_name | token [ "..." token ] | Group | Option | Repetition .
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Package ebnf is a library for EBNF grammars. The input is text ([]byte)
|
||||
// satisfying the following grammar (represented itself in EBNF):
|
||||
//
|
||||
// Production = name "=" Expression "." .
|
||||
// Production = name "=" [ Expression ] "." .
|
||||
// Expression = Alternative { "|" Alternative } .
|
||||
// Alternative = Term { Term } .
|
||||
// Term = name | token [ "..." token ] | Group | Option | Repetition .
|
||||
|
Loading…
Reference in New Issue
Block a user