cznic / golex

github.com/cznic/golex has moved to modernc.org/golex
https://godoc.org/modernc.org/golex
BSD 3-Clause "New" or "Revised" License
182 stars 18 forks source link

small code sample #3

Closed geraldstanje closed 8 years ago

geraldstanje commented 10 years ago

Hi,

could you add a small c code example print the AST?

Thanks, -Gerald

cznic commented 10 years ago

Just to be sure: Do you mean to take a C source code input and produce its respective AST using golex and go tool yacc?

geraldstanje commented 10 years ago

yes, that would be great. that means the parser needs to create the nodes for the AST?

e.g. http://www.dimitrifourny.com/2014/04/17/write-your-first-compiler/

cznic commented 8 years ago

See cc.