Rather than returning a list of productions and an index,
return the relevant production directly from the rule function.
Also introduce a tag value (replacing production_idx) which tracks
information like command decorations, etc. with more clarity.
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.
Fixes#1866