SC.Parser.SCXML.StateStack (sc v1.0.2)

View Source

Manages the parsing state stack for hierarchical SCXML document construction.

This module handles adding and removing elements from the parsing stack, and updating parent elements when child elements are completed.

Summary

Functions

Handle the end of an assign element by adding it to the parent onentry/onexit block.

Handle the end of a data element by adding it to the document's datamodel.

Handle the end of a datamodel element by simply popping it from the stack.

Handle the end of a log element by adding it to the parent onentry/onexit block.

Handle the end of an onentry element by moving collected actions to parent state.

Handle the end of an onexit element by moving collected actions to parent state.

Handle the end of a raise element by adding it to the parent onentry/onexit block.

Handle the end of a state element by adding it to its parent.

Handle the end of a transition element by adding it to its parent state.

Pop an element from the parsing stack.

Push an element onto the parsing stack.

Functions

handle_assign_end(state)

@spec handle_assign_end(map()) :: {:ok, map()}

Handle the end of an assign element by adding it to the parent onentry/onexit block.

handle_data_end(state)

@spec handle_data_end(map()) :: {:ok, map()}

Handle the end of a data element by adding it to the document's datamodel.

handle_datamodel_end(state)

@spec handle_datamodel_end(map()) :: {:ok, map()}

Handle the end of a datamodel element by simply popping it from the stack.

handle_log_end(state)

@spec handle_log_end(map()) :: {:ok, map()}

Handle the end of a log element by adding it to the parent onentry/onexit block.

handle_onentry_end(state)

@spec handle_onentry_end(map()) :: {:ok, map()}

Handle the end of an onentry element by moving collected actions to parent state.

handle_onexit_end(state)

@spec handle_onexit_end(map()) :: {:ok, map()}

Handle the end of an onexit element by moving collected actions to parent state.

handle_raise_end(state)

@spec handle_raise_end(map()) :: {:ok, map()}

Handle the end of a raise element by adding it to the parent onentry/onexit block.

handle_state_end(state)

@spec handle_state_end(map()) :: {:ok, map()}

Handle the end of a state element by adding it to its parent.

handle_transition_end(state)

@spec handle_transition_end(map()) :: {:ok, map()}

Handle the end of a transition element by adding it to its parent state.

pop_element(state)

@spec pop_element(map()) :: map()

Pop an element from the parsing stack.

push_element(state, element_name, element_data)

@spec push_element(map(), String.t(), any()) :: map()

Push an element onto the parsing stack.