Next: , Previous: , Up: Value methods   [Contents]

17.5 Creating a new valuator

Function: Marpa_Value marpa_v_new ( Marpa_Tree t )

Creates a new valuator. The parent object of the new valuator will be the tree iterator t, and the reference count of the new valuator will be 1. The reference count of t is increased by 1.

The parent tree iterator is “paused”, so that the tree iterator cannot move on to a new parse tree until the valuator is destroyed. Many valuators of the same parse tree can exist at once. A tree iterator is “unpaused” when all of the valuators of that tree iterator are destroyed.

Return value: On success, the newly created valuator. On failure, NULL.