Pretty cool! On Tue, Nov 15, 2011 at 1:10 PM, Anthony Martin wrote: > Attached is a modified version of p9p yacc that > supports the Go grammar. I'll be sending a > version of Plan 9 yacc later today. > > The following is a description of the changes. > > 1. The %error-verbose directive is ignored. > > 2. A description of the final grammar is > printed before the state descriptions > in y.output. > > 3. The 'x' format for character literals is > now used instead of prefixing with a space. > > 4. The YYEMPTY define is now used to clear > the lookahead token (instead of an explicit > negative one). > > 5. Make yychar and yystate globals so they > can be inspected by external code. > > 5. Support C++ style // comments in actions. > > 6. Add a usage message. > > 7. Fix a few uses of sprint and strcpy. > > > I've also sent out a changeset to the Go > development list which adds support for > using Plan 9 yacc to generate the special > errors. > > One tiny nit is that Plan 9 uses the name > yytoknames for debugging where Bison uses > yytname. I've just used sed for this. > > Any questions? > Anthony >