this explains which states are used to parse rail functions