pointlander/peg — pull request #29 by sethwklein (2014-08-04 07:55:58+00:00)
Title: Spacing optional in too many places

What I did:

```bash
cat <<'HERE' >nospace.peg
packagenospace
type T Peg {}
Grammar <- !.
HERE
peg nospace.peg
head -n 1 nospace.peg.go
package nospace
```
What I got: a successfully generated file.

What I expected: an error because `packagenospace` certainly doesn't look like a package clause to me or to gc: http://play.golang.org/p/FlYdunLZD7

The problem is these definitions from `peg.peg`:

Spacing	<- (Space / Comment)*
Grammar	<- Spacing 'package' Spacing Identifier ....

Which works fine in the grammar from the original paper, where Identifier never appears next to a run of characters also found in IdentCont, but not so well here.

There are a few occurrences of this bug in the grammar besides the one highlighted here.