adding working code for parsing input text to production tree, and outputting parsed tree in JSON format for viewing with HTML page