2302 lines
102 KiB
Plaintext
2302 lines
102 KiB
Plaintext
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
module foo {
|
|
|
|
import hilti;
|
|
import spicy_rt;
|
|
|
|
type X0 = struct {
|
|
weak_ref<stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X0> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X0_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X1 = struct {
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X1> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X1_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X2 = struct {
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X2> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X2_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X3 = struct {
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks" &needed-by-feature="is_filter";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
weak_ref<spicy_rt::Forward> __forward &internal &needed-by-feature="is_filter";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X3> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X3_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X4 = struct {
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks" &needed-by-feature="is_filter";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
weak_ref<spicy_rt::Forward> __forward &internal &needed-by-feature="is_filter";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X4> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X4_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
public type X5 = struct {
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &always-emit;
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X5> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X5_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X6 = struct {
|
|
strong_ref<spicy_rt::Sink> data &default=new spicy_rt::Sink() &internal &needed-by-feature="supports_sinks";
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X6> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X6_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
type X7 = struct {
|
|
strong_ref<spicy_rt::Sink> data &default=new spicy_rt::Sink() &internal &needed-by-feature="supports_sinks";
|
|
weak_ref<const stream> __stream &internal &needed-by-feature="uses_stream";
|
|
iterator<stream> __begin &internal &needed-by-feature="uses_random_access";
|
|
optional<iterator<stream>> __position_update &internal &needed-by-feature="uses_random_access";
|
|
uint<64> __offset &internal &needed-by-feature="uses_offset";
|
|
spicy_rt::Parser __parser &static &internal &needed-by-feature="supports_filters" &needed-by-feature="supports_sinks";
|
|
spicy_rt::SinkState __sink &internal &needed-by-feature="supports_sinks";
|
|
strong_ref<spicy_rt::Filters> __filters &internal &needed-by-feature="supports_filters";
|
|
optional<hilti::RecoverableFailure> __error &always-emit &internal;
|
|
hook void __on_0x25_init();
|
|
hook void __on_0x25_done();
|
|
hook void __on_0x25_error(string __except);
|
|
hook optional<string> __hook_to_string();
|
|
hook void __on_0x25_finally();
|
|
hook void __on_0x25_confirmed() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_rejected() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_synced() &needed-by-feature="synchronization";
|
|
hook void __on_0x25_gap(uint<64> seq, uint<64> len);
|
|
hook void __on_0x25_overlap(uint<64> seq, bytes old, bytes new_);
|
|
hook void __on_0x25_skipped(uint<64> seq);
|
|
hook void __on_0x25_undelivered(uint<64> seq, bytes data);
|
|
hook void __on_0x25_sync_advance(uint<64> offset) &needed-by-feature="uses_sync_advance";
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
method view<stream> parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse2(inout value_ref<X7> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method view<stream> parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static;
|
|
method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __parse_foo__X7_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error);
|
|
} &on-heap;
|
|
|
|
const bool __feat%foo@@X0%uses_offset = True;
|
|
const bool __feat%foo@@X0%uses_random_access = True;
|
|
const bool __feat%foo@@X0%uses_stream = True;
|
|
const bool __feat%foo@@X0%uses_sync_advance = True;
|
|
const bool __feat%foo@@X0%is_filter = False;
|
|
const bool __feat%foo@@X0%supports_filters = True;
|
|
const bool __feat%foo@@X0%supports_sinks = True;
|
|
const bool __feat%foo@@X0%synchronization = True;
|
|
const bool __feat%foo@@X1%uses_offset = True;
|
|
const bool __feat%foo@@X1%uses_random_access = True;
|
|
const bool __feat%foo@@X1%uses_stream = True;
|
|
const bool __feat%foo@@X1%uses_sync_advance = True;
|
|
const bool __feat%foo@@X1%is_filter = False;
|
|
const bool __feat%foo@@X1%supports_filters = True;
|
|
const bool __feat%foo@@X1%supports_sinks = True;
|
|
const bool __feat%foo@@X1%synchronization = True;
|
|
const bool __feat%foo@@X2%uses_offset = True;
|
|
const bool __feat%foo@@X2%uses_random_access = True;
|
|
const bool __feat%foo@@X2%uses_stream = True;
|
|
const bool __feat%foo@@X2%uses_sync_advance = True;
|
|
const bool __feat%foo@@X2%is_filter = False;
|
|
const bool __feat%foo@@X2%supports_filters = True;
|
|
const bool __feat%foo@@X2%supports_sinks = True;
|
|
const bool __feat%foo@@X2%synchronization = True;
|
|
const bool __feat%foo@@X3%uses_offset = True;
|
|
const bool __feat%foo@@X3%uses_random_access = True;
|
|
const bool __feat%foo@@X3%uses_stream = True;
|
|
const bool __feat%foo@@X3%uses_sync_advance = True;
|
|
const bool __feat%foo@@X3%is_filter = True;
|
|
const bool __feat%foo@@X3%supports_filters = True;
|
|
const bool __feat%foo@@X3%supports_sinks = True;
|
|
const bool __feat%foo@@X3%synchronization = True;
|
|
const bool __feat%foo@@X4%uses_offset = True;
|
|
const bool __feat%foo@@X4%uses_random_access = True;
|
|
const bool __feat%foo@@X4%uses_stream = True;
|
|
const bool __feat%foo@@X4%uses_sync_advance = True;
|
|
const bool __feat%foo@@X4%is_filter = True;
|
|
const bool __feat%foo@@X4%supports_filters = True;
|
|
const bool __feat%foo@@X4%supports_sinks = True;
|
|
const bool __feat%foo@@X4%synchronization = True;
|
|
const bool __feat%foo@@X5%uses_offset = True;
|
|
const bool __feat%foo@@X5%uses_random_access = True;
|
|
const bool __feat%foo@@X5%uses_stream = True;
|
|
const bool __feat%foo@@X5%uses_sync_advance = True;
|
|
const bool __feat%foo@@X5%is_filter = False;
|
|
const bool __feat%foo@@X5%supports_filters = True;
|
|
const bool __feat%foo@@X5%supports_sinks = True;
|
|
const bool __feat%foo@@X5%synchronization = True;
|
|
const bool __feat%foo@@X6%uses_offset = True;
|
|
const bool __feat%foo@@X6%uses_random_access = True;
|
|
const bool __feat%foo@@X6%uses_stream = True;
|
|
const bool __feat%foo@@X6%uses_sync_advance = True;
|
|
const bool __feat%foo@@X6%is_filter = False;
|
|
const bool __feat%foo@@X6%supports_filters = True;
|
|
const bool __feat%foo@@X6%supports_sinks = True;
|
|
const bool __feat%foo@@X6%synchronization = True;
|
|
const bool __feat%foo@@X7%uses_offset = True;
|
|
const bool __feat%foo@@X7%uses_random_access = True;
|
|
const bool __feat%foo@@X7%uses_stream = True;
|
|
const bool __feat%foo@@X7%uses_sync_advance = True;
|
|
const bool __feat%foo@@X7%is_filter = False;
|
|
const bool __feat%foo@@X7%supports_filters = True;
|
|
const bool __feat%foo@@X7%supports_sinks = True;
|
|
const bool __feat%foo@@X7%synchronization = True;
|
|
|
|
method hook void foo::X0::__on_0x25_init() {
|
|
(*self).__offset;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X0::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X0%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X0%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X0_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X0_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X0%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X0%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X0::__parse_foo__X0_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access || ::__feat%foo@@X0%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X0%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X0%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X0::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
local value_ref<X0> __unit = value_ref(default<const X0>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
|
|
# Begin parsing production: Unit: foo__X0 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X0 ->
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X0::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
local value_ref<X0> __unit = value_ref(default<const X0>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
|
|
# Begin parsing production: Unit: foo__X0 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X0 ->
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X0::parse2(inout value_ref<X0> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:13:11-15:1"
|
|
|
|
# Begin parsing production: Unit: foo__X0 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X0 ->
|
|
|
|
if ( ::__feat%foo@@X0%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X0%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X0() {
|
|
|
|
if ( ::__feat%foo@@X0%is_filter || ::__feat%foo@@X0%supports_sinks ) {
|
|
foo::X0::__parser = [$name="foo::X0", $is_public=False, $parse1=foo::X0::parse1, $parse2=foo::X0::parse2, $parse3=foo::X0::parse3, $context_new=Null, $type_=X0, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X0::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method hook void foo::X1::__on_0x25_init() {
|
|
(*self).__begin;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X1::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X1%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X1%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X1_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X1_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X1%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X1%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X1::__parse_foo__X1_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access || ::__feat%foo@@X1%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X1%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X1%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X1::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
local value_ref<X1> __unit = value_ref(default<const X1>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
|
|
# Begin parsing production: Unit: foo__X1 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X1 ->
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X1::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
local value_ref<X1> __unit = value_ref(default<const X1>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
|
|
# Begin parsing production: Unit: foo__X1 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X1 ->
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X1::parse2(inout value_ref<X1> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:18:11-20:1"
|
|
|
|
# Begin parsing production: Unit: foo__X1 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X1 ->
|
|
|
|
if ( ::__feat%foo@@X1%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X1%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X1() {
|
|
|
|
if ( ::__feat%foo@@X1%is_filter || ::__feat%foo@@X1%supports_sinks ) {
|
|
foo::X1::__parser = [$name="foo::X1", $is_public=False, $parse1=foo::X1::parse1, $parse2=foo::X1::parse2, $parse3=foo::X1::parse3, $context_new=Null, $type_=X1, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X1::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X2::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X2%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X2%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X2_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X2_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X2%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X2%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X2::__parse_foo__X2_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access || ::__feat%foo@@X2%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X2%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X2%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X2::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
local value_ref<X2> __unit = value_ref(default<const X2>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
|
|
# Begin parsing production: Unit: foo__X2 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X2 ->
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X2::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
local value_ref<X2> __unit = value_ref(default<const X2>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
|
|
# Begin parsing production: Unit: foo__X2 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X2 ->
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X2::parse2(inout value_ref<X2> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:23:11-23:17"
|
|
|
|
# Begin parsing production: Unit: foo__X2 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X2 ->
|
|
|
|
if ( ::__feat%foo@@X2%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X2%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X2() {
|
|
|
|
if ( ::__feat%foo@@X2%is_filter || ::__feat%foo@@X2%supports_sinks ) {
|
|
foo::X2::__parser = [$name="foo::X2", $is_public=False, $parse1=foo::X2::parse1, $parse2=foo::X2::parse2, $parse3=foo::X2::parse3, $context_new=Null, $type_=X2, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X2::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X3::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X3%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X3%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X3_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X3_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X3%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%is_filter )
|
|
spicy_rt::filter_forward_eod(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X3::__parse_foo__X3_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access || ::__feat%foo@@X3%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X3%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%is_filter )
|
|
spicy_rt::filter_forward_eod(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X3::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
local value_ref<X3> __unit = value_ref(default<const X3>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
|
|
# Begin parsing production: Unit: foo__X3 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X3 ->
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X3::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
local value_ref<X3> __unit = value_ref(default<const X3>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
|
|
# Begin parsing production: Unit: foo__X3 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X3 ->
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X3::parse2(inout value_ref<X3> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:26:11-28:1"
|
|
|
|
# Begin parsing production: Unit: foo__X3 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X3 ->
|
|
|
|
if ( ::__feat%foo@@X3%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X3%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X3() {
|
|
|
|
if ( ::__feat%foo@@X3%is_filter || ::__feat%foo@@X3%supports_sinks ) {
|
|
foo::X3::__parser = [$name="foo::X3", $is_public=False, $parse1=foo::X3::parse1, $parse2=foo::X3::parse2, $parse3=foo::X3::parse3, $context_new=Null, $type_=X3, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X3::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X4::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X4%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X4%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X4_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X4_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X4%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%is_filter )
|
|
spicy_rt::filter_forward_eod(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X4::__parse_foo__X4_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access || ::__feat%foo@@X4%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X4%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%is_filter )
|
|
spicy_rt::filter_forward_eod(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X4::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
local value_ref<X4> __unit = value_ref(default<const X4>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
|
|
# Begin parsing production: Unit: foo__X4 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X4 ->
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X4::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
local value_ref<X4> __unit = value_ref(default<const X4>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
|
|
# Begin parsing production: Unit: foo__X4 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X4 ->
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X4::parse2(inout value_ref<X4> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:32:11-34:1"
|
|
|
|
# Begin parsing production: Unit: foo__X4 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X4 ->
|
|
|
|
if ( ::__feat%foo@@X4%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X4%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X4() {
|
|
|
|
if ( ::__feat%foo@@X4%is_filter || ::__feat%foo@@X4%supports_sinks ) {
|
|
foo::X4::__parser = [$name="foo::X4", $is_public=False, $parse1=foo::X4::parse1, $parse2=foo::X4::parse2, $parse3=foo::X4::parse3, $context_new=Null, $type_=X4, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X4::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method hook void foo::X5::__on_0x25_init() {
|
|
spicy_rt::filter_connect(self, new X4());
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X5::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X5%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X5%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X5_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X5_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X5%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X5%supports_sinks )
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X5::__parse_foo__X5_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access || ::__feat%foo@@X5%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X5%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X5%supports_sinks )
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X5::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
local value_ref<X5> __unit = value_ref(default<const X5>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
|
|
# Begin parsing production: Unit: foo__X5 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X5 ->
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X5::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
local value_ref<X5> __unit = value_ref(default<const X5>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
|
|
# Begin parsing production: Unit: foo__X5 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X5 ->
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X5::parse2(inout value_ref<X5> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:36:18-40:1"
|
|
|
|
# Begin parsing production: Unit: foo__X5 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X5 ->
|
|
|
|
if ( ::__feat%foo@@X5%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X5%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X5() {
|
|
foo::X5::__parser = [$name="foo::X5", $is_public=True, $parse1=foo::X5::parse1, $parse2=foo::X5::parse2, $parse3=foo::X5::parse3, $context_new=Null, $type_=X5, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X5::__parser, $scope, Null);
|
|
}
|
|
|
|
method hook void foo::X6::__on_0x25_init() {
|
|
(*(*self).data).write(b"", Null, Null);
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X6::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X6%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X6%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X6_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X6_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X6%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X6%supports_sinks )
|
|
(*(*self).data).close();
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X6::__parse_foo__X6_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access || ::__feat%foo@@X6%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X6%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X6%supports_sinks )
|
|
(*(*self).data).close();
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X6::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
local value_ref<X6> __unit = value_ref(default<const X6>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
|
|
# Begin parsing production: Unit: foo__X6 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X6 ->
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X6::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
local value_ref<X6> __unit = value_ref(default<const X6>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
|
|
# Begin parsing production: Unit: foo__X6 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X6 ->
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X6::parse2(inout value_ref<X6> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:43:11-46:1"
|
|
|
|
# Begin parsing production: Unit: foo__X6 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X6 ->
|
|
|
|
if ( ::__feat%foo@@X6%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X6%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X6() {
|
|
|
|
if ( ::__feat%foo@@X6%is_filter || ::__feat%foo@@X6%supports_sinks ) {
|
|
foo::X6::__parser = [$name="foo::X6", $is_public=False, $parse1=foo::X6::parse1, $parse2=foo::X6::parse2, $parse3=foo::X6::parse3, $context_new=Null, $type_=X6, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X6::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X7::__parse_stage1(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
try {
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
__trim = False;
|
|
|
|
hilti::debugIndent("spicy");
|
|
local iterator<stream> __begin = begin(__cur);
|
|
|
|
if ( ::__feat%foo@@X7%uses_stream )
|
|
(*self).__stream = __data;
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_init();
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
local strong_ref<stream> filtered = Null;
|
|
|
|
if ( ::__feat%foo@@X7%supports_filters ) {
|
|
local uint<64> __offset1 = begin((*__data)).offset();
|
|
|
|
if ( filtered = spicy_rt::filter_init(self, __data, __cur) ) {
|
|
local value_ref<stream> __filtered_data = filtered;
|
|
self.__parse_foo__X7_stage2(__filtered_data, begin((*__filtered_data)), (*__filtered_data), __trim, __lah, __lahe, __error);
|
|
local uint<64> __offset2 = begin((*__data)).offset();
|
|
__cur = __cur.advance(__offset2 - __offset1);
|
|
|
|
if ( __trim )
|
|
(*__data).trim(begin(__cur));
|
|
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
if ( ! filtered )
|
|
__result = (*self).__parse_foo__X7_stage2(__data, __begin, __cur, __trim, __lah, __lahe, __error);
|
|
|
|
}
|
|
catch ( hilti::SystemException __except ) {
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__on_0x25_error(hilti::exception_what(__except));
|
|
|
|
if ( ::__feat%foo@@X7%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X7%supports_sinks )
|
|
(*(*self).data).close();
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
throw;
|
|
}
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_finally();
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
return __result;
|
|
}
|
|
|
|
method method tuple<const view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> foo::X7::__parse_foo__X7_stage2(inout value_ref<stream> __data, iterator<stream> __begin, copy view<stream> __cur, copy bool __trim, copy int<64> __lah, copy iterator<stream> __lahe, copy optional<hilti::RecoverableFailure> __error) {
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
local tuple<view<stream>, int<64>, const iterator<stream>, optional<hilti::RecoverableFailure>> __result = <void expression>;
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*self).__begin = __begin;
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*self).__offset = cast<uint<64>>(begin(__cur).offset() - __begin.offset());
|
|
|
|
(*self).__error = __error;
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
(*self).__position_update = Null;
|
|
|
|
(*self).__on_0x25_done();
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access || ::__feat%foo@@X7%uses_offset )
|
|
|
|
if ( (*self).__position_update ) {
|
|
__cur = __cur.advance((*(*self).__position_update));
|
|
(*self).__position_update = Null;
|
|
}
|
|
|
|
|
|
__error = (*self).__error;
|
|
|
|
if ( ::__feat%foo@@X7%supports_filters )
|
|
spicy_rt::filter_disconnect(self);
|
|
|
|
|
|
if ( ::__feat%foo@@X7%supports_sinks )
|
|
(*(*self).data).close();
|
|
|
|
hilti::debugDedent("spicy");
|
|
__result = (__cur, __lah, __lahe, __error);
|
|
return __result;
|
|
}
|
|
|
|
method extern method view<stream> foo::X7::parse1(inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
local value_ref<X7> __unit = value_ref(default<const X7>());
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
|
|
# Begin parsing production: Unit: foo__X7 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X7 ->
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X7::parse3(inout value_ref<spicy_rt::ParsedUnit> __gunit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
local value_ref<X7> __unit = value_ref(default<const X7>());
|
|
spicy_rt::initializeParsedUnit((*__gunit), __unit);
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
|
|
# Begin parsing production: Unit: foo__X7 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X7 ->
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
method extern method view<stream> foo::X7::parse2(inout value_ref<X7> __unit, inout value_ref<stream> __data, optional<view<stream>> __cur = Null, optional<spicy_rt::UnitContext> __context) &needed-by-feature="is_filter" &needed-by-feature="supports_sinks" &static {
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
local view<stream> __ncur = __cur ? (*__cur) : cast<view<stream>>((*__data));
|
|
local int<64> __lahead = 0;
|
|
local iterator<stream> __lahead_end;
|
|
local optional<hilti::RecoverableFailure> __error = Null;
|
|
# "<...>/feature_requirements.spicy:49:11-51:1"
|
|
|
|
# Begin parsing production: Unit: foo__X7 ->
|
|
(__ncur, __lahead, __lahead_end, __error) = (*__unit).__parse_stage1(__data, begin(__ncur), __ncur, True, __lahead, __lahead_end, __error);
|
|
# End parsing production: Unit: foo__X7 ->
|
|
|
|
if ( ::__feat%foo@@X7%uses_random_access )
|
|
(*__unit).__begin = begin(__ncur);
|
|
|
|
|
|
if ( ::__feat%foo@@X7%uses_offset )
|
|
(*__unit).__offset = cast<uint<64>>(begin(__ncur).offset() - begin(__ncur).offset());
|
|
|
|
|
|
if ( __error )
|
|
throw exception("successful synchronization never confirmed: %s" % (hilti::exception_what((*__error))));
|
|
|
|
return __ncur;
|
|
}
|
|
|
|
init function void __register_foo_X7() {
|
|
|
|
if ( ::__feat%foo@@X7%is_filter || ::__feat%foo@@X7%supports_sinks ) {
|
|
foo::X7::__parser = [$name="foo::X7", $is_public=False, $parse1=foo::X7::parse1, $parse2=foo::X7::parse2, $parse3=foo::X7::parse3, $context_new=Null, $type_=X7, $description="", $mime_types=vector(), $ports=vector()];
|
|
spicy_rt::registerParser(foo::X7::__parser, $scope, Null);
|
|
}
|
|
|
|
}
|
|
|
|
}
|