How to produce executable code using yecc?

You shouldn’t need to care how ecto works internally. Unless you’re doing some very complex stuff you should be able to recursively build up an ecto query just using the public api of it.