January 2013
Intermediate to advanced
328 pages
8h 5m
English
Now that we know how to trigger application code via listeners and visitors, it’s time to build some useful applications. We’ll construct four listeners of increasing complexity based upon the CSV, JSON, and Cymbol grammars from Chapter 6, Exploring Some Real Grammars. (We could just as easily use visitors.)
The first real application is a loader for CSV files that constructs a two-dimensional list data structure. Then, we’ll figure out how to translate JSON text files into XML text files. Next, we’ll read in Cymbol programs and visualize the function call dependency graph using DOT/graphviz. Finally, we’ll build a real symbol table for Cymbol programs that checks for undefined variables ...
Read now
Unlock full access