tame/tamer/src/xir/parse
Mike Gerwitz ab0e4151a1 tamer: xir::parse::ele::ele_parse!: Integrate `attr_parse_stream!`
This handles the bulk of the integration of the new `attr_parse_stream!` as
a replacement for `attr_parse!`, which moves from aggregate attribute
objects to a stream of attribute-derived tokens.  Rationale for this change
is in the preceding commit messages.

The first striking change here is how it affects the test cases: nearly all
`Incomplete`s are removed.  Note that the parser has an existing
optimization whereby `Incomplete` with lookahead causes immediate recursion
within `Parser`, since those situations are used only for control flow and
to keep recursion out of `ParseState`s.

Next: this removes types from `nir::parse`'s grammar for attributes.  The
types will instead be derived from NIR tokens later in the lowering
pipeline.  This simplifies NIR considerably, since adding types into the mix
at this point was taking an already really complex lowering phase and making
it ever more difficult to reason about and get everything working together
the way that I needed.

Because of `attr_parse_stream!`, there are no more required attribute
checks.  Those will be handled later in the lowering pipeline, if they're
actually needed in context, with possibly one exception: namespace
declarations.  Those are really part of the document and they ought to be
handled _earlier_ in the pipeline; I'll do that at some point.  It's not
required for compilation; it's just required to maintain compliance with the
XML spec.

We also lose checks for duplicate attributes.  This is also something that
ought to be handled at the document level, and so earlier in the pipeline,
since XML cares, not us---if we get a duplicate attribute that results in an
extra NIR token, then the next parser will error out, since it has to check
for those things anyway.

A bunch of cleanup and simplification is still needed; I want to get the
initial integration committed first.  It's a shame I'm getting rid of so
much work, but this is the right approach, and results in a much simpler
system.

DEV-13346
2022-12-01 11:09:26 -05:00
..
attr tamer: xir::prase: Extract intermediate attribute aggregate state into Context 2022-11-09 16:01:09 -05:00
attrstream tamer: xir::parse::attrstream: Value from SPair 2022-12-01 11:09:25 -05:00
ele tamer: xir::parse::ele::ele_parse!: Integrate `attr_parse_stream!` 2022-12-01 11:09:26 -05:00
attr.rs tamer: xir::prase: Extract intermediate attribute aggregate state into Context 2022-11-09 16:01:09 -05:00
attrstream.rs tamer: xir::parse::ele::ele_parse!: Integrate `attr_parse_stream!` 2022-12-01 11:09:26 -05:00
ele.rs tamer: xir::parse::ele::ele_parse!: Integrate `attr_parse_stream!` 2022-12-01 11:09:26 -05:00
error.rs tamer: xir::prase: Extract intermediate attribute aggregate state into Context 2022-11-09 16:01:09 -05:00