]> Cypherpunks repositories - gostls13.git/commitdiff
goyacc: clarify it's package, not binary, that has
authorRob Pike <r@golang.org>
Tue, 1 Mar 2011 04:47:52 +0000 (20:47 -0800)
committerRob Pike <r@golang.org>
Tue, 1 Mar 2011 04:47:52 +0000 (20:47 -0800)
conflict and explain that you could put the grammars
in separate packages instead.

I could be talked into rolling back the previous change
and just making a doc change instead, but I'm content
to let it stand.

R=rsc
CC=golang-dev
https://golang.org/cl/4240053

src/cmd/goyacc/doc.go

index aa5bd589321ee79fbd41fed53bc7970aa14aaf8b..5dd6abe693bb2ffa1d7512f00b97d7befbb6d672 100644 (file)
@@ -35,11 +35,12 @@ 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.
 
-The "-p prefix" flag to goyacc sets the prefix, by default yy, that
-begins the names of symbols, including types, the parser, and the
-lexer, generated and referenced by goyacc's generated code.  Setting
-it to distinct values allows multiple grammars to be used in a
-single binary.
+Multiple grammars compiled into a single program should be placed in
+distinct packages.  If that is impossible, the "-p prefix" flag to
+goyacc sets the prefix, by default yy, that begins the names of
+symbols, including types, the parser, and the lexer, generated and
+referenced by goyacc's generated code.  Setting it to distinct values
+allows multiple grammars to be placed in a single package.
 
 */
 package documentation