static int
yy_isspace(int c)
{
- return c >= 0 && c <= 0xFF && isspace(c);
+ return c == ' ' || c == '\t' || c == '\n' || c == '\r';
}
static int
isfrog(int c)
{
// complain about possibly invisible control characters
- if(c < 0)
- return 1;
if(c < ' ') {
- if(c == '\n' || c== '\r' || c == '\t') // good white space
- return 0;
- return 1;
+ return !yy_isspace(c); // exclude good white space
}
if(0x7f <= c && c <= 0xa0) // DEL, unicode block including unbreakable space.
return 1;
--- /dev/null
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+const (
+ _ = iota
+ _\a // ERROR "illegal character"
+ _\b // ERROR "illegal character"
+ _\v // ERROR "illegal character"
+ _\f // ERROR "illegal character"
+)