ter kind wants to create a node it must claim priority first (like taking a lock). priority can be claimes only when it is free. If an element of AST succedes in claiming priority its id (pointer) is recorded in priority. After an element has finished it frees the priority. In general an AST element E checks if an ancestor has claimed priority. If priority is already claimed E does not have to create a node. If priority is free then it means E has to create the node. Then E claims priority and release it af