# How to produce executable code using yecc?

**URL:** <https://forum.elixirforum.com/t/how-to-produce-executable-code-using-yecc/23644>\
**Category:** Questions\
**Tags:** ecto-query, yecc\
**Created:** [July 3, 2019, 12:32am UTC](https://forum.elixirforum.com/t/how-to-produce-executable-code-using-yecc/23644 "2019-07-03T00:32:11Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![kip](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/32/1440_2.png) [@kip](https://forum.elixirforum.com/u/kip)\
**Post date:** [July 3, 2019, 7:16am UTC](https://forum.elixirforum.com/t/how-to-produce-executable-code-using-yecc/23644/5 "2019-07-03T07:16:42Z")

</div>

Its been a while since I dived into the Ecto source, but my recollection is that at the lowest level, Ecto does actually interpret an elixir (or very close to elixir) AST as it builds the SQL query. Therefore it may be possible to dive into what AST is produced by the Ecto DSL and mirror that. Not a trivial exercise and there’s no guarantee that the AST used by Ecto will stay the same, but I suspect its a reasonable approach to take if that’s what you really need to do.

---

_[View the full topic](https://forum.elixirforum.com/t/how-to-produce-executable-code-using-yecc/23644)._
