Lines Matching refs:state

8235     The function is realized with a deterministic finite state machine derived
8236 from the grammar described in RFC 8259. Starting in state "init", the
8237 input is read and used to determined the next state. Only state "done"
8238 accepts the number. State "error" is a trap state to model errors. In the
8241 state | 0 | 1-9 | e E | + | - | . | anything
8253 The state machine is realized with one label per state (prefixed with
8254 "scan_number_") and `goto` statements between them. The state machine
8279 // state (init): we just found out we need to scan a number
8314 // state: we just parsed a leading minus sign
8346 // state: we just parse a zero (maybe with a leading minus sign)
8367 // state: we just parsed a number 0-9 (maybe with a leading minus sign)
8403 // state: we just parsed a decimal point
12489 // new value, we need to evaluate the new state first.
12543 // new value, we need to evaluate the new state first.
18278 std::uint8_t state = UTF8_ACCEPT;
18289 switch (decode(state, codepoint, byte))
18450 state = UTF8_ACCEPT;
18474 if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT))
18767 result of the check is stored in the @a state parameter. The function must
18768 be called initially with state 0 (accept). State 1 means the string must
18770 completely processed, but the state is non-zero, the string ended
18774 @param[in,out] state the state of the decoding
18775 @param[in,out] codep codepoint (valid only if resulting state is UTF8_ACCEPT)
18777 @return new state
18784 static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
18809 codep = (state != UTF8_ACCEPT)
18813 std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
18815 state = utf8d[index];
18816 return state;