summaryrefslogtreecommitdiff
path: root/src/cmd/goyacc/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/goyacc/doc.go')
-rw-r--r--src/cmd/goyacc/doc.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/goyacc/doc.go b/src/cmd/goyacc/doc.go
index eea70adab..686f75745 100644
--- a/src/cmd/goyacc/doc.go
+++ b/src/cmd/goyacc/doc.go
@@ -24,10 +24,12 @@ argument that conforms to the following interface:
type yyLexer interface {
Lex(lval *yySymType) int
+ Error(e string)
}
Lex should return the token identifier, and place other token
information in lval (which replaces the usual yylval).
+Error is equivalent to yyerror in the original yacc.
Code inside the parser may refer to the variable yylex
which holds the yyLexer passed to Parse.