How can I see what query is emitted by the query parser?
This leads me to suspect that the query parser is emitting a query
  that doesn't contain the clause y.


The query parser emits query trees and the query planner emits plans. Both can be shown in more detail with the debug_print_parse and debug_print_plan settings.
From the documentation:


  Now what is a query tree? It is an internal representation of an SQL
  statement where the single parts that it is built from are stored
  separately. These query trees can be shown in the server log if you
  set the configuration parameters debug_print_parse,
  debug_print_rewritten, or debug_print_plan


In the case of the query in the question, y is apparently eliminated. It's the work of the planner, not of the parser.
The log output with debug_print_parse would show it, because that's before it gets eliminated, contrary to the output with debug_print_plan, in which it should not be present.

However, the result of EXPLAIN with no mention of the evaluation of y should be a sufficient proof that the planner has eliminated it.