# seperation Tremor uses two seperators `,` and `;`. The pattern when which is used is as following: ## commands Commands are separated with a `;`. This can be seen in top-level troy, trickle, and tremor script, in `patch`, `match`, and `for`. ## data Data is seperated by `,` this can be seen in arrays and records as well as in the window declerators for select and the with and args part of troy and trickle defines and creates # order of arguments in commands A general pattern that repeats in troy/trickle/tremor-script is: ``` ``` ## query / troy syntax: ### Definitional statements ```tremor define connector from ; define window from ; define operator from ; define flow ; define script ; define pipeline ; ``` **CHAGE**: it was: ``` define connector ; define window ; define operator ; ``` ### Creational statements ```tremor create stream create script ; create script from ; create operator ; create operator from ; create pipeline ; create pipeline from ; create connector ; create connector from ; deploy flow from ; ``` ### args and with ``` args [ = ] with = end ``` ## in the script syntax ### let ```tremor let = ; ``` ### merge and patch ```tremor merge from end; patch from end; ``` ### records ```tremor { "": } ## non conforming ### connect `connect` switches target and source, while it would be possible to swap those around to follow the same `target` first `source` second pattern, it is counter-intuitive to the fact that tremor uses the English language and pipelining here is commonly thought of as something going from left to right. ```tremor connect to ; ``` ### match and for `match` and `for` both do not follow the pattern of `target` first `source` second. The reasoning for this is twofold. Again with English being the foundation of the language for control statements, it is more idiomatic to put the condition before the consequence. This pattern is also widespread in other programming languages. The second factor is that we have multiple possible targets, and moving them upfront would lead to a very hard-to-read construct. ```tremor match of case => ... end; ``` ```tremor for in case => ... end; ``` ### select `select is a unique case as it conforms and does not conform to this pattern in different places. We look at the different parts and explain why. The non-conforming part is the `from` / `to` section. The reasoning here follows the same reasoning in `connect` we have a dataflow, and in the English language, this typically moves left to right. ```tremor ... from to ``` The conforming part is the `select` / `from` section. Here we have the target (`script`) on the left and the source (`from`) on the right. We choose This to conform with SQL. ```tremor select from ... ```