TAQ Reference Guide
This reference presents TAQ, one topic at time, to progressively introduce the features of the language. Each topic contains one or more example programs. A page is linked to each example which shows the TAQ file along with supporting documentation. All such links are also displayed on the right hand side of the Reference index. An example page link is identified by the name of the TAQ file. The high_cities link is high_cities.taq.
The TAQ project suite, which includes all the examples, is available from Github. The TAQ files have extension ".taq" and can be compiled and run from a terminal window using commands given in the example pages. Each command must be run from the root directory of the examples project. A dedicated application is also provided for each example so it can be run in a Java IDE such as IntelliJ IDEA.
TAQ Primer
Syntax highlighting helps with readability. Here is the color scheme.
Color | Syntax Highlighted |
---|---|
axiom | keywords |
integer | types |
"text"; | text strings |
123 | numbers |
// Cities | comments |
A program will have at least one query but there may be more depending on what is being demonstrated. It is recommended to copy paste commands as given on example pages in order to avoid errors. Often the only required parameter is the name of the example TAQ file, but other other arguments may be required, such as the name of queries to exclude or a value to input into the query.
The early programs should be easy to follow as only a limited number of features are being demonstrated. Each query declaration determines which structures participate and in which order. Topic 11 on "Flow" marks a transition to perhaps more challenging material as procedural programming features are introduced. The notation is terse so one needs to pay attention to understand the code. .
TAQ has no keywords for execution flow control such as "if" or "else". The only clue is the humble question mark which indicates a possible change in the flow according to whether a condition tests true or false. The high_cities query show one way a question mark performs execution flow control: