tame/tamer/src/parse
Mike Gerwitz ed8a2ce28a tamer: xir::parse::ele: Superstate not to accept early EOF
This was accepting an early EOF when the active child `ParseState` was in an
accepting state, because it was not ensuring that anything on the stack was
also accepting.

Ideally, there should be nothing on the stack, and hopefully in the future
that's what happens.  But with how things are today, it's important that, if
anything is on the stack, it is accepting.

Since `is_accepting` on the superstate is only called during finalization,
and because the check terminates early, and because the stack practically
speaking will only have a couple things on it max (unless we're in tail
position in a deeply nested tree, without TCO [yet]), this shouldn't be an
expensive check.

Implementing this did require that we expose `Context` to `is_accepting`,
which I had hoped to avoid having to do, but here we are.

DEV-7145
2022-08-12 00:47:15 -04:00
..
state tamer: xir::parse::ele: Transition trampoline 2022-08-10 11:46:45 -04:00
error.rs tamer: parse::error: Describe unexpected token of input 2022-08-01 15:01:37 -04:00
lower.rs tamer: xir::parse::ele: Superstate not to accept early EOF 2022-08-12 00:47:15 -04:00
parser.rs tamer: xir::parse::ele: Superstate not to accept early EOF 2022-08-12 00:47:15 -04:00
state.rs tamer: xir::parse::ele: Superstate not to accept early EOF 2022-08-12 00:47:15 -04:00
trace.rs tamer: parse::trace: Include context 2022-08-12 00:47:14 -04:00