text
stringlengths
8
4.13M
extern crate ralloc; mod util; #[test] #[ignore] fn big_alloc() { util::multiply(|| { let mut vec = Vec::new(); let mut rand = 3u64; for _ in 0..0xBFFF { rand ^= 0xABFABFABFABF; rand = rand.rotate_left(3); util::acid(|| vec.push(rand)); } }); } #[test] #[ignore] fn many_small_allocs() { util::multiply(|| { let mut vec = Vec::new(); let mut rand = 3u64; for _ in 0..3000 { rand ^= 0xABFABFABFABF; rand = rand.rotate_left(3); util::acid(|| vec.push(Box::new(rand))); } }); }
//! Module for battery backed SRAM save media support. //! //! SRAM acts as ordinary memory mapped into the memory space, and as such //! is accessed using normal memory read/write commands. use super::{read_raw_buf, write_raw_buf, Error, MediaType, RawSaveAccess}; use crate::save::{verify_raw_buf, MediaInfo}; const SRAM_SIZE: usize = 32 * 1024; // 32 KiB /// Checks whether an offset is contained within the bounds of the SRAM. fn check_bounds(offset: usize, len: usize) -> Result<(), Error> { if offset.checked_add(len).is_none() || offset + len > SRAM_SIZE { return Err(Error::OutOfBounds); } Ok(()) } /// The [`RawSaveAccess`] used for battery backed SRAM. pub struct BatteryBackedAccess; impl RawSaveAccess for BatteryBackedAccess { fn info(&self) -> Result<&'static MediaInfo, Error> { Ok(&MediaInfo { media_type: MediaType::Sram32K, sector_shift: 0, sector_count: SRAM_SIZE, requires_prepare_write: false, }) } fn read(&self, offset: usize, buffer: &mut [u8]) -> Result<(), Error> { check_bounds(offset, buffer.len())?; unsafe { read_raw_buf(buffer, 0x0E000000 + offset); } Ok(()) } fn verify(&self, offset: usize, buffer: &[u8]) -> Result<bool, Error> { check_bounds(offset, buffer.len())?; let val = unsafe { verify_raw_buf(buffer, 0x0E000000 + offset) }; Ok(val) } fn prepare_write(&self, _: usize, _: usize) -> Result<(), Error> { Ok(()) } fn write(&self, offset: usize, buffer: &[u8]) -> Result<(), Error> { check_bounds(offset, buffer.len())?; unsafe { write_raw_buf(0x0E000000 + offset, buffer); } Ok(()) } }
use super::*; use graph::{NodeT}; use std::collections::HashSet; #[pymethods] impl EnsmallenGraph { #[text_signature = "($self)"] /// Returns list of sets of nodes of connected components. /// /// Raises /// ------------------------ /// TODO: update the set of exceptions /// /// Returns /// ------------------------ /// List of sets of connected components. /// fn strongly_connected_components(&self) -> Vec<HashSet<NodeT>> { self.graph.strongly_connected_components() } }
// #[derive(Debug)] struct Person<'a> { name: &'a str, age: u8, } fn main() { println!( // The "#" is for pretty printing "{:#?}", Person { name: "Zero", age: 15 } ); }
#[doc = "Register `IER` reader"] pub type R = crate::R<IER_SPEC>; #[doc = "Register `IER` writer"] pub type W = crate::W<IER_SPEC>; #[doc = "Field `ADRDYIE` reader - ADC ready interrupt enable"] pub type ADRDYIE_R = crate::BitReader<ADRDYIE_A>; #[doc = "ADC ready interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ADRDYIE_A { #[doc = "0: ADC ready interrupt disabled"] Disabled = 0, #[doc = "1: ADC ready interrupt enabled"] Enabled = 1, } impl From<ADRDYIE_A> for bool { #[inline(always)] fn from(variant: ADRDYIE_A) -> Self { variant as u8 != 0 } } impl ADRDYIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ADRDYIE_A { match self.bits { false => ADRDYIE_A::Disabled, true => ADRDYIE_A::Enabled, } } #[doc = "ADC ready interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == ADRDYIE_A::Disabled } #[doc = "ADC ready interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == ADRDYIE_A::Enabled } } #[doc = "Field `ADRDYIE` writer - ADC ready interrupt enable"] pub type ADRDYIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, ADRDYIE_A>; impl<'a, REG, const O: u8> ADRDYIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "ADC ready interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(ADRDYIE_A::Disabled) } #[doc = "ADC ready interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(ADRDYIE_A::Enabled) } } #[doc = "Field `EOSMPIE` reader - End of sampling flag interrupt enable for regular conversions"] pub type EOSMPIE_R = crate::BitReader<EOSMPIE_A>; #[doc = "End of sampling flag interrupt enable for regular conversions\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum EOSMPIE_A { #[doc = "0: End of regular conversion sampling phase interrupt disabled"] Disabled = 0, #[doc = "1: End of regular conversion sampling phase interrupt enabled"] Enabled = 1, } impl From<EOSMPIE_A> for bool { #[inline(always)] fn from(variant: EOSMPIE_A) -> Self { variant as u8 != 0 } } impl EOSMPIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> EOSMPIE_A { match self.bits { false => EOSMPIE_A::Disabled, true => EOSMPIE_A::Enabled, } } #[doc = "End of regular conversion sampling phase interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == EOSMPIE_A::Disabled } #[doc = "End of regular conversion sampling phase interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == EOSMPIE_A::Enabled } } #[doc = "Field `EOSMPIE` writer - End of sampling flag interrupt enable for regular conversions"] pub type EOSMPIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, EOSMPIE_A>; impl<'a, REG, const O: u8> EOSMPIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "End of regular conversion sampling phase interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(EOSMPIE_A::Disabled) } #[doc = "End of regular conversion sampling phase interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(EOSMPIE_A::Enabled) } } #[doc = "Field `EOCIE` reader - End of regular conversion interrupt enable"] pub type EOCIE_R = crate::BitReader<EOCIE_A>; #[doc = "End of regular conversion interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum EOCIE_A { #[doc = "0: End of regular conversion interrupt disabled"] Disabled = 0, #[doc = "1: End of regular conversion interrupt enabled"] Enabled = 1, } impl From<EOCIE_A> for bool { #[inline(always)] fn from(variant: EOCIE_A) -> Self { variant as u8 != 0 } } impl EOCIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> EOCIE_A { match self.bits { false => EOCIE_A::Disabled, true => EOCIE_A::Enabled, } } #[doc = "End of regular conversion interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == EOCIE_A::Disabled } #[doc = "End of regular conversion interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == EOCIE_A::Enabled } } #[doc = "Field `EOCIE` writer - End of regular conversion interrupt enable"] pub type EOCIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, EOCIE_A>; impl<'a, REG, const O: u8> EOCIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "End of regular conversion interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(EOCIE_A::Disabled) } #[doc = "End of regular conversion interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(EOCIE_A::Enabled) } } #[doc = "Field `EOSIE` reader - End of regular sequence of conversions interrupt enable"] pub type EOSIE_R = crate::BitReader<EOSIE_A>; #[doc = "End of regular sequence of conversions interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum EOSIE_A { #[doc = "0: End of regular sequence interrupt disabled"] Disabled = 0, #[doc = "1: End of regular sequence interrupt enabled"] Enabled = 1, } impl From<EOSIE_A> for bool { #[inline(always)] fn from(variant: EOSIE_A) -> Self { variant as u8 != 0 } } impl EOSIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> EOSIE_A { match self.bits { false => EOSIE_A::Disabled, true => EOSIE_A::Enabled, } } #[doc = "End of regular sequence interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == EOSIE_A::Disabled } #[doc = "End of regular sequence interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == EOSIE_A::Enabled } } #[doc = "Field `EOSIE` writer - End of regular sequence of conversions interrupt enable"] pub type EOSIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, EOSIE_A>; impl<'a, REG, const O: u8> EOSIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "End of regular sequence interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(EOSIE_A::Disabled) } #[doc = "End of regular sequence interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(EOSIE_A::Enabled) } } #[doc = "Field `OVRIE` reader - Overrun interrupt enable"] pub type OVRIE_R = crate::BitReader<OVRIE_A>; #[doc = "Overrun interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum OVRIE_A { #[doc = "0: Overrun interrupt disabled"] Disabled = 0, #[doc = "1: Overrun interrupt enabled"] Enabled = 1, } impl From<OVRIE_A> for bool { #[inline(always)] fn from(variant: OVRIE_A) -> Self { variant as u8 != 0 } } impl OVRIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> OVRIE_A { match self.bits { false => OVRIE_A::Disabled, true => OVRIE_A::Enabled, } } #[doc = "Overrun interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == OVRIE_A::Disabled } #[doc = "Overrun interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == OVRIE_A::Enabled } } #[doc = "Field `OVRIE` writer - Overrun interrupt enable"] pub type OVRIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, OVRIE_A>; impl<'a, REG, const O: u8> OVRIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "Overrun interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(OVRIE_A::Disabled) } #[doc = "Overrun interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(OVRIE_A::Enabled) } } #[doc = "Field `JEOCIE` reader - End of injected conversion interrupt enable"] pub type JEOCIE_R = crate::BitReader<JEOCIE_A>; #[doc = "End of injected conversion interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum JEOCIE_A { #[doc = "0: End of injected conversion interrupt disabled"] Disabled = 0, #[doc = "1: End of injected conversion interrupt enabled"] Enabled = 1, } impl From<JEOCIE_A> for bool { #[inline(always)] fn from(variant: JEOCIE_A) -> Self { variant as u8 != 0 } } impl JEOCIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> JEOCIE_A { match self.bits { false => JEOCIE_A::Disabled, true => JEOCIE_A::Enabled, } } #[doc = "End of injected conversion interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == JEOCIE_A::Disabled } #[doc = "End of injected conversion interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == JEOCIE_A::Enabled } } #[doc = "Field `JEOCIE` writer - End of injected conversion interrupt enable"] pub type JEOCIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, JEOCIE_A>; impl<'a, REG, const O: u8> JEOCIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "End of injected conversion interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(JEOCIE_A::Disabled) } #[doc = "End of injected conversion interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(JEOCIE_A::Enabled) } } #[doc = "Field `JEOSIE` reader - End of injected sequence of conversions interrupt enable"] pub type JEOSIE_R = crate::BitReader<JEOSIE_A>; #[doc = "End of injected sequence of conversions interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum JEOSIE_A { #[doc = "0: End of injected sequence interrupt disabled"] Disabled = 0, #[doc = "1: End of injected sequence interrupt enabled"] Enabled = 1, } impl From<JEOSIE_A> for bool { #[inline(always)] fn from(variant: JEOSIE_A) -> Self { variant as u8 != 0 } } impl JEOSIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> JEOSIE_A { match self.bits { false => JEOSIE_A::Disabled, true => JEOSIE_A::Enabled, } } #[doc = "End of injected sequence interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == JEOSIE_A::Disabled } #[doc = "End of injected sequence interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == JEOSIE_A::Enabled } } #[doc = "Field `JEOSIE` writer - End of injected sequence of conversions interrupt enable"] pub type JEOSIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, JEOSIE_A>; impl<'a, REG, const O: u8> JEOSIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "End of injected sequence interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(JEOSIE_A::Disabled) } #[doc = "End of injected sequence interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(JEOSIE_A::Enabled) } } #[doc = "Field `AWD1IE` reader - Analog watchdog 1 interrupt enable"] pub type AWD1IE_R = crate::BitReader<AWD1IE_A>; #[doc = "Analog watchdog 1 interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum AWD1IE_A { #[doc = "0: Analog watchdog interrupt disabled"] Disabled = 0, #[doc = "1: Analog watchdog interrupt enabled"] Enabled = 1, } impl From<AWD1IE_A> for bool { #[inline(always)] fn from(variant: AWD1IE_A) -> Self { variant as u8 != 0 } } impl AWD1IE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> AWD1IE_A { match self.bits { false => AWD1IE_A::Disabled, true => AWD1IE_A::Enabled, } } #[doc = "Analog watchdog interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == AWD1IE_A::Disabled } #[doc = "Analog watchdog interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == AWD1IE_A::Enabled } } #[doc = "Field `AWD1IE` writer - Analog watchdog 1 interrupt enable"] pub type AWD1IE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, AWD1IE_A>; impl<'a, REG, const O: u8> AWD1IE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "Analog watchdog interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(AWD1IE_A::Disabled) } #[doc = "Analog watchdog interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(AWD1IE_A::Enabled) } } #[doc = "Field `AWD2IE` reader - Analog watchdog 2 interrupt enable"] pub use AWD1IE_R as AWD2IE_R; #[doc = "Field `AWD3IE` reader - Analog watchdog 3 interrupt enable"] pub use AWD1IE_R as AWD3IE_R; #[doc = "Field `AWD2IE` writer - Analog watchdog 2 interrupt enable"] pub use AWD1IE_W as AWD2IE_W; #[doc = "Field `AWD3IE` writer - Analog watchdog 3 interrupt enable"] pub use AWD1IE_W as AWD3IE_W; #[doc = "Field `JQOVFIE` reader - Injected context queue overflow interrupt enable"] pub type JQOVFIE_R = crate::BitReader<JQOVFIE_A>; #[doc = "Injected context queue overflow interrupt enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum JQOVFIE_A { #[doc = "0: Injected context queue overflow interrupt disabled"] Disabled = 0, #[doc = "1: Injected context queue overflow interrupt enabled"] Enabled = 1, } impl From<JQOVFIE_A> for bool { #[inline(always)] fn from(variant: JQOVFIE_A) -> Self { variant as u8 != 0 } } impl JQOVFIE_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> JQOVFIE_A { match self.bits { false => JQOVFIE_A::Disabled, true => JQOVFIE_A::Enabled, } } #[doc = "Injected context queue overflow interrupt disabled"] #[inline(always)] pub fn is_disabled(&self) -> bool { *self == JQOVFIE_A::Disabled } #[doc = "Injected context queue overflow interrupt enabled"] #[inline(always)] pub fn is_enabled(&self) -> bool { *self == JQOVFIE_A::Enabled } } #[doc = "Field `JQOVFIE` writer - Injected context queue overflow interrupt enable"] pub type JQOVFIE_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O, JQOVFIE_A>; impl<'a, REG, const O: u8> JQOVFIE_W<'a, REG, O> where REG: crate::Writable + crate::RegisterSpec, { #[doc = "Injected context queue overflow interrupt disabled"] #[inline(always)] pub fn disabled(self) -> &'a mut crate::W<REG> { self.variant(JQOVFIE_A::Disabled) } #[doc = "Injected context queue overflow interrupt enabled"] #[inline(always)] pub fn enabled(self) -> &'a mut crate::W<REG> { self.variant(JQOVFIE_A::Enabled) } } impl R { #[doc = "Bit 0 - ADC ready interrupt enable"] #[inline(always)] pub fn adrdyie(&self) -> ADRDYIE_R { ADRDYIE_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - End of sampling flag interrupt enable for regular conversions"] #[inline(always)] pub fn eosmpie(&self) -> EOSMPIE_R { EOSMPIE_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2 - End of regular conversion interrupt enable"] #[inline(always)] pub fn eocie(&self) -> EOCIE_R { EOCIE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3 - End of regular sequence of conversions interrupt enable"] #[inline(always)] pub fn eosie(&self) -> EOSIE_R { EOSIE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4 - Overrun interrupt enable"] #[inline(always)] pub fn ovrie(&self) -> OVRIE_R { OVRIE_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - End of injected conversion interrupt enable"] #[inline(always)] pub fn jeocie(&self) -> JEOCIE_R { JEOCIE_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - End of injected sequence of conversions interrupt enable"] #[inline(always)] pub fn jeosie(&self) -> JEOSIE_R { JEOSIE_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 7 - Analog watchdog 1 interrupt enable"] #[inline(always)] pub fn awd1ie(&self) -> AWD1IE_R { AWD1IE_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bit 8 - Analog watchdog 2 interrupt enable"] #[inline(always)] pub fn awd2ie(&self) -> AWD2IE_R { AWD2IE_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9 - Analog watchdog 3 interrupt enable"] #[inline(always)] pub fn awd3ie(&self) -> AWD3IE_R { AWD3IE_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10 - Injected context queue overflow interrupt enable"] #[inline(always)] pub fn jqovfie(&self) -> JQOVFIE_R { JQOVFIE_R::new(((self.bits >> 10) & 1) != 0) } } impl W { #[doc = "Bit 0 - ADC ready interrupt enable"] #[inline(always)] #[must_use] pub fn adrdyie(&mut self) -> ADRDYIE_W<IER_SPEC, 0> { ADRDYIE_W::new(self) } #[doc = "Bit 1 - End of sampling flag interrupt enable for regular conversions"] #[inline(always)] #[must_use] pub fn eosmpie(&mut self) -> EOSMPIE_W<IER_SPEC, 1> { EOSMPIE_W::new(self) } #[doc = "Bit 2 - End of regular conversion interrupt enable"] #[inline(always)] #[must_use] pub fn eocie(&mut self) -> EOCIE_W<IER_SPEC, 2> { EOCIE_W::new(self) } #[doc = "Bit 3 - End of regular sequence of conversions interrupt enable"] #[inline(always)] #[must_use] pub fn eosie(&mut self) -> EOSIE_W<IER_SPEC, 3> { EOSIE_W::new(self) } #[doc = "Bit 4 - Overrun interrupt enable"] #[inline(always)] #[must_use] pub fn ovrie(&mut self) -> OVRIE_W<IER_SPEC, 4> { OVRIE_W::new(self) } #[doc = "Bit 5 - End of injected conversion interrupt enable"] #[inline(always)] #[must_use] pub fn jeocie(&mut self) -> JEOCIE_W<IER_SPEC, 5> { JEOCIE_W::new(self) } #[doc = "Bit 6 - End of injected sequence of conversions interrupt enable"] #[inline(always)] #[must_use] pub fn jeosie(&mut self) -> JEOSIE_W<IER_SPEC, 6> { JEOSIE_W::new(self) } #[doc = "Bit 7 - Analog watchdog 1 interrupt enable"] #[inline(always)] #[must_use] pub fn awd1ie(&mut self) -> AWD1IE_W<IER_SPEC, 7> { AWD1IE_W::new(self) } #[doc = "Bit 8 - Analog watchdog 2 interrupt enable"] #[inline(always)] #[must_use] pub fn awd2ie(&mut self) -> AWD2IE_W<IER_SPEC, 8> { AWD2IE_W::new(self) } #[doc = "Bit 9 - Analog watchdog 3 interrupt enable"] #[inline(always)] #[must_use] pub fn awd3ie(&mut self) -> AWD3IE_W<IER_SPEC, 9> { AWD3IE_W::new(self) } #[doc = "Bit 10 - Injected context queue overflow interrupt enable"] #[inline(always)] #[must_use] pub fn jqovfie(&mut self) -> JQOVFIE_W<IER_SPEC, 10> { JQOVFIE_W::new(self) } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } } #[doc = "ADC interrupt enable register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ier::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ier::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct IER_SPEC; impl crate::RegisterSpec for IER_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`ier::R`](R) reader structure"] impl crate::Readable for IER_SPEC {} #[doc = "`write(|w| ..)` method takes [`ier::W`](W) writer structure"] impl crate::Writable for IER_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets IER to value 0"] impl crate::Resettable for IER_SPEC { const RESET_VALUE: Self::Ux = 0; }
use crate::model::Bot; use crate::model::Move; use crate::model::GameStateView; use std::cell::RefCell; use std::rc::Rc; use rand::prelude::Rng; // TODO move it to ../tests/test_bot.rs #[derive(Clone, Eq, PartialEq, Debug)] pub struct TestBot<R: Rng> { path: Vec<u8>, iter: u32, idx: Option<usize>, random: Option<Rc<RefCell<R>>>, } impl<R: Rng> TestBot<R> { pub fn new(s: &str) -> TestBot<R> { let path = s.as_bytes().to_vec(); TestBot { path, iter: 0, idx: None, random: None } } pub fn with_index_random(s: &str, idx: usize, rng: Rc<RefCell<R>>) -> TestBot<R> { let path = s.as_bytes().to_vec(); TestBot { path, iter: 0, idx: Some(idx), random: Some(rng) } } } impl<R: Rng> Bot for TestBot<R> { fn reset(&mut self, _gs: &GameStateView, idx: usize, _seed: u64) { self.iter = 0; self.idx = Some(idx); // reset the inner state // println!("reset state index={} seed={}", idx, seed) } fn do_move(&mut self, _gs: &GameStateView) -> Move { if self.iter >= self.path.len() as u32 { let moves = vec![Move::Right, Move::Up, Move::Left, Move::Down]; match self.random { None => Move::Stop, Some(ref mut r) => moves[r.borrow_mut().gen_range(0, moves.len())], } } else { let ch = self.path[self.iter as usize] as char; let m = match ch { 'u' | 'U' => Move::Up, 'd' | 'D' => Move::Down, 'l' | 'L' => Move::Left, 'r' | 'R' => Move::Right, 's' | 'S' => Move::Stop, _ => panic!(format!("Invalid symbol: {}", ch)) }; self.iter += 1; m } } }
#[doc = r" Value read from the register"] pub struct R { bits: u32, } #[doc = r" Value to write to the register"] pub struct W { bits: u32, } impl super::PADREGC { #[doc = r" Modifies the contents of the register"] #[inline] pub fn modify<F>(&self, f: F) where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, { let bits = self.register.get(); let r = R { bits: bits }; let mut w = W { bits: bits }; f(&r, &mut w); self.register.set(w.bits); } #[doc = r" Reads the contents of the register"] #[inline] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r" Writes to the register"] #[inline] pub fn write<F>(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { let mut w = W::reset_value(); f(&mut w); self.register.set(w.bits); } #[doc = r" Writes the reset value to the register"] #[inline] pub fn reset(&self) { self.write(|w| w) } } #[doc = "Possible values of the field `PAD11FNCSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD11FNCSELR { #[doc = "Configure as the analog input for ADC single ended input 2 value."] ADCSE2, #[doc = "IOM/MSPI nCE group 11 value."] NCE11, #[doc = "CTIMER connection 31 value."] CT31, #[doc = "Configure as GPIO11 value."] GPIO11, #[doc = "Configure as the IOSLAVE interrupt out signal value."] SLINT, #[doc = "Configure as the UART1 CTS input signal value."] UA1CTS, #[doc = "Configure as the UART0 RX input signal value."] UART0RX, #[doc = "Configure as the PDM Data input signal value."] PDM_DATA, } impl PAD11FNCSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD11FNCSELR::ADCSE2 => 0, PAD11FNCSELR::NCE11 => 1, PAD11FNCSELR::CT31 => 2, PAD11FNCSELR::GPIO11 => 3, PAD11FNCSELR::SLINT => 4, PAD11FNCSELR::UA1CTS => 5, PAD11FNCSELR::UART0RX => 6, PAD11FNCSELR::PDM_DATA => 7, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD11FNCSELR { match value { 0 => PAD11FNCSELR::ADCSE2, 1 => PAD11FNCSELR::NCE11, 2 => PAD11FNCSELR::CT31, 3 => PAD11FNCSELR::GPIO11, 4 => PAD11FNCSELR::SLINT, 5 => PAD11FNCSELR::UA1CTS, 6 => PAD11FNCSELR::UART0RX, 7 => PAD11FNCSELR::PDM_DATA, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `ADCSE2`"] #[inline] pub fn is_adcse2(&self) -> bool { *self == PAD11FNCSELR::ADCSE2 } #[doc = "Checks if the value of the field is `NCE11`"] #[inline] pub fn is_nce11(&self) -> bool { *self == PAD11FNCSELR::NCE11 } #[doc = "Checks if the value of the field is `CT31`"] #[inline] pub fn is_ct31(&self) -> bool { *self == PAD11FNCSELR::CT31 } #[doc = "Checks if the value of the field is `GPIO11`"] #[inline] pub fn is_gpio11(&self) -> bool { *self == PAD11FNCSELR::GPIO11 } #[doc = "Checks if the value of the field is `SLINT`"] #[inline] pub fn is_slint(&self) -> bool { *self == PAD11FNCSELR::SLINT } #[doc = "Checks if the value of the field is `UA1CTS`"] #[inline] pub fn is_ua1cts(&self) -> bool { *self == PAD11FNCSELR::UA1CTS } #[doc = "Checks if the value of the field is `UART0RX`"] #[inline] pub fn is_uart0rx(&self) -> bool { *self == PAD11FNCSELR::UART0RX } #[doc = "Checks if the value of the field is `PDM_DATA`"] #[inline] pub fn is_pdm_data(&self) -> bool { *self == PAD11FNCSELR::PDM_DATA } } #[doc = "Possible values of the field `PAD11STRNG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD11STRNGR { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD11STRNGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD11STRNGR::LOW => false, PAD11STRNGR::HIGH => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD11STRNGR { match value { false => PAD11STRNGR::LOW, true => PAD11STRNGR::HIGH, } } #[doc = "Checks if the value of the field is `LOW`"] #[inline] pub fn is_low(&self) -> bool { *self == PAD11STRNGR::LOW } #[doc = "Checks if the value of the field is `HIGH`"] #[inline] pub fn is_high(&self) -> bool { *self == PAD11STRNGR::HIGH } } #[doc = "Possible values of the field `PAD11INPEN`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD11INPENR { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD11INPENR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD11INPENR::DIS => false, PAD11INPENR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD11INPENR { match value { false => PAD11INPENR::DIS, true => PAD11INPENR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD11INPENR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD11INPENR::EN } } #[doc = "Possible values of the field `PAD11PULL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD11PULLR { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD11PULLR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD11PULLR::DIS => false, PAD11PULLR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD11PULLR { match value { false => PAD11PULLR::DIS, true => PAD11PULLR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD11PULLR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD11PULLR::EN } } #[doc = "Possible values of the field `PAD10FNCSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD10FNCSELR { #[doc = "Configure as the IOMSTR1 SPI MOSI signal value."] M1MOSI, #[doc = "IOM/MSPI nCE group 10 value."] NCE10, #[doc = "Configure as GPIO10 value."] GPIO10, #[doc = "PDM serial clock out value."] PDMCLK, #[doc = "Configure as the UART1 RTS output signal value."] UA1RTS, #[doc = r" Reserved"] _Reserved(u8), } impl PAD10FNCSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD10FNCSELR::M1MOSI => 1, PAD10FNCSELR::NCE10 => 2, PAD10FNCSELR::GPIO10 => 3, PAD10FNCSELR::PDMCLK => 4, PAD10FNCSELR::UA1RTS => 5, PAD10FNCSELR::_Reserved(bits) => bits, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD10FNCSELR { match value { 1 => PAD10FNCSELR::M1MOSI, 2 => PAD10FNCSELR::NCE10, 3 => PAD10FNCSELR::GPIO10, 4 => PAD10FNCSELR::PDMCLK, 5 => PAD10FNCSELR::UA1RTS, i => PAD10FNCSELR::_Reserved(i), } } #[doc = "Checks if the value of the field is `M1MOSI`"] #[inline] pub fn is_m1mosi(&self) -> bool { *self == PAD10FNCSELR::M1MOSI } #[doc = "Checks if the value of the field is `NCE10`"] #[inline] pub fn is_nce10(&self) -> bool { *self == PAD10FNCSELR::NCE10 } #[doc = "Checks if the value of the field is `GPIO10`"] #[inline] pub fn is_gpio10(&self) -> bool { *self == PAD10FNCSELR::GPIO10 } #[doc = "Checks if the value of the field is `PDMCLK`"] #[inline] pub fn is_pdmclk(&self) -> bool { *self == PAD10FNCSELR::PDMCLK } #[doc = "Checks if the value of the field is `UA1RTS`"] #[inline] pub fn is_ua1rts(&self) -> bool { *self == PAD10FNCSELR::UA1RTS } } #[doc = "Possible values of the field `PAD10STRNG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD10STRNGR { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD10STRNGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD10STRNGR::LOW => false, PAD10STRNGR::HIGH => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD10STRNGR { match value { false => PAD10STRNGR::LOW, true => PAD10STRNGR::HIGH, } } #[doc = "Checks if the value of the field is `LOW`"] #[inline] pub fn is_low(&self) -> bool { *self == PAD10STRNGR::LOW } #[doc = "Checks if the value of the field is `HIGH`"] #[inline] pub fn is_high(&self) -> bool { *self == PAD10STRNGR::HIGH } } #[doc = "Possible values of the field `PAD10INPEN`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD10INPENR { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD10INPENR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD10INPENR::DIS => false, PAD10INPENR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD10INPENR { match value { false => PAD10INPENR::DIS, true => PAD10INPENR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD10INPENR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD10INPENR::EN } } #[doc = "Possible values of the field `PAD10PULL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD10PULLR { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD10PULLR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD10PULLR::DIS => false, PAD10PULLR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD10PULLR { match value { false => PAD10PULLR::DIS, true => PAD10PULLR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD10PULLR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD10PULLR::EN } } #[doc = "Possible values of the field `PAD9RSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD9RSELR { #[doc = "Pullup is ~1.5 KOhms value."] PULL1_5K, #[doc = "Pullup is ~6 KOhms value."] PULL6K, #[doc = "Pullup is ~12 KOhms value."] PULL12K, #[doc = "Pullup is ~24 KOhms value."] PULL24K, } impl PAD9RSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD9RSELR::PULL1_5K => 0, PAD9RSELR::PULL6K => 1, PAD9RSELR::PULL12K => 2, PAD9RSELR::PULL24K => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD9RSELR { match value { 0 => PAD9RSELR::PULL1_5K, 1 => PAD9RSELR::PULL6K, 2 => PAD9RSELR::PULL12K, 3 => PAD9RSELR::PULL24K, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `PULL1_5K`"] #[inline] pub fn is_pull1_5k(&self) -> bool { *self == PAD9RSELR::PULL1_5K } #[doc = "Checks if the value of the field is `PULL6K`"] #[inline] pub fn is_pull6k(&self) -> bool { *self == PAD9RSELR::PULL6K } #[doc = "Checks if the value of the field is `PULL12K`"] #[inline] pub fn is_pull12k(&self) -> bool { *self == PAD9RSELR::PULL12K } #[doc = "Checks if the value of the field is `PULL24K`"] #[inline] pub fn is_pull24k(&self) -> bool { *self == PAD9RSELR::PULL24K } } #[doc = "Possible values of the field `PAD9FNCSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD9FNCSELR { #[doc = "Configure as the IOMSTR1 I2C SDA or SPI WIR3 signal value."] M1SDAWIR3, #[doc = "Configure as the IOMSTR1 SPI MISO signal value."] M1MISO, #[doc = "IOM/MSPI nCE group 9 value."] NCE9, #[doc = "Configure as GPIO9 value."] GPIO9, #[doc = "SCARD data I/O connection value."] SCCIO, #[doc = "Configure as UART1 RX input signal value."] UART1RX, #[doc = r" Reserved"] _Reserved(u8), } impl PAD9FNCSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD9FNCSELR::M1SDAWIR3 => 0, PAD9FNCSELR::M1MISO => 1, PAD9FNCSELR::NCE9 => 2, PAD9FNCSELR::GPIO9 => 3, PAD9FNCSELR::SCCIO => 4, PAD9FNCSELR::UART1RX => 6, PAD9FNCSELR::_Reserved(bits) => bits, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD9FNCSELR { match value { 0 => PAD9FNCSELR::M1SDAWIR3, 1 => PAD9FNCSELR::M1MISO, 2 => PAD9FNCSELR::NCE9, 3 => PAD9FNCSELR::GPIO9, 4 => PAD9FNCSELR::SCCIO, 6 => PAD9FNCSELR::UART1RX, i => PAD9FNCSELR::_Reserved(i), } } #[doc = "Checks if the value of the field is `M1SDAWIR3`"] #[inline] pub fn is_m1sdawir3(&self) -> bool { *self == PAD9FNCSELR::M1SDAWIR3 } #[doc = "Checks if the value of the field is `M1MISO`"] #[inline] pub fn is_m1miso(&self) -> bool { *self == PAD9FNCSELR::M1MISO } #[doc = "Checks if the value of the field is `NCE9`"] #[inline] pub fn is_nce9(&self) -> bool { *self == PAD9FNCSELR::NCE9 } #[doc = "Checks if the value of the field is `GPIO9`"] #[inline] pub fn is_gpio9(&self) -> bool { *self == PAD9FNCSELR::GPIO9 } #[doc = "Checks if the value of the field is `SCCIO`"] #[inline] pub fn is_sccio(&self) -> bool { *self == PAD9FNCSELR::SCCIO } #[doc = "Checks if the value of the field is `UART1RX`"] #[inline] pub fn is_uart1rx(&self) -> bool { *self == PAD9FNCSELR::UART1RX } } #[doc = "Possible values of the field `PAD9STRNG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD9STRNGR { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD9STRNGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD9STRNGR::LOW => false, PAD9STRNGR::HIGH => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD9STRNGR { match value { false => PAD9STRNGR::LOW, true => PAD9STRNGR::HIGH, } } #[doc = "Checks if the value of the field is `LOW`"] #[inline] pub fn is_low(&self) -> bool { *self == PAD9STRNGR::LOW } #[doc = "Checks if the value of the field is `HIGH`"] #[inline] pub fn is_high(&self) -> bool { *self == PAD9STRNGR::HIGH } } #[doc = "Possible values of the field `PAD9INPEN`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD9INPENR { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD9INPENR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD9INPENR::DIS => false, PAD9INPENR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD9INPENR { match value { false => PAD9INPENR::DIS, true => PAD9INPENR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD9INPENR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD9INPENR::EN } } #[doc = "Possible values of the field `PAD9PULL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD9PULLR { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD9PULLR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD9PULLR::DIS => false, PAD9PULLR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD9PULLR { match value { false => PAD9PULLR::DIS, true => PAD9PULLR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD9PULLR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD9PULLR::EN } } #[doc = "Possible values of the field `PAD8RSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD8RSELR { #[doc = "Pullup is ~1.5 KOhms value."] PULL1_5K, #[doc = "Pullup is ~6 KOhms value."] PULL6K, #[doc = "Pullup is ~12 KOhms value."] PULL12K, #[doc = "Pullup is ~24 KOhms value."] PULL24K, } impl PAD8RSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD8RSELR::PULL1_5K => 0, PAD8RSELR::PULL6K => 1, PAD8RSELR::PULL12K => 2, PAD8RSELR::PULL24K => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD8RSELR { match value { 0 => PAD8RSELR::PULL1_5K, 1 => PAD8RSELR::PULL6K, 2 => PAD8RSELR::PULL12K, 3 => PAD8RSELR::PULL24K, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `PULL1_5K`"] #[inline] pub fn is_pull1_5k(&self) -> bool { *self == PAD8RSELR::PULL1_5K } #[doc = "Checks if the value of the field is `PULL6K`"] #[inline] pub fn is_pull6k(&self) -> bool { *self == PAD8RSELR::PULL6K } #[doc = "Checks if the value of the field is `PULL12K`"] #[inline] pub fn is_pull12k(&self) -> bool { *self == PAD8RSELR::PULL12K } #[doc = "Checks if the value of the field is `PULL24K`"] #[inline] pub fn is_pull24k(&self) -> bool { *self == PAD8RSELR::PULL24K } } #[doc = "Possible values of the field `PAD8FNCSEL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD8FNCSELR { #[doc = "Configure as the IOMSTR1 I2C SCL signal value."] M1SCL, #[doc = "Configure as the IOMSTR1 SPI SCK signal value."] M1SCK, #[doc = "IOM/MSPI nCE group 8 value."] NCE8, #[doc = "Configure as GPIO8 value."] GPIO8, #[doc = "SCARD serial clock output value."] SCCLK, #[doc = "Configure as the UART1 TX output signal value."] UART1TX, #[doc = r" Reserved"] _Reserved(u8), } impl PAD8FNCSELR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PAD8FNCSELR::M1SCL => 0, PAD8FNCSELR::M1SCK => 1, PAD8FNCSELR::NCE8 => 2, PAD8FNCSELR::GPIO8 => 3, PAD8FNCSELR::SCCLK => 4, PAD8FNCSELR::UART1TX => 6, PAD8FNCSELR::_Reserved(bits) => bits, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PAD8FNCSELR { match value { 0 => PAD8FNCSELR::M1SCL, 1 => PAD8FNCSELR::M1SCK, 2 => PAD8FNCSELR::NCE8, 3 => PAD8FNCSELR::GPIO8, 4 => PAD8FNCSELR::SCCLK, 6 => PAD8FNCSELR::UART1TX, i => PAD8FNCSELR::_Reserved(i), } } #[doc = "Checks if the value of the field is `M1SCL`"] #[inline] pub fn is_m1scl(&self) -> bool { *self == PAD8FNCSELR::M1SCL } #[doc = "Checks if the value of the field is `M1SCK`"] #[inline] pub fn is_m1sck(&self) -> bool { *self == PAD8FNCSELR::M1SCK } #[doc = "Checks if the value of the field is `NCE8`"] #[inline] pub fn is_nce8(&self) -> bool { *self == PAD8FNCSELR::NCE8 } #[doc = "Checks if the value of the field is `GPIO8`"] #[inline] pub fn is_gpio8(&self) -> bool { *self == PAD8FNCSELR::GPIO8 } #[doc = "Checks if the value of the field is `SCCLK`"] #[inline] pub fn is_scclk(&self) -> bool { *self == PAD8FNCSELR::SCCLK } #[doc = "Checks if the value of the field is `UART1TX`"] #[inline] pub fn is_uart1tx(&self) -> bool { *self == PAD8FNCSELR::UART1TX } } #[doc = "Possible values of the field `PAD8STRNG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD8STRNGR { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD8STRNGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD8STRNGR::LOW => false, PAD8STRNGR::HIGH => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD8STRNGR { match value { false => PAD8STRNGR::LOW, true => PAD8STRNGR::HIGH, } } #[doc = "Checks if the value of the field is `LOW`"] #[inline] pub fn is_low(&self) -> bool { *self == PAD8STRNGR::LOW } #[doc = "Checks if the value of the field is `HIGH`"] #[inline] pub fn is_high(&self) -> bool { *self == PAD8STRNGR::HIGH } } #[doc = "Possible values of the field `PAD8INPEN`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD8INPENR { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD8INPENR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD8INPENR::DIS => false, PAD8INPENR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD8INPENR { match value { false => PAD8INPENR::DIS, true => PAD8INPENR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD8INPENR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD8INPENR::EN } } #[doc = "Possible values of the field `PAD8PULL`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PAD8PULLR { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD8PULLR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { PAD8PULLR::DIS => false, PAD8PULLR::EN => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> PAD8PULLR { match value { false => PAD8PULLR::DIS, true => PAD8PULLR::EN, } } #[doc = "Checks if the value of the field is `DIS`"] #[inline] pub fn is_dis(&self) -> bool { *self == PAD8PULLR::DIS } #[doc = "Checks if the value of the field is `EN`"] #[inline] pub fn is_en(&self) -> bool { *self == PAD8PULLR::EN } } #[doc = "Values that can be written to the field `PAD11FNCSEL`"] pub enum PAD11FNCSELW { #[doc = "Configure as the analog input for ADC single ended input 2 value."] ADCSE2, #[doc = "IOM/MSPI nCE group 11 value."] NCE11, #[doc = "CTIMER connection 31 value."] CT31, #[doc = "Configure as GPIO11 value."] GPIO11, #[doc = "Configure as the IOSLAVE interrupt out signal value."] SLINT, #[doc = "Configure as the UART1 CTS input signal value."] UA1CTS, #[doc = "Configure as the UART0 RX input signal value."] UART0RX, #[doc = "Configure as the PDM Data input signal value."] PDM_DATA, } impl PAD11FNCSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD11FNCSELW::ADCSE2 => 0, PAD11FNCSELW::NCE11 => 1, PAD11FNCSELW::CT31 => 2, PAD11FNCSELW::GPIO11 => 3, PAD11FNCSELW::SLINT => 4, PAD11FNCSELW::UA1CTS => 5, PAD11FNCSELW::UART0RX => 6, PAD11FNCSELW::PDM_DATA => 7, } } } #[doc = r" Proxy"] pub struct _PAD11FNCSELW<'a> { w: &'a mut W, } impl<'a> _PAD11FNCSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD11FNCSELW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "Configure as the analog input for ADC single ended input 2 value."] #[inline] pub fn adcse2(self) -> &'a mut W { self.variant(PAD11FNCSELW::ADCSE2) } #[doc = "IOM/MSPI nCE group 11 value."] #[inline] pub fn nce11(self) -> &'a mut W { self.variant(PAD11FNCSELW::NCE11) } #[doc = "CTIMER connection 31 value."] #[inline] pub fn ct31(self) -> &'a mut W { self.variant(PAD11FNCSELW::CT31) } #[doc = "Configure as GPIO11 value."] #[inline] pub fn gpio11(self) -> &'a mut W { self.variant(PAD11FNCSELW::GPIO11) } #[doc = "Configure as the IOSLAVE interrupt out signal value."] #[inline] pub fn slint(self) -> &'a mut W { self.variant(PAD11FNCSELW::SLINT) } #[doc = "Configure as the UART1 CTS input signal value."] #[inline] pub fn ua1cts(self) -> &'a mut W { self.variant(PAD11FNCSELW::UA1CTS) } #[doc = "Configure as the UART0 RX input signal value."] #[inline] pub fn uart0rx(self) -> &'a mut W { self.variant(PAD11FNCSELW::UART0RX) } #[doc = "Configure as the PDM Data input signal value."] #[inline] pub fn pdm_data(self) -> &'a mut W { self.variant(PAD11FNCSELW::PDM_DATA) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 7; const OFFSET: u8 = 27; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD11STRNG`"] pub enum PAD11STRNGW { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD11STRNGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD11STRNGW::LOW => false, PAD11STRNGW::HIGH => true, } } } #[doc = r" Proxy"] pub struct _PAD11STRNGW<'a> { w: &'a mut W, } impl<'a> _PAD11STRNGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD11STRNGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Low drive strength value."] #[inline] pub fn low(self) -> &'a mut W { self.variant(PAD11STRNGW::LOW) } #[doc = "High drive strength value."] #[inline] pub fn high(self) -> &'a mut W { self.variant(PAD11STRNGW::HIGH) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 26; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD11INPEN`"] pub enum PAD11INPENW { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD11INPENW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD11INPENW::DIS => false, PAD11INPENW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD11INPENW<'a> { w: &'a mut W, } impl<'a> _PAD11INPENW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD11INPENW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pad input disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD11INPENW::DIS) } #[doc = "Pad input enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD11INPENW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 25; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD11PULL`"] pub enum PAD11PULLW { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD11PULLW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD11PULLW::DIS => false, PAD11PULLW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD11PULLW<'a> { w: &'a mut W, } impl<'a> _PAD11PULLW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD11PULLW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pullup disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD11PULLW::DIS) } #[doc = "Pullup enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD11PULLW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 24; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD10FNCSEL`"] pub enum PAD10FNCSELW { #[doc = "Configure as the IOMSTR1 SPI MOSI signal value."] M1MOSI, #[doc = "IOM/MSPI nCE group 10 value."] NCE10, #[doc = "Configure as GPIO10 value."] GPIO10, #[doc = "PDM serial clock out value."] PDMCLK, #[doc = "Configure as the UART1 RTS output signal value."] UA1RTS, } impl PAD10FNCSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD10FNCSELW::M1MOSI => 1, PAD10FNCSELW::NCE10 => 2, PAD10FNCSELW::GPIO10 => 3, PAD10FNCSELW::PDMCLK => 4, PAD10FNCSELW::UA1RTS => 5, } } } #[doc = r" Proxy"] pub struct _PAD10FNCSELW<'a> { w: &'a mut W, } impl<'a> _PAD10FNCSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD10FNCSELW) -> &'a mut W { unsafe { self.bits(variant._bits()) } } #[doc = "Configure as the IOMSTR1 SPI MOSI signal value."] #[inline] pub fn m1mosi(self) -> &'a mut W { self.variant(PAD10FNCSELW::M1MOSI) } #[doc = "IOM/MSPI nCE group 10 value."] #[inline] pub fn nce10(self) -> &'a mut W { self.variant(PAD10FNCSELW::NCE10) } #[doc = "Configure as GPIO10 value."] #[inline] pub fn gpio10(self) -> &'a mut W { self.variant(PAD10FNCSELW::GPIO10) } #[doc = "PDM serial clock out value."] #[inline] pub fn pdmclk(self) -> &'a mut W { self.variant(PAD10FNCSELW::PDMCLK) } #[doc = "Configure as the UART1 RTS output signal value."] #[inline] pub fn ua1rts(self) -> &'a mut W { self.variant(PAD10FNCSELW::UA1RTS) } #[doc = r" Writes raw bits to the field"] #[inline] pub unsafe fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 7; const OFFSET: u8 = 19; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD10STRNG`"] pub enum PAD10STRNGW { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD10STRNGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD10STRNGW::LOW => false, PAD10STRNGW::HIGH => true, } } } #[doc = r" Proxy"] pub struct _PAD10STRNGW<'a> { w: &'a mut W, } impl<'a> _PAD10STRNGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD10STRNGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Low drive strength value."] #[inline] pub fn low(self) -> &'a mut W { self.variant(PAD10STRNGW::LOW) } #[doc = "High drive strength value."] #[inline] pub fn high(self) -> &'a mut W { self.variant(PAD10STRNGW::HIGH) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 18; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD10INPEN`"] pub enum PAD10INPENW { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD10INPENW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD10INPENW::DIS => false, PAD10INPENW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD10INPENW<'a> { w: &'a mut W, } impl<'a> _PAD10INPENW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD10INPENW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pad input disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD10INPENW::DIS) } #[doc = "Pad input enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD10INPENW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 17; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD10PULL`"] pub enum PAD10PULLW { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD10PULLW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD10PULLW::DIS => false, PAD10PULLW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD10PULLW<'a> { w: &'a mut W, } impl<'a> _PAD10PULLW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD10PULLW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pullup disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD10PULLW::DIS) } #[doc = "Pullup enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD10PULLW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 16; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD9RSEL`"] pub enum PAD9RSELW { #[doc = "Pullup is ~1.5 KOhms value."] PULL1_5K, #[doc = "Pullup is ~6 KOhms value."] PULL6K, #[doc = "Pullup is ~12 KOhms value."] PULL12K, #[doc = "Pullup is ~24 KOhms value."] PULL24K, } impl PAD9RSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD9RSELW::PULL1_5K => 0, PAD9RSELW::PULL6K => 1, PAD9RSELW::PULL12K => 2, PAD9RSELW::PULL24K => 3, } } } #[doc = r" Proxy"] pub struct _PAD9RSELW<'a> { w: &'a mut W, } impl<'a> _PAD9RSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD9RSELW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "Pullup is ~1.5 KOhms value."] #[inline] pub fn pull1_5k(self) -> &'a mut W { self.variant(PAD9RSELW::PULL1_5K) } #[doc = "Pullup is ~6 KOhms value."] #[inline] pub fn pull6k(self) -> &'a mut W { self.variant(PAD9RSELW::PULL6K) } #[doc = "Pullup is ~12 KOhms value."] #[inline] pub fn pull12k(self) -> &'a mut W { self.variant(PAD9RSELW::PULL12K) } #[doc = "Pullup is ~24 KOhms value."] #[inline] pub fn pull24k(self) -> &'a mut W { self.variant(PAD9RSELW::PULL24K) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 3; const OFFSET: u8 = 14; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD9FNCSEL`"] pub enum PAD9FNCSELW { #[doc = "Configure as the IOMSTR1 I2C SDA or SPI WIR3 signal value."] M1SDAWIR3, #[doc = "Configure as the IOMSTR1 SPI MISO signal value."] M1MISO, #[doc = "IOM/MSPI nCE group 9 value."] NCE9, #[doc = "Configure as GPIO9 value."] GPIO9, #[doc = "SCARD data I/O connection value."] SCCIO, #[doc = "Configure as UART1 RX input signal value."] UART1RX, } impl PAD9FNCSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD9FNCSELW::M1SDAWIR3 => 0, PAD9FNCSELW::M1MISO => 1, PAD9FNCSELW::NCE9 => 2, PAD9FNCSELW::GPIO9 => 3, PAD9FNCSELW::SCCIO => 4, PAD9FNCSELW::UART1RX => 6, } } } #[doc = r" Proxy"] pub struct _PAD9FNCSELW<'a> { w: &'a mut W, } impl<'a> _PAD9FNCSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD9FNCSELW) -> &'a mut W { unsafe { self.bits(variant._bits()) } } #[doc = "Configure as the IOMSTR1 I2C SDA or SPI WIR3 signal value."] #[inline] pub fn m1sdawir3(self) -> &'a mut W { self.variant(PAD9FNCSELW::M1SDAWIR3) } #[doc = "Configure as the IOMSTR1 SPI MISO signal value."] #[inline] pub fn m1miso(self) -> &'a mut W { self.variant(PAD9FNCSELW::M1MISO) } #[doc = "IOM/MSPI nCE group 9 value."] #[inline] pub fn nce9(self) -> &'a mut W { self.variant(PAD9FNCSELW::NCE9) } #[doc = "Configure as GPIO9 value."] #[inline] pub fn gpio9(self) -> &'a mut W { self.variant(PAD9FNCSELW::GPIO9) } #[doc = "SCARD data I/O connection value."] #[inline] pub fn sccio(self) -> &'a mut W { self.variant(PAD9FNCSELW::SCCIO) } #[doc = "Configure as UART1 RX input signal value."] #[inline] pub fn uart1rx(self) -> &'a mut W { self.variant(PAD9FNCSELW::UART1RX) } #[doc = r" Writes raw bits to the field"] #[inline] pub unsafe fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 7; const OFFSET: u8 = 11; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD9STRNG`"] pub enum PAD9STRNGW { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD9STRNGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD9STRNGW::LOW => false, PAD9STRNGW::HIGH => true, } } } #[doc = r" Proxy"] pub struct _PAD9STRNGW<'a> { w: &'a mut W, } impl<'a> _PAD9STRNGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD9STRNGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Low drive strength value."] #[inline] pub fn low(self) -> &'a mut W { self.variant(PAD9STRNGW::LOW) } #[doc = "High drive strength value."] #[inline] pub fn high(self) -> &'a mut W { self.variant(PAD9STRNGW::HIGH) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 10; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD9INPEN`"] pub enum PAD9INPENW { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD9INPENW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD9INPENW::DIS => false, PAD9INPENW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD9INPENW<'a> { w: &'a mut W, } impl<'a> _PAD9INPENW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD9INPENW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pad input disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD9INPENW::DIS) } #[doc = "Pad input enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD9INPENW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 9; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD9PULL`"] pub enum PAD9PULLW { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD9PULLW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD9PULLW::DIS => false, PAD9PULLW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD9PULLW<'a> { w: &'a mut W, } impl<'a> _PAD9PULLW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD9PULLW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pullup disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD9PULLW::DIS) } #[doc = "Pullup enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD9PULLW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 8; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD8RSEL`"] pub enum PAD8RSELW { #[doc = "Pullup is ~1.5 KOhms value."] PULL1_5K, #[doc = "Pullup is ~6 KOhms value."] PULL6K, #[doc = "Pullup is ~12 KOhms value."] PULL12K, #[doc = "Pullup is ~24 KOhms value."] PULL24K, } impl PAD8RSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD8RSELW::PULL1_5K => 0, PAD8RSELW::PULL6K => 1, PAD8RSELW::PULL12K => 2, PAD8RSELW::PULL24K => 3, } } } #[doc = r" Proxy"] pub struct _PAD8RSELW<'a> { w: &'a mut W, } impl<'a> _PAD8RSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD8RSELW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "Pullup is ~1.5 KOhms value."] #[inline] pub fn pull1_5k(self) -> &'a mut W { self.variant(PAD8RSELW::PULL1_5K) } #[doc = "Pullup is ~6 KOhms value."] #[inline] pub fn pull6k(self) -> &'a mut W { self.variant(PAD8RSELW::PULL6K) } #[doc = "Pullup is ~12 KOhms value."] #[inline] pub fn pull12k(self) -> &'a mut W { self.variant(PAD8RSELW::PULL12K) } #[doc = "Pullup is ~24 KOhms value."] #[inline] pub fn pull24k(self) -> &'a mut W { self.variant(PAD8RSELW::PULL24K) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 3; const OFFSET: u8 = 6; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD8FNCSEL`"] pub enum PAD8FNCSELW { #[doc = "Configure as the IOMSTR1 I2C SCL signal value."] M1SCL, #[doc = "Configure as the IOMSTR1 SPI SCK signal value."] M1SCK, #[doc = "IOM/MSPI nCE group 8 value."] NCE8, #[doc = "Configure as GPIO8 value."] GPIO8, #[doc = "SCARD serial clock output value."] SCCLK, #[doc = "Configure as the UART1 TX output signal value."] UART1TX, } impl PAD8FNCSELW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PAD8FNCSELW::M1SCL => 0, PAD8FNCSELW::M1SCK => 1, PAD8FNCSELW::NCE8 => 2, PAD8FNCSELW::GPIO8 => 3, PAD8FNCSELW::SCCLK => 4, PAD8FNCSELW::UART1TX => 6, } } } #[doc = r" Proxy"] pub struct _PAD8FNCSELW<'a> { w: &'a mut W, } impl<'a> _PAD8FNCSELW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD8FNCSELW) -> &'a mut W { unsafe { self.bits(variant._bits()) } } #[doc = "Configure as the IOMSTR1 I2C SCL signal value."] #[inline] pub fn m1scl(self) -> &'a mut W { self.variant(PAD8FNCSELW::M1SCL) } #[doc = "Configure as the IOMSTR1 SPI SCK signal value."] #[inline] pub fn m1sck(self) -> &'a mut W { self.variant(PAD8FNCSELW::M1SCK) } #[doc = "IOM/MSPI nCE group 8 value."] #[inline] pub fn nce8(self) -> &'a mut W { self.variant(PAD8FNCSELW::NCE8) } #[doc = "Configure as GPIO8 value."] #[inline] pub fn gpio8(self) -> &'a mut W { self.variant(PAD8FNCSELW::GPIO8) } #[doc = "SCARD serial clock output value."] #[inline] pub fn scclk(self) -> &'a mut W { self.variant(PAD8FNCSELW::SCCLK) } #[doc = "Configure as the UART1 TX output signal value."] #[inline] pub fn uart1tx(self) -> &'a mut W { self.variant(PAD8FNCSELW::UART1TX) } #[doc = r" Writes raw bits to the field"] #[inline] pub unsafe fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 7; const OFFSET: u8 = 3; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD8STRNG`"] pub enum PAD8STRNGW { #[doc = "Low drive strength value."] LOW, #[doc = "High drive strength value."] HIGH, } impl PAD8STRNGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD8STRNGW::LOW => false, PAD8STRNGW::HIGH => true, } } } #[doc = r" Proxy"] pub struct _PAD8STRNGW<'a> { w: &'a mut W, } impl<'a> _PAD8STRNGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD8STRNGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Low drive strength value."] #[inline] pub fn low(self) -> &'a mut W { self.variant(PAD8STRNGW::LOW) } #[doc = "High drive strength value."] #[inline] pub fn high(self) -> &'a mut W { self.variant(PAD8STRNGW::HIGH) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 2; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD8INPEN`"] pub enum PAD8INPENW { #[doc = "Pad input disabled value."] DIS, #[doc = "Pad input enabled value."] EN, } impl PAD8INPENW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD8INPENW::DIS => false, PAD8INPENW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD8INPENW<'a> { w: &'a mut W, } impl<'a> _PAD8INPENW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD8INPENW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pad input disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD8INPENW::DIS) } #[doc = "Pad input enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD8INPENW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 1; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `PAD8PULL`"] pub enum PAD8PULLW { #[doc = "Pullup disabled value."] DIS, #[doc = "Pullup enabled value."] EN, } impl PAD8PULLW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { PAD8PULLW::DIS => false, PAD8PULLW::EN => true, } } } #[doc = r" Proxy"] pub struct _PAD8PULLW<'a> { w: &'a mut W, } impl<'a> _PAD8PULLW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PAD8PULLW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Pullup disabled value."] #[inline] pub fn dis(self) -> &'a mut W { self.variant(PAD8PULLW::DIS) } #[doc = "Pullup enabled value."] #[inline] pub fn en(self) -> &'a mut W { self.variant(PAD8PULLW::EN) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 0; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } impl R { #[doc = r" Value of the register as raw bits"] #[inline] pub fn bits(&self) -> u32 { self.bits } #[doc = "Bits 27:29 - Pad 11 function select"] #[inline] pub fn pad11fncsel(&self) -> PAD11FNCSELR { PAD11FNCSELR::_from({ const MASK: u8 = 7; const OFFSET: u8 = 27; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 26 - Pad 11 drive strength"] #[inline] pub fn pad11strng(&self) -> PAD11STRNGR { PAD11STRNGR::_from({ const MASK: bool = true; const OFFSET: u8 = 26; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 25 - Pad 11 input enable"] #[inline] pub fn pad11inpen(&self) -> PAD11INPENR { PAD11INPENR::_from({ const MASK: bool = true; const OFFSET: u8 = 25; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 24 - Pad 11 pullup enable"] #[inline] pub fn pad11pull(&self) -> PAD11PULLR { PAD11PULLR::_from({ const MASK: bool = true; const OFFSET: u8 = 24; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bits 19:21 - Pad 10 function select"] #[inline] pub fn pad10fncsel(&self) -> PAD10FNCSELR { PAD10FNCSELR::_from({ const MASK: u8 = 7; const OFFSET: u8 = 19; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 18 - Pad 10 drive strength"] #[inline] pub fn pad10strng(&self) -> PAD10STRNGR { PAD10STRNGR::_from({ const MASK: bool = true; const OFFSET: u8 = 18; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 17 - Pad 10 input enable"] #[inline] pub fn pad10inpen(&self) -> PAD10INPENR { PAD10INPENR::_from({ const MASK: bool = true; const OFFSET: u8 = 17; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 16 - Pad 10 pullup enable"] #[inline] pub fn pad10pull(&self) -> PAD10PULLR { PAD10PULLR::_from({ const MASK: bool = true; const OFFSET: u8 = 16; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bits 14:15 - Pad 9 pullup resistor selection"] #[inline] pub fn pad9rsel(&self) -> PAD9RSELR { PAD9RSELR::_from({ const MASK: u8 = 3; const OFFSET: u8 = 14; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bits 11:13 - Pad 9 function select"] #[inline] pub fn pad9fncsel(&self) -> PAD9FNCSELR { PAD9FNCSELR::_from({ const MASK: u8 = 7; const OFFSET: u8 = 11; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 10 - Pad 9 drive strength"] #[inline] pub fn pad9strng(&self) -> PAD9STRNGR { PAD9STRNGR::_from({ const MASK: bool = true; const OFFSET: u8 = 10; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 9 - Pad 9 input enable"] #[inline] pub fn pad9inpen(&self) -> PAD9INPENR { PAD9INPENR::_from({ const MASK: bool = true; const OFFSET: u8 = 9; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 8 - Pad 9 pullup enable"] #[inline] pub fn pad9pull(&self) -> PAD9PULLR { PAD9PULLR::_from({ const MASK: bool = true; const OFFSET: u8 = 8; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bits 6:7 - Pad 8 pullup resistor selection."] #[inline] pub fn pad8rsel(&self) -> PAD8RSELR { PAD8RSELR::_from({ const MASK: u8 = 3; const OFFSET: u8 = 6; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bits 3:5 - Pad 8 function select"] #[inline] pub fn pad8fncsel(&self) -> PAD8FNCSELR { PAD8FNCSELR::_from({ const MASK: u8 = 7; const OFFSET: u8 = 3; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 2 - Pad 8 drive strength"] #[inline] pub fn pad8strng(&self) -> PAD8STRNGR { PAD8STRNGR::_from({ const MASK: bool = true; const OFFSET: u8 = 2; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 1 - Pad 8 input enable"] #[inline] pub fn pad8inpen(&self) -> PAD8INPENR { PAD8INPENR::_from({ const MASK: bool = true; const OFFSET: u8 = 1; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 0 - Pad 8 pullup enable"] #[inline] pub fn pad8pull(&self) -> PAD8PULLR { PAD8PULLR::_from({ const MASK: bool = true; const OFFSET: u8 = 0; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } } impl W { #[doc = r" Reset value of the register"] #[inline] pub fn reset_value() -> W { W { bits: 404232216 } } #[doc = r" Writes raw bits to the register"] #[inline] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "Bits 27:29 - Pad 11 function select"] #[inline] pub fn pad11fncsel(&mut self) -> _PAD11FNCSELW { _PAD11FNCSELW { w: self } } #[doc = "Bit 26 - Pad 11 drive strength"] #[inline] pub fn pad11strng(&mut self) -> _PAD11STRNGW { _PAD11STRNGW { w: self } } #[doc = "Bit 25 - Pad 11 input enable"] #[inline] pub fn pad11inpen(&mut self) -> _PAD11INPENW { _PAD11INPENW { w: self } } #[doc = "Bit 24 - Pad 11 pullup enable"] #[inline] pub fn pad11pull(&mut self) -> _PAD11PULLW { _PAD11PULLW { w: self } } #[doc = "Bits 19:21 - Pad 10 function select"] #[inline] pub fn pad10fncsel(&mut self) -> _PAD10FNCSELW { _PAD10FNCSELW { w: self } } #[doc = "Bit 18 - Pad 10 drive strength"] #[inline] pub fn pad10strng(&mut self) -> _PAD10STRNGW { _PAD10STRNGW { w: self } } #[doc = "Bit 17 - Pad 10 input enable"] #[inline] pub fn pad10inpen(&mut self) -> _PAD10INPENW { _PAD10INPENW { w: self } } #[doc = "Bit 16 - Pad 10 pullup enable"] #[inline] pub fn pad10pull(&mut self) -> _PAD10PULLW { _PAD10PULLW { w: self } } #[doc = "Bits 14:15 - Pad 9 pullup resistor selection"] #[inline] pub fn pad9rsel(&mut self) -> _PAD9RSELW { _PAD9RSELW { w: self } } #[doc = "Bits 11:13 - Pad 9 function select"] #[inline] pub fn pad9fncsel(&mut self) -> _PAD9FNCSELW { _PAD9FNCSELW { w: self } } #[doc = "Bit 10 - Pad 9 drive strength"] #[inline] pub fn pad9strng(&mut self) -> _PAD9STRNGW { _PAD9STRNGW { w: self } } #[doc = "Bit 9 - Pad 9 input enable"] #[inline] pub fn pad9inpen(&mut self) -> _PAD9INPENW { _PAD9INPENW { w: self } } #[doc = "Bit 8 - Pad 9 pullup enable"] #[inline] pub fn pad9pull(&mut self) -> _PAD9PULLW { _PAD9PULLW { w: self } } #[doc = "Bits 6:7 - Pad 8 pullup resistor selection."] #[inline] pub fn pad8rsel(&mut self) -> _PAD8RSELW { _PAD8RSELW { w: self } } #[doc = "Bits 3:5 - Pad 8 function select"] #[inline] pub fn pad8fncsel(&mut self) -> _PAD8FNCSELW { _PAD8FNCSELW { w: self } } #[doc = "Bit 2 - Pad 8 drive strength"] #[inline] pub fn pad8strng(&mut self) -> _PAD8STRNGW { _PAD8STRNGW { w: self } } #[doc = "Bit 1 - Pad 8 input enable"] #[inline] pub fn pad8inpen(&mut self) -> _PAD8INPENW { _PAD8INPENW { w: self } } #[doc = "Bit 0 - Pad 8 pullup enable"] #[inline] pub fn pad8pull(&mut self) -> _PAD8PULLW { _PAD8PULLW { w: self } } }
use { macros::ErrorEnum, std::{error, fmt, io, path::StripPrefixError, sync::PoisonError}, zip::result::ZipError, }; #[derive(Debug)] pub struct ErrorInternal { msg: String, } impl fmt::Display for ErrorInternal { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.msg.fmt(f) } } impl error::Error for ErrorInternal { fn source(&self) -> Option<&(dyn error::Error + 'static)> { None } } #[derive(Debug)] pub struct PoisonErrorInternal(String); impl fmt::Display for PoisonErrorInternal { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(f) } } impl error::Error for PoisonErrorInternal { fn source(&self) -> Option<&(dyn error::Error + 'static)> { None } } #[derive(Debug, ErrorEnum)] pub enum Error { Onex(ErrorInternal), Io(io::Error), Zip(ZipError), Walkdir(walkdir::Error), StripPrefix(StripPrefixError), Poison(PoisonErrorInternal), } impl From<&str> for Error { fn from(msg: &str) -> Self { msg.to_owned().into() } } impl From<String> for Error { fn from(msg: String) -> Self { ErrorInternal { msg }.into() } } impl<T> From<PoisonError<T>> for Error { fn from(err: PoisonError<T>) -> Self { Error::Poison(PoisonErrorInternal(format!("{}", err))) } } pub type Result<T> = std::result::Result<T, Error>;
extern crate adder; #[test] fn it_adds_two() { assert_eq!(4, adder::calculator::add_two(2)); }
pub mod TwoSum;
use std::io::Read; use bytes::{Buf, Bytes}; use flate2::read::{MultiGzDecoder, ZlibDecoder}; use hyper::{Body, StatusCode}; /// decode decodes a HTTP request body based on its Content-Encoding header. /// Only identity, gzip, and deflate are currently supported content encodings. /// /// It supports multiple content encodings joined by ,s. They are decoded in the /// order provided. /// /// See [RFC7231](https://httpwg.org/specs/rfc7231.html#header.content-encoding) for more details /// on this header value. /// /// # Errors /// /// Will return an `Err` including a `hyper` response body if: /// /// * The passed `content_encoding` is unknown /// * The body cannot be decoded as the specified content type /// /// This response body can be passed back as the HTTP response to the client pub(crate) fn decode( content_encoding: Option<&hyper::header::HeaderValue>, mut body: Bytes, ) -> Result<Bytes, hyper::Response<hyper::Body>> { if let Some(content_encoding) = content_encoding { let content_encoding = String::from_utf8_lossy(content_encoding.as_bytes()); for encoding in content_encoding .rsplit(',') .map(str::trim) .map(str::to_lowercase) { body = match encoding.as_ref() { "identity" => body, "gzip" => { let mut decoded = Vec::new(); MultiGzDecoder::new(body.reader()) .read_to_end(&mut decoded) .map_err(|error| encoding_error_to_response(&encoding, error))?; decoded.into() } "deflate" => { let mut decoded = Vec::new(); ZlibDecoder::new(body.reader()) .read_to_end(&mut decoded) .map_err(|error| encoding_error_to_response(&encoding, error))?; decoded.into() } encoding => { return Err(hyper::Response::builder() .status(StatusCode::UNSUPPORTED_MEDIA_TYPE) .body(hyper::Body::from(format!( "Unsupported encoding type: {encoding}" ))) .expect("failed to build response")) } } } } Ok(body) } fn encoding_error_to_response( encoding: &str, error: impl std::error::Error, ) -> hyper::Response<Body> { hyper::Response::builder() .status(StatusCode::UNSUPPORTED_MEDIA_TYPE) .body(hyper::Body::from(format!( "failed to decode input as {encoding}: {error}" ))) .expect("failed to build response") }
extern crate ocl; use super::scene_object::SceneObject; use ocl::prm::{Uchar8, Float16}; const BOX_KEY: u8 = 4; pub struct Boxx { position: (f32, f32, f32), scale: (f32, f32, f32), rotation: (f32, f32, f32), color: (u8, u8, u8), reflectivity: f32 } impl Boxx { pub fn new(position: (f32, f32, f32), scale: (f32, f32, f32), rotation: (f32, f32, f32), color: (u8, u8, u8), reflectivity: f32) -> Self { Boxx {position: position, scale: scale, rotation: rotation, color:color, reflectivity: reflectivity} } } impl SceneObject for Boxx { fn get_float_data(&self) -> Float16 { Float16::new(self.position.0,self.position.1,self.position.2, self.scale.0,self.scale.1,self.scale.2, self.rotation.0,self.rotation.1,self.rotation.2, 0.,0.,0.,0.,0.,0.,self.reflectivity) } fn get_integer_data(&self) -> Uchar8 { Uchar8::new(BOX_KEY, self.color.0, self.color.1, self.color.2, 0, 0, 0, 0) } }
//! # A JsonRPC mini-framework. //! //! This module provides a small framework for building JsonRPC API on top of a `wrap` filter, this //! is done through the builder methods of `JrpcFilter`. use serde::de::DeserializeOwned; use serde::{Deserialize, Serialize}; use serde_json::Value; use std::collections::HashMap; use warp::filters; use warp::Filter; pub const JRPC_VERSION: &str = "2.0"; const JRPC_CODE_METHOD_NOT_FOUND: i32 = -32601; const JRPC_CODE_INVALID_PARAMS: i32 = -32605; const JRPC_CODE_INVALID_REQUEST: i32 = -32600; const JRPC_CODE_SERVER_ERROR: i32 = -32000; /// JsonRPC envelope. #[derive(Deserialize, Clone, Debug)] #[serde(deny_unknown_fields)] pub struct JrpcEnvelope { pub jsonrpc: String, pub id: String, pub method: String, pub params: Value, } /// JsonRPC context. #[derive(Debug)] struct JrpcCtx { jsonrpc: String, id: String, method: String, } /// JsonRPC errors. #[derive(Debug)] #[allow(dead_code)] pub enum JrpcError { WrongMethod, WrongParameters, WrongVersion, ServerError, InvalidRequest, } /// JsonRPC error details. #[derive(Serialize)] pub struct JrpcErrorDetails { code: i32, message: String, } /// JsonRPC response. #[derive(Serialize)] pub struct JrpcResponse<T> { pub jsonrpc: String, pub id: String, #[serde(skip_serializing_if = "Option::is_none")] pub result: Option<T>, #[serde(skip_serializing_if = "Option::is_none")] pub error: Option<JrpcErrorDetails>, } pub type JrpcResult<T> = Result<T, JrpcError>; type MethodMap<S> = HashMap<String, Box<dyn Fn(JrpcEnvelope, S) -> String + Send + Sync>>; type SharedMethodMap<S> = std::sync::Arc<HashMap<String, Box<dyn Fn(JrpcEnvelope, S) -> String + Send + Sync>>>; /// A JsonRPC `warp` filter, methods can be added through the builder method /// `add` while the filter is built with the `build` method. /// /// `warp` is an HTTP framework that enable building API from 'filters' composition, /// check its documentation for more informations. pub struct JrpcFilter<S> { methods: MethodMap<S>, shared_state: S, } impl<S: Send + Sync + Clone> JrpcFilter<S> { /// A builder object to easily create `wrap` filters that handle JsonRPC. pub fn new(shared_state: S) -> Self { JrpcFilter { methods: HashMap::new(), shared_state, } } /// Build a `wrap` filter that handles JRPC requests. /// To register methods use the `add` method on `JrpcFilter`. pub fn build(self) -> impl Filter<Extract = (String,), Error = warp::Rejection> + Clone { filters::body::json::<JrpcEnvelope>() .and(Self::with_methods(self.methods)) .and(Self::with_state(self.shared_state)) .and_then( |ctx: JrpcEnvelope, methods: SharedMethodMap<S>, state: S| async move { if ctx.jsonrpc != JRPC_VERSION { return Self::build_error(ctx.id, JrpcError::WrongVersion); } if let Some(method) = methods.get(&ctx.method) { Ok(method(ctx, state)) } else { Self::build_error(ctx.id, JrpcError::WrongMethod) } }, ) } /// A builder method to register new JsonRPC methods. /// /// params: /// - method: The method name. /// - handler: The handler function for this method, it takes a `Serialize` struct /// as input (which correspond to the jrpc parmeters) and must return a /// `Result<R, JrpcError>`, where R is `Serialize` and correspond to the /// request response. /// pub fn add<T, F, R>(mut self, method: &str, handler: F) -> Self where T: DeserializeOwned + Send, F: Fn(T, S) -> Result<R, JrpcError> + Send + Sync + Clone + 'static, R: Serialize, { let method_handler = move |ctx: JrpcEnvelope, state: S| { let result = match serde_json::from_value::<T>(ctx.params) { Ok(params) => handler(params, state), Err(_) => Err(JrpcError::WrongParameters), }; let response = Self::build_response(ctx.id, result); serde_json::to_string(&response).unwrap() }; self.methods .insert(method.to_string(), Box::new(method_handler)); self } /// Build the JsonRPC response from a JsonRPC Result and a request ID. fn build_response<R: Serialize>(id: String, res: JrpcResult<R>) -> JrpcResponse<R> { match res { Ok(value) => JrpcResponse { id, jsonrpc: JRPC_VERSION.to_string(), result: Some(value), error: None, }, Err(err) => JrpcResponse { id, jsonrpc: JRPC_VERSION.to_string(), result: None, error: Some(err.into()), }, } } /// Build an error response from a given JrpcError. #[allow(clippy::unnecessary_wraps)] fn build_error(id: String, error: JrpcError) -> Result<String, std::convert::Infallible> { let response = Self::build_response::<()>(id, Err(error)); Ok(serde_json::to_string(&response).unwrap()) } /// A helper function that returns a filter extracting the methods. fn with_methods( methods: MethodMap<S>, ) -> impl Filter<Extract = (SharedMethodMap<S>,), Error = core::convert::Infallible> + Clone { let shared_methods = std::sync::Arc::new(methods); filters::any::any().map(move || std::sync::Arc::clone(&shared_methods)) } /// A helper function that returns a filter extracting the shared state. fn with_state( shared_state: S, ) -> impl Filter<Extract = (S,), Error = core::convert::Infallible> + Clone { filters::any::any().map(move || shared_state.clone()) } } impl From<JrpcError> for JrpcErrorDetails { fn from(err: JrpcError) -> Self { match err { JrpcError::WrongMethod => JrpcErrorDetails { code: JRPC_CODE_METHOD_NOT_FOUND, message: "Method does not exsists".to_string(), }, JrpcError::WrongParameters => JrpcErrorDetails { code: JRPC_CODE_INVALID_PARAMS, message: "Invalid parameters".to_string(), }, JrpcError::WrongVersion => JrpcErrorDetails { code: JRPC_CODE_INVALID_REQUEST, message: "Invalid jsonrpc version, expected '2.0'".to_string(), }, JrpcError::ServerError => JrpcErrorDetails { code: JRPC_CODE_SERVER_ERROR, message: "Server error".to_string(), }, JrpcError::InvalidRequest => JrpcErrorDetails { code: JRPC_CODE_INVALID_REQUEST, message: "Invalid request".to_string(), }, } } }
use world; use world::World; /// TODO: should be along the lines of `world: W where W: world::World` pub struct Game { pub world: world::InMemoryWorld, } impl Game { pub fn new() -> Game { Game { world: world::InMemoryWorld::new() } } }
use std::{any::{Any, TypeId}, collections::{HashMap, HashSet}}; use bitset::BitSet; use crate::core::{ entity::Entity, }; pub struct World { /// The list of all available entities in the world. pub available_entities: HashSet<Entity>, /// The list of all living entities in the world. pub living_entities: HashSet<Entity>, /// The list of all entities signatures in the world. pub entities_signature: Vec<BitSet>, /// The list that contains a component list. pub components: Vec<Vec<Option<Box<dyn Any>>>>, /// Hashmap that contain the index of component list by their type. pub components_index: HashMap<TypeId, usize>, } impl World { /// Create new `World`. /// # Arguments /// * `max_entities` - The maximum amount of entities in the world. /// * `max_components_type` - The maximum amount of component types in the world. pub fn new(max_entities: usize, max_components_type: usize) -> Self { let mut available_entities: HashSet<Entity> = HashSet::with_capacity(max_entities); let living_entities: HashSet<Entity> = HashSet::with_capacity(max_entities); let mut entities_signature: Vec<BitSet> = Vec::with_capacity(max_entities); for i in 0..max_entities { available_entities.insert(i); entities_signature.push(BitSet::with_capacity(max_components_type)) } let mut components: Vec<Vec<Option<Box<dyn Any>>>> = Vec::with_capacity(max_components_type); for _ in 0..max_components_type { components.push(Vec::with_capacity(max_entities)); } Self { available_entities, living_entities, entities_signature, components, components_index: HashMap::with_capacity(max_components_type), } } }
extern crate termion; #[macro_use] pub mod util; use termion::*; use termion::screen::*; use std::io::{Write, stdout, stdin}; use std::env; use std::fs; use std::path::Path; pub mod window; use crate::window::*; pub mod input; pub mod read; use crate::read::*; macro_rules! moveCursor { ( $scr:expr, $x:expr, $y:expr ) => {{ write!($scr,"{}",cursor::Goto($x,$y)).unwrap(); }} } fn main() -> std::io::Result<()> { let args: Vec<String> = env::args().collect(); let file = { if args.len() > 1 { open_file(Some(args[1].clone())) } else { open_file(None) } }; match file { Ok(mut f) => { // init(..) //...read_file ... //... let mut main_win = read_file(&mut f); //program finishes fs::remove_file( &Path::new(&format!("{}.swp",f.name)) )?; } Err(err) => { println!("Error opening file: {}", err); } } Ok(()) } /* fn main() { let args: Vec<String> = env::args().collect(); let file = { if args.len() > 1 { let fpath = Path::new(&args[1]); match fs::read_to_string(fpath) { Ok(f) => Some(f), Err(err) => { println!("Could not read file: {}", err); None }, } } else {None} }; let _deletedis = Bar::new(); let mut input = String::new(); let size = terminal_size() .expect("Can not get terminal size"); { let mut screen = AlternateScreen::from(stdout()); moveCursor!(screen, 1,1); match file { Some(content) => {write!(screen, "{}", content).unwrap();}, _ => {}, } write!(screen, "Screen size: {:?}\n\nWrite something and press enter: ", size).unwrap(); screen.flush().unwrap(); stdin().read_line(&mut input) .expect("Could not read input"); } println!("{}",input); } */
#![doc = "generated by AutoRust 0.1.0"] #![allow(unused_mut)] #![allow(unused_variables)] #![allow(unused_imports)] use crate::models::*; use reqwest::StatusCode; use snafu::{ResultExt, Snafu}; pub mod operations { use crate::models::*; use reqwest::StatusCode; use snafu::{ResultExt, Snafu}; pub async fn list(operation_config: &crate::OperationConfig) -> std::result::Result<OperationListResult, list::Error> { let client = &operation_config.client; let uri_str = &format!("{}/providers/Microsoft.MachineLearning/operations", &operation_config.base_path,); let mut req_builder = client.get(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(list::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); let req = req_builder.build().context(list::BuildRequestError)?; let rsp = client.execute(req).await.context(list::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(list::ResponseBytesError)?; let rsp_value: OperationListResult = serde_json::from_slice(&body).context(list::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(list::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(list::DeserializeError { body })?; list::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod list { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } } pub mod workspaces { use crate::models::*; use reqwest::StatusCode; use snafu::{ResultExt, Snafu}; pub async fn get( operation_config: &crate::OperationConfig, subscription_id: &str, resource_group_name: &str, workspace_name: &str, ) -> std::result::Result<Workspace, get::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.get(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(get::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); let req = req_builder.build().context(get::BuildRequestError)?; let rsp = client.execute(req).await.context(get::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(get::ResponseBytesError)?; let rsp_value: Workspace = serde_json::from_slice(&body).context(get::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(get::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(get::DeserializeError { body })?; get::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod get { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn create_or_update( operation_config: &crate::OperationConfig, subscription_id: &str, resource_group_name: &str, workspace_name: &str, parameters: &Workspace, ) -> std::result::Result<Workspace, create_or_update::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.put(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(create_or_update::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); req_builder = req_builder.json(parameters); let req = req_builder.build().context(create_or_update::BuildRequestError)?; let rsp = client.execute(req).await.context(create_or_update::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(create_or_update::ResponseBytesError)?; let rsp_value: Workspace = serde_json::from_slice(&body).context(create_or_update::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(create_or_update::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(create_or_update::DeserializeError { body })?; create_or_update::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod create_or_update { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn update( operation_config: &crate::OperationConfig, subscription_id: &str, resource_group_name: &str, workspace_name: &str, parameters: &WorkspaceUpdateParameters, ) -> std::result::Result<Workspace, update::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.patch(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(update::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); req_builder = req_builder.json(parameters); let req = req_builder.build().context(update::BuildRequestError)?; let rsp = client.execute(req).await.context(update::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(update::ResponseBytesError)?; let rsp_value: Workspace = serde_json::from_slice(&body).context(update::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(update::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(update::DeserializeError { body })?; update::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod update { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn delete( operation_config: &crate::OperationConfig, subscription_id: &str, resource_group_name: &str, workspace_name: &str, ) -> std::result::Result<delete::Response, delete::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.delete(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(delete::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); let req = req_builder.build().context(delete::BuildRequestError)?; let rsp = client.execute(req).await.context(delete::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => Ok(delete::Response::Ok200), StatusCode::NO_CONTENT => Ok(delete::Response::NoContent204), status_code => { let body: bytes::Bytes = rsp.bytes().await.context(delete::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(delete::DeserializeError { body })?; delete::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod delete { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug)] pub enum Response { Ok200, NoContent204, } #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn resync_storage_keys( operation_config: &crate::OperationConfig, subscription_id: &str, workspace_name: &str, resource_group_name: &str, ) -> std::result::Result<(), resync_storage_keys::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}/resyncStorageKeys", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.post(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(resync_storage_keys::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); req_builder = req_builder.header(reqwest::header::CONTENT_LENGTH, 0); let req = req_builder.build().context(resync_storage_keys::BuildRequestError)?; let rsp = client.execute(req).await.context(resync_storage_keys::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => Ok(()), status_code => { let body: bytes::Bytes = rsp.bytes().await.context(resync_storage_keys::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(resync_storage_keys::DeserializeError { body })?; resync_storage_keys::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod resync_storage_keys { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn list_workspace_keys( operation_config: &crate::OperationConfig, subscription_id: &str, workspace_name: &str, resource_group_name: &str, ) -> std::result::Result<WorkspaceKeysResponse, list_workspace_keys::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces/{}/listWorkspaceKeys", &operation_config.base_path, subscription_id, resource_group_name, workspace_name ); let mut req_builder = client.post(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(list_workspace_keys::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); req_builder = req_builder.header(reqwest::header::CONTENT_LENGTH, 0); let req = req_builder.build().context(list_workspace_keys::BuildRequestError)?; let rsp = client.execute(req).await.context(list_workspace_keys::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(list_workspace_keys::ResponseBytesError)?; let rsp_value: WorkspaceKeysResponse = serde_json::from_slice(&body).context(list_workspace_keys::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(list_workspace_keys::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(list_workspace_keys::DeserializeError { body })?; list_workspace_keys::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod list_workspace_keys { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn list_by_resource_group( operation_config: &crate::OperationConfig, subscription_id: &str, resource_group_name: &str, ) -> std::result::Result<WorkspaceListResult, list_by_resource_group::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearning/workspaces", &operation_config.base_path, subscription_id, resource_group_name ); let mut req_builder = client.get(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(list_by_resource_group::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); let req = req_builder.build().context(list_by_resource_group::BuildRequestError)?; let rsp = client.execute(req).await.context(list_by_resource_group::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(list_by_resource_group::ResponseBytesError)?; let rsp_value: WorkspaceListResult = serde_json::from_slice(&body).context(list_by_resource_group::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(list_by_resource_group::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(list_by_resource_group::DeserializeError { body })?; list_by_resource_group::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod list_by_resource_group { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } pub async fn list( operation_config: &crate::OperationConfig, subscription_id: &str, ) -> std::result::Result<WorkspaceListResult, list::Error> { let client = &operation_config.client; let uri_str = &format!( "{}/subscriptions/{}/providers/Microsoft.MachineLearning/workspaces", &operation_config.base_path, subscription_id ); let mut req_builder = client.get(uri_str); if let Some(token_credential) = &operation_config.token_credential { let token_response = token_credential .get_token(&operation_config.token_credential_resource) .await .context(list::GetTokenError)?; req_builder = req_builder.bearer_auth(token_response.token.secret()); } req_builder = req_builder.query(&[("api-version", &operation_config.api_version)]); let req = req_builder.build().context(list::BuildRequestError)?; let rsp = client.execute(req).await.context(list::ExecuteRequestError)?; match rsp.status() { StatusCode::OK => { let body: bytes::Bytes = rsp.bytes().await.context(list::ResponseBytesError)?; let rsp_value: WorkspaceListResult = serde_json::from_slice(&body).context(list::DeserializeError { body })?; Ok(rsp_value) } status_code => { let body: bytes::Bytes = rsp.bytes().await.context(list::ResponseBytesError)?; let rsp_value: ErrorResponse = serde_json::from_slice(&body).context(list::DeserializeError { body })?; list::DefaultResponse { status_code, value: rsp_value, } .fail() } } } pub mod list { use crate::{models, models::*}; use reqwest::StatusCode; use snafu::Snafu; #[derive(Debug, Snafu)] #[snafu(visibility(pub(crate)))] pub enum Error { DefaultResponse { status_code: StatusCode, value: models::ErrorResponse, }, BuildRequestError { source: reqwest::Error, }, ExecuteRequestError { source: reqwest::Error, }, ResponseBytesError { source: reqwest::Error, }, DeserializeError { source: serde_json::Error, body: bytes::Bytes, }, GetTokenError { source: azure_core::errors::AzureError, }, } } }
//! Contains the networks supported by this crate. //! //! A network is represented by a zero sized struct which implements `NetworkConstants`. When used //! as function argument they should be passed as `&NetworkConstants` and if returned as result //! they should be boxed `Box<NetworkConstants>`. Since they are zero-sized `Box` will not allocate. //! //! The reason for this design decision is to avoid complete matching over some enum implementing //! `NetworkConstants` which would make any expansion of the set of supported networks a breaking //! change. use ::{ChainParams, NetworkConstants, NetworkType}; use bitcoin_hashes::hex::FromHex; use bitcoin_hashes::sha256d; /// Represents the Bitcoin Mainnet #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct Bitcoin {} /// Represents the Bitcoin Testnet #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct BitcoinTestnet {} /// Represents the Bitcoin Regtest network #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct BitcoinRegtest {} impl Bitcoin { /// Create a new `Network` object representing Bitcoin pub fn new() -> Box<NetworkConstants> { Box::new(Bitcoin {}) } } impl BitcoinTestnet { /// Create a new `Network` object representing BitcoinTestnet pub fn new() -> Box<NetworkConstants> { Box::new(BitcoinTestnet {}) } } impl BitcoinRegtest { /// Create a new `Network` object representing BitcoinRegtest pub fn new() -> Box<NetworkConstants> { Box::new(BitcoinRegtest {}) } } impl NetworkConstants for Bitcoin { fn hrp(&self) -> &'static str { "bc" } fn p2pk_prefix(&self) -> u8 { 0 } fn p2pkh_prefix(&self) -> u8 { 0 } fn p2sh_prefix(&self) -> u8 { 5 } fn xpub_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04u8, 0x88, 0xB2, 0x1E]; &PREFIX } fn xpriv_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04, 0x88, 0xAD, 0xE4]; &PREFIX } fn wif_prefix(&self) -> u8 { 128 } fn magic(&self) -> u32 { 0xD9B4BEF9 } fn name(&self) -> &'static str { "bitcoin" } fn network_type(&self) -> NetworkType { NetworkType::Mainnet } fn chain_params(&self) -> ChainParams { ChainParams { bip16_time: 1333238400, // Apr 1 2012 bip34_height: 227931, // 000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8 bip65_height: 388381, // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 bip66_height: 363725, // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931 rule_change_activation_threshold: 1916, // 95% miner_confirmation_window: 2016, pow_limit: [ 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0x00000000ffffffffu64, ], pow_target_spacing: 10 * 60, // 10 minutes. pow_target_timespan: 14 * 24 * 60 * 60, // 2 weeks. allow_min_difficulty_blocks: false, no_pow_retargeting: false, } } fn genesis_block(&self) -> sha256d::Hash { sha256d::Hash::from_hex( "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" ).expect("static hex string, tested") } fn clone_boxed(&self) -> Box<NetworkConstants> { Self::new() } } impl NetworkConstants for BitcoinTestnet { fn hrp(&self) -> &'static str { "tb" } fn p2pk_prefix(&self) -> u8 { 111 } fn p2pkh_prefix(&self) -> u8 { 111 } fn p2sh_prefix(&self) -> u8 { 196 } fn xpub_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04u8, 0x35, 0x87, 0xCF]; &PREFIX } fn xpriv_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04, 0x35, 0x83, 0x94]; &PREFIX } fn wif_prefix(&self) -> u8 { 239 } fn magic(&self) -> u32 { 0x0709110B } fn name(&self) -> &'static str { "bitcoin-testnet" } fn network_type(&self) -> NetworkType { NetworkType::Testnet } fn chain_params(&self) -> ChainParams { ChainParams { bip16_time: 1333238400, // Apr 1 2012 bip34_height: 21111, // 0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8 bip65_height: 581885, // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6 bip66_height: 330776, // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182 rule_change_activation_threshold: 1512, // 75% miner_confirmation_window: 2016, pow_limit: [ 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0x00000000ffffffffu64, ], pow_target_spacing: 10 * 60, // 10 minutes. pow_target_timespan: 14 * 24 * 60 * 60, // 2 weeks. allow_min_difficulty_blocks: true, no_pow_retargeting: false, } } fn genesis_block(&self) -> sha256d::Hash { sha256d::Hash::from_hex( "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" ).expect("static hex string, tested") } fn clone_boxed(&self) -> Box<NetworkConstants> { Self::new() } } impl NetworkConstants for BitcoinRegtest { fn hrp(&self) -> &'static str { "bcrt" } fn p2pk_prefix(&self) -> u8 { 111 } fn p2pkh_prefix(&self) -> u8 { 111 } fn p2sh_prefix(&self) -> u8 { 196 } fn xpub_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04u8, 0x35, 0x87, 0xCF]; &PREFIX } fn xpriv_prefix(&self) -> &'static [u8; 4] { static PREFIX: [u8; 4] = [0x04, 0x35, 0x83, 0x94]; &PREFIX } fn wif_prefix(&self) -> u8 { 239 } fn magic(&self) -> u32 { 0xDAB5BFFA } fn name(&self) -> &'static str { "bitcoin-regtest" } fn network_type(&self) -> NetworkType { NetworkType::Regtest } fn chain_params(&self) -> ChainParams { ChainParams { bip16_time: 1333238400, // Apr 1 2012 bip34_height: 100000000, // not activated on regtest bip65_height: 1351, bip66_height: 1251, // used only in rpc tests rule_change_activation_threshold: 108, // 75% miner_confirmation_window: 144, pow_limit: [ 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0xffffffffffffffffu64, 0x7fffffffffffffffu64, ], pow_target_spacing: 10 * 60, // 10 minutes. pow_target_timespan: 14 * 24 * 60 * 60, // 2 weeks. allow_min_difficulty_blocks: true, no_pow_retargeting: true, } } fn genesis_block(&self) -> sha256d::Hash { sha256d::Hash::from_hex( "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206" ).expect("static hex string, tested") } fn clone_boxed(&self) -> Box<NetworkConstants> { Self::new() } }
use bitfield::bitfield; use numpy::{npyffi::NPY_TYPES, Element, PyArrayDescr}; use pyo3::{ffi, Py, Python}; use std::str::from_utf8_unchecked; #[derive(Clone, Debug)] #[repr(transparent)] pub struct PyString(Py<pyo3::types::PyString>); // In order to put it into a numpy array impl Element for PyString { const DATA_TYPE: numpy::DataType = numpy::DataType::Object; fn is_same_type(dtype: &PyArrayDescr) -> bool { unsafe { *dtype.as_dtype_ptr() }.type_num == NPY_TYPES::NPY_OBJECT as i32 } } #[derive(Clone, Copy)] pub enum StringInfo { ASCII(usize), // len of the string, not byte length UCS1(usize), UCS2(usize), UCS4(usize), } impl StringInfo { pub unsafe fn detect(s: &[u8]) -> StringInfo { let s = from_utf8_unchecked(s); let mut maxchar = 0; let mut len = 0; for ch in s.chars() { if ch as u32 > maxchar { maxchar = ch as u32; } len += 1; } if maxchar <= 0x7F { StringInfo::ASCII(len) } else if maxchar <= 0xFF { StringInfo::UCS1(len) } else if maxchar <= 0xFFFF { StringInfo::UCS2(len) } else { StringInfo::UCS4(len) } } pub fn pystring(&self, py: Python) -> PyString { let objptr = unsafe { match self { StringInfo::ASCII(len) => ffi::PyUnicode_New(*len as ffi::Py_ssize_t, 0x7F), StringInfo::UCS1(len) => ffi::PyUnicode_New(*len as ffi::Py_ssize_t, 0xFF), StringInfo::UCS2(len) => ffi::PyUnicode_New(*len as ffi::Py_ssize_t, 0xFFFF), StringInfo::UCS4(len) => ffi::PyUnicode_New(*len as ffi::Py_ssize_t, 0x10FFFF), } }; let s: Py<pyo3::types::PyString> = unsafe { Py::from_owned_ptr(py, objptr) }; PyString(s) } } impl PyString { // get none string converted from none object, otherwise default strings are zeros pub fn none(py: Python) -> PyString { // this is very unsafe because Py_None is not a PyString from Rust's perspective. But it is fine because // later these stuff will all be converted to a python object let s = unsafe { Py::from_borrowed_ptr(py, ffi::Py_None()) }; PyString(s) } // the val should be same as the val used for new pub unsafe fn write(&mut self, data: &[u8], info: StringInfo) { match info { StringInfo::ASCII(len) => { let pyobj = PyASCIIObject::from_mut_ref(&mut self.0); let buf = std::slice::from_raw_parts_mut( (pyobj as *mut PyASCIIObject).offset(1) as *mut u8, len as usize, ); buf.copy_from_slice(data); } StringInfo::UCS1(len) => { let pyobj = PyCompactUnicodeObject::from_mut_ref(&mut self.0); let buf = std::slice::from_raw_parts_mut( (pyobj as *mut PyCompactUnicodeObject).offset(1) as *mut u8, len as usize, ); let data: Vec<u8> = from_utf8_unchecked(data).chars().map(|c| c as u8).collect(); buf.copy_from_slice(&data); } StringInfo::UCS2(len) => { let pyobj = PyCompactUnicodeObject::from_mut_ref(&mut self.0); let buf = std::slice::from_raw_parts_mut( (pyobj as *mut PyCompactUnicodeObject).offset(1) as *mut u16, len as usize, ); let data: Vec<u16> = from_utf8_unchecked(data) .chars() .map(|c| c as u16) .collect(); buf.copy_from_slice(&data); } StringInfo::UCS4(len) => { let pyobj = PyCompactUnicodeObject::from_mut_ref(&mut self.0); let buf = std::slice::from_raw_parts_mut( (pyobj as *mut PyCompactUnicodeObject).offset(1) as *mut u32, len as usize, ); let data: Vec<u32> = from_utf8_unchecked(data) .chars() .map(|c| c as u32) .collect(); buf.copy_from_slice(&data); } } } } bitfield! { struct PyUnicodeState(u32); u32; interned, _: 1, 0; kind, _: 4, 2; compact, _: 5, 5; ascii, _: 6, 6; ready, _: 7, 7; } #[repr(C)] pub struct PyASCIIObject { obj: ffi::PyObject, length: ffi::Py_ssize_t, hash: ffi::Py_hash_t, state: PyUnicodeState, wstr: *mut u8, // python string stores data right after all the fields } impl PyASCIIObject { pub unsafe fn from_mut_ref<'a>(obj: &'a mut Py<pyo3::types::PyString>) -> &'a mut Self { let ascii: &mut &mut PyASCIIObject = std::mem::transmute(obj); *ascii } } #[repr(C)] pub struct PyCompactUnicodeObject { base: PyASCIIObject, utf8_length: ffi::Py_ssize_t, utf8: *mut u8, wstr_length: ffi::Py_ssize_t, // python string stores data right after all the fields } impl PyCompactUnicodeObject { pub unsafe fn from_mut_ref<'a>(obj: &'a mut Py<pyo3::types::PyString>) -> &'a mut Self { let unicode: &mut &mut PyCompactUnicodeObject = std::mem::transmute(obj); *unicode } }
use crate::de; use azure_core::errors::AzureError; use chrono::{DateTime, Utc}; use http::header; use http::HeaderMap; use serde::de::DeserializeOwned; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct NoData {} #[derive(Debug, Clone, Deserialize, Serialize)] pub struct TableEntity<T> { #[serde(rename = "RowKey")] pub row_key: String, #[serde(rename = "PartitionKey")] pub partition_key: String, #[serde(skip_serializing, rename = "odata.etag")] pub etag: Option<String>, #[serde( skip_serializing, deserialize_with = "de::optional_timestamp", rename = "Timestamp" )] pub timestamp: Option<DateTime<Utc>>, #[serde(flatten)] pub payload: T, } impl<T> std::convert::TryFrom<(&HeaderMap, &[u8])> for TableEntity<T> where T: DeserializeOwned, { type Error = AzureError; fn try_from(value: (&HeaderMap, &[u8])) -> Result<Self, Self::Error> { let headers = value.0; let body = value.1; log::trace!("headers == {:?}", headers); log::trace!("body == {:?}", std::str::from_utf8(body)); let mut entity: Self = serde_json::from_slice(&body)?; if let Some(etag) = headers.get(header::ETAG) { entity.etag = Some(etag.to_str()?.to_owned()); } Ok(entity) } }
use input::{get_name, how_was_day}; use output::{goodbye, hello, print_day_kind_message}; mod day_kind; mod input; mod output; fn main() { let name = get_name(); hello(&name); let day_kind = how_was_day(); print_day_kind_message(day_kind); goodbye(&name); }
use std::io; // CONSTANT DECLARATIONS const FORMULA_FRACTION: f64 = 5.0/9.0; const FORMULA_DIFFERENCE: i64 = 32; const FORMULA_MULTIPLIER: f64 = 1.8; fn main() { println!("Do you want to convert from Celsius to Fahrenheit [C], or do you want to convert from Fahrenheit to Celsius [F]"); // get users choice for convertion directrion loop { let mut unit_choice = String::new(); io::stdin() .read_line(&mut unit_choice) .expect("Your choice could not be processed."); unit_choice = unit_choice.trim_end().to_string(); // use the user's choice as convertion direction input if unit_choice == "F" || unit_choice == "C" { temperature_calculator(&unit_choice); break; } else { println!("Please enter either F or C, depending on your desired convertion direction.") } } } fn temperature_calculator(source_unit: &str) { println!("Enter a temperature in °{}!", source_unit); let target_unit = if source_unit == "F" { "C" } else { "F" }; loop { let mut starting_value = String::new(); // getting the user's input (Fahrenheits) io::stdin(). read_line(&mut starting_value). expect("Value could not be read."); // converting the user's input to an integer let starting_value = match starting_value.trim_end().parse::<i64>(){ Ok(n) => n, Err(_) => { println!("Please enter a number."); continue; } }; println!("You have entered following temperature: {} °{} \n", starting_value, source_unit); // convert temperature depending on unit let converted_value = if source_unit == "F" { // calculate the Celsius value ((Fahrenheit - 32) * 5/9) (starting_value - FORMULA_DIFFERENCE) as f64 * FORMULA_FRACTION } else { // calculate the Fahrenheit value Celsius * 1,8 + 32 starting_value as f64 * FORMULA_MULTIPLIER + FORMULA_DIFFERENCE as f64 }; println!("{} °{} are {:.2} °{}!", starting_value, source_unit, converted_value, target_unit); return; } }
use std::collections::HashMap; use std::pin::Pin; use std::sync::Mutex; use std::task::{Context, Poll}; use std::time::Duration; use crate::tickets::Ticket; use actix_web::web::{Bytes, Data}; use actix_web::Error; use futures::{Stream, StreamExt}; use serde_json::json; use tokio::sync::mpsc::{channel, Receiver, Sender}; use tokio::time::{interval_at, Instant}; pub struct Broadcaster { stores: HashMap<i32, Vec<Sender<Bytes>>>, } impl<'a> Broadcaster { pub fn create() -> Data<Mutex<Self>> { // Data ≃ Arc let me = Data::new(Mutex::new(Broadcaster::new())); // ping clients every 10 seconds to see if they are alive Broadcaster::spawn_ping(me.clone()); me } pub fn new_client(&mut self, store_id: i32) -> Client { let (tx, rx) = channel(100); match tx .clone() .try_send(Bytes::from("data: {\"type\":\"connected\"}\n\n")) { Ok(res) => log::info!("connected sended {:?}", res), Err(err) => log::error!("sending connected error {:?}", err), } self.stores .entry(store_id) .or_insert_with(Vec::new) .push(tx); Client(rx) } pub fn send_new_ticket(&self, store_id: i32, ticket: &Ticket) { self.send( store_id, &json!({"type":"newticket", "payload":ticket}).to_string(), ); } pub fn send(&self, store_id: i32, msg: &str) { let msg = Bytes::from(["data: ", msg, "\n\n"].concat()); let clients = match self.stores.get(&store_id) { Some(it) => it, _ => { log::error!("could not retrive client with id {}", store_id); return; } }; for client in clients { client.clone().try_send(msg.clone()).unwrap_or(()); } } fn spawn_ping(me: Data<Mutex<Self>>) { actix_rt::spawn(async move { let mut task = interval_at(Instant::now(), Duration::from_secs(10)); while let Some(_) = task.next().await { me.lock().unwrap().remove_stale_clients(); } }) } fn new() -> Self { Broadcaster { stores: HashMap::new(), } } fn take_store(&mut self, store_id: i32) -> Option<Vec<Sender<Bytes>>> { let store = self.stores.get_mut(&store_id)?; let old = std::mem::replace(store, Vec::new()); Some(old) } fn remove_stale_clients(&mut self) { use std::env; let front_version = env::var("FRONT_VERSION").unwrap_or_else(|_| "0.0.0".to_string()); let ping_msg = format!( "data: {{\"type\":\"ping\", \"payload\":{{\"version\":\"{}\"}} }}\n\n", front_version ); let ids: Vec<i32> = self.stores.keys().map(|k| k.to_owned()).collect(); for store_id in ids { let mut store = match self.take_store(store_id) { Some(r) => r, None => { return; } }; for mut client in store.drain(..) { match client.try_send(Bytes::from(ping_msg.clone())) { Ok(_) => self.stores.get_mut(&store_id).unwrap().push(client), Err(err) => log::error!("client disconnected {:?}", err), } } } } } // wrap Receiver in own type, with correct error type pub struct Client(Receiver<Bytes>); impl Stream for Client { type Item = Result<Bytes, Error>; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { match Pin::new(&mut self.0).poll_next(cx) { Poll::Ready(Some(v)) => Poll::Ready(Some(Ok(v))), Poll::Ready(None) => Poll::Ready(None), Poll::Pending => Poll::Pending, } } }
#[macro_use] mod events; pub mod data; pub mod gfx; use sdl2::render::Renderer; use sdl2::pixels::Color; use std::path::Path; use std::collections::HashMap; use self::gfx::Sprite; struct_events! { keyboard: { key_escape: Escape, key_up: Up, key_down: Down, key_left: Left, key_right: Right, key_space: Space, key_enter: Enter }, else: { quit: Quit { .. } } } pub struct Phi<'window> { pub events: Events, pub renderer: Renderer<'window>, cached_fonts: HashMap<(&'static str, i32), ::sdl2_ttf::Font>, } impl<'window> Phi<'window> { fn new(events: Events, renderer: Renderer<'window>) -> Phi<'window> { Phi { events: events, renderer: renderer, cached_fonts: HashMap::new(), } } pub fn output_size(&self) -> (f64, f64) { let (w, h): (u32, u32) = self.renderer.output_size().unwrap(); (w as f64, h as f64) } /// Renders a string of text as a sprite using the provided parameters. pub fn ttf_str_sprite(&mut self, text: &str, font_path: &'static str, size: i32, color: Color) -> Option<Sprite> { // First, we check if the font is already cached. If this is the case, // we use it to render the text. if let Some(font) = self.cached_fonts.get(&(font_path, size)) { return font.render(text, ::sdl2_ttf::blended(color)).ok() .and_then(|surface| self.renderer.create_texture_from_surface(&surface).ok()) .map(Sprite::new); } // Otherwise, we start by trying to load the requested font. ::sdl2_ttf::Font::from_file(Path::new(font_path), size).ok() .and_then(|font| { // If this worked, we cache the font we acquired. self.cached_fonts.insert((font_path, size), font); // Then, we call this method recursively. This avoids repeating // the rendering code. self.ttf_str_sprite(text, font_path, size, color) }) } } /// `ViewAction` allows the current view to tell the render loop what shpuld /// happen next. pub enum ViewAction { None, Quit, ChangeView(Box<View>), } pub trait View { /// Renders the current view and returns a `ViewAction` so it can communicate /// with the render loop. Called on every frame. // TODO: separate update and render logic? fn render(&mut self, context: &mut Phi, elapsed: f64) -> ViewAction; } /// Create a window with name `title`, initialize the underlying libraries and /// start the game with the view returned by `init()`. /// /// # Examples /// /// Here, we simply show a window with color #ffff00 and exit when escape is /// pressed or when the window is closed. /// /// ``` /// struct MyView; /// impl View for MyView { /// fn render(&mut self, context: &mut Phi, _: f64) -> ViewAction { /// if context.events.now.quit { /// return ViewAction::Quit; /// } /// /// context.renderer.set_draw_color(Color::RGB(255, 255, 0)); /// context.renderer.clear(); /// ViewAction::None /// } /// } /// /// spawn("Example", |_| Box::new(MyView)); /// ``` pub fn spawn<F>(title: &str, init: F) where F: Fn(&mut Phi) -> Box<View> { // Initizalize SDL2 let sdl_context = ::sdl2::init().unwrap(); let video = sdl_context.video().unwrap(); let mut timer = sdl_context.timer().unwrap(); let _image_context = ::sdl2_image::init(::sdl2_image::INIT_PNG).unwrap(); let _ttf_context = ::sdl2_ttf::init().unwrap(); // Create the window let window = video.window("ArcadeRS Shooter", 800, 600) .position_centered() .opengl() .resizable() .build() .unwrap(); let mut context = Phi::new( Events::new(sdl_context.event_pump().unwrap()), window.renderer() .accelerated() .build().unwrap() ); let mut current_view = init(&mut context); let interval = 1_000 / 60; let mut before = timer.ticks(); let mut last_second = timer.ticks(); let mut fps = 0u16; loop { let now = timer.ticks(); let dt = now - before; let elapsed = dt as f64 / 1_000.0; if dt < interval { timer.delay(interval - dt); continue; } before = now; fps += 1; if now - last_second > 1_000 { println!("FPS: {}", fps); last_second = now; fps = 0; } context.events.pump(&mut context.renderer); match current_view.render(&mut context, 0.01) { ViewAction::None => context.renderer.present(), ViewAction::Quit => break, ViewAction::ChangeView(new_view) => current_view = new_view, } } }
// https://github.com/bbkane/dotfiles/blob/master/bin_common/bin_common/format_shell_cmd.py use std::fmt; use std::io::{self, BufRead, Write}; use std::process; enum Kind { Pipe, Opt, SingleQuoteString, DoubleQuoteString, Cmd, } struct Token { text: String, kind: Kind, } impl Token { fn new(text: String, kind: Kind) -> Self { Self { text, kind } } } struct Expr { content: Vec<char>, len_expr: usize, } struct Iter<'a> { start: usize, end: usize, expr: &'a Expr, } impl Expr { fn new(content: &str) -> Self { let content = content.chars().collect::<Vec<_>>(); let len_expr = content.len(); Self { content, len_expr } } fn iter(&self) -> Iter { Iter { start: 0, end: 0, expr: self, } } } impl<'a> Iterator for Iter<'a> { type Item = Token; fn next(&mut self) -> Option<Self::Item> { while self.end < self.expr.len_expr && self.expr.content[self.end].is_whitespace() { self.start += 1; self.end += 1; } if self.end == self.expr.len_expr { return None; } match self.expr.content[self.end] { '|' => { self.end += 1; let text = self.expr.content[self.start..self.end].iter().collect(); self.start = self.end; Some(Token::new(text, Kind::Pipe)) } '-' => { while self.end < self.expr.len_expr && !self.expr.content[self.end].is_whitespace() { self.end += 1 } let text = self.expr.content[self.start..self.end].iter().collect(); self.start = self.end; Some(Token::new(text, Kind::Opt)) } '"' => { loop { self.end += 1; if self.end == self.expr.len_expr { panic!("Double quote at column {} unmatched", self.start) } if self.expr.content[self.end] == '"' { break; } } self.end += 1; let text = self.expr.content[self.start..self.end].iter().collect(); self.start = self.end; Some(Token::new(text, Kind::DoubleQuoteString)) } '\'' => { loop { self.end += 1; if self.end == self.expr.len_expr { panic!("Single quote at column {} unmatched", self.start); } if self.expr.content[self.end] == '\'' { break; } } self.end += 1; let text = self.expr.content[self.start..self.end].iter().collect(); self.start = self.end; Some(Token::new(text, Kind::SingleQuoteString)) } _ => { // # not space, not anything else, must be cmd while self.end < self.expr.len_expr && !self.expr.content[self.end].is_whitespace() { self.end += 1; } let text = self.expr.content[self.start..self.end].iter().collect(); self.start = self.end; Some(Token::new(text, Kind::Cmd)) } } } } impl std::fmt::Display for Expr { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for token in self.iter() { match token.kind { Kind::Pipe => write!(f, "|\n ")?, Kind::Opt => write!(f, "\\\n {} ", token.text)?, Kind::Cmd | Kind::DoubleQuoteString | Kind::SingleQuoteString => { write!(f, "{} ", token.text)? } } } Ok(()) } } fn main() -> io::Result<()> { let stdin = io::stdin(); if let Some(content) = stdin.lock().lines().next() { let content = content?; let expr = Expr::new(&content); write!(io::stdout(), "{}", expr)?; return Ok(()); } write!(io::stderr(), "No input")?; process::exit(1) } #[cfg(test)] mod tests { /* """Return a list of tokens >>> list(tokenize('')) [] >>> list(tokenize(' ')) [] >>> list(tokenize('|')) [Token(text='|', kind='PIPE')] >>> list(tokenize(' | ')) [Token(text='|', kind='PIPE')] >>> list(tokenize(' | -')) [Token(text='|', kind='PIPE'), Token(text='-', kind='OPTION')] >>> list(tokenize(' | -bob')) [Token(text='|', kind='PIPE'), Token(text='-bob', kind='OPTION')] >>> list(tokenize(' | -bob "dillon"')) [Token(text='|', kind='PIPE'), Token(text='-bob', kind='OPTION'), Token(text='"dillon"', kind='DOUBLE_QUOTE_STRING')] >>> list(tokenize('echo | openssl s_client -connect www.example.com:443')) [Token(text='echo', kind='CMD'), Token(text='|', kind='PIPE'), Token(text='openssl', kind='CMD'), Token(text='s_client', kind='CMD'), Token(text='-connect', kind='OPTION'), Token(text='www.example.com:443', kind='CMD')] >>> list(tokenize('"bob')) Traceback (most recent call last): ... ValueError: Double quote at column 0 unmatched >>> list(tokenize('"')) Traceback (most recent call last): ... ValueError: Double quote at column 0 unmatched >>> list(tokenize('" "')) [Token(text='" "', kind='DOUBLE_QUOTE_STRING')] >>> list(tokenize('echo "hi there" | awk "{print $1}"')) [Token(text='echo', kind='CMD'), Token(text='"hi there"', kind='DOUBLE_QUOTE_STRING'), Token(text='|', kind='PIPE'), Token(text='awk', kind='CMD'), Token(text='"{print $1}"', kind='DOUBLE_QUOTE_STRING')] """ */ }
use crate::config; use crate::util::*; use std::process::Command; pub fn run() { let name = if args_len() < 3 { choose_note() } else { get_argument(2) }; Command::new(config::EDITOR) .arg(format!("{}{}", name, config::EXTENSION)) .current_dir(&config::directory()) .status() .expect("Failed to open file."); }
#[test] fn test_range(){ get_range(0, 22766251, 1024*1204*2).unwrap(); } fn get_range(start:u64,end:u64,buffer_size:u32)->Result<(),&'static str>{ //let mut sb:Vec<&str>=Vec::new(); for range in BlockRangeIter::new(start,end,buffer_size)? { println!("{:?}",range); } Ok(()) } #[derive(Debug)] pub struct Range { pub prev_size:u64, pub range_str:String, } pub struct BlockRangeIter { start: u64, end: u64, buffer_size:u32, } impl BlockRangeIter { pub fn new(start:u64,end:u64,buffer_size:u32) ->Result<Self,&'static str> { if buffer_size == 0 { Err("无效")?; } Ok(BlockRangeIter { start, end, buffer_size, }) } } impl Iterator for BlockRangeIter { type Item = Range; fn next(&mut self) ->Option<Self::Item> { if self.start > self.end { None }else{ let prev_start = self.start; self.start += std::cmp::min(self.buffer_size as u64,self.end - self.start+1); //Some(Some(format!("bytes={}-{}",prev_start,self.start-1)).unwrap()) Some(Range{ prev_size:prev_start,range_str:format!("bytes={}-{}",prev_start,self.start-1)}) } } }
struct Point { x: f32, y: f32 } struct ScreenPoint { x: u32, y: u32, z: u16 } struct Color { r: u8, g: u8, b: u8, a: u8 } struct Vertex<'a> { x: u32, y: u32, z: u32, c: &'a Color } struct Triangle<'a> { v: [Vertex<'a>; 3] } struct Body<'a> { tri_list: Vec<Triangle<'a>>, x: f32, y: f32, z: f32 } fn main() { println!("Hello, world!"); }
//! Top-level Pool type, methods, and tests use super::trace::TxTraceMap; use super::types::{PoolEntry, TxPoolConfig}; use crate::tx_pool::orphan::OrphanPool; use crate::tx_pool::pending::PendingQueue; use crate::tx_pool::staging::StagingPool; use ckb_core::transaction::{OutPoint, ProposalShortId, Transaction}; use ckb_core::Cycle; use faketime::unix_time_as_millis; use jsonrpc_types::TxTrace; use log::trace; use lru_cache::LruCache; use numext_fixed_hash::H256; #[derive(Debug, Clone)] pub struct TxPool { pub(crate) config: TxPoolConfig, /// The short id that has not been proposed pub(crate) pending: PendingQueue, /// Tx pool that finely for commit pub(crate) staging: StagingPool, /// Orphans in the pool pub(crate) orphan: OrphanPool, /// cache for conflict transaction pub(crate) conflict: LruCache<ProposalShortId, PoolEntry>, /// trace record map pub(crate) trace: TxTraceMap, /// last txs updated timestamp pub(crate) last_txs_updated_at: u64, } impl TxPool { pub fn new(config: TxPoolConfig) -> TxPool { let cache_size = config.max_cache_size; let trace_size = config.trace.unwrap_or(0); let last_txs_updated_at = 0u64; TxPool { config, pending: PendingQueue::new(), staging: StagingPool::new(), orphan: OrphanPool::new(), conflict: LruCache::new(cache_size), last_txs_updated_at, trace: TxTraceMap::new(trace_size), } } pub fn pending_size(&self) -> u32 { self.pending.size() as u32 } pub fn staging_size(&self) -> u32 { self.staging.vertices.len() as u32 } pub fn orphan_size(&self) -> u32 { self.orphan.vertices.len() as u32 } // enqueue_tx inserts a new transaction into the non-verifiable transaction queue. pub fn enqueue_tx(&mut self, cycles: Option<Cycle>, tx: Transaction) -> bool { self.pending.add_tx(cycles, tx).is_none() } // trace_tx basically same as enqueue_tx, but additional register a trace. pub fn trace_tx(&mut self, tx: Transaction) -> bool { if self.config.trace_enable() { self.trace .add_pending(&tx.hash(), "unknown tx, insert to pending queue"); } self.pending.add_tx(None, tx).is_none() } pub fn get_tx_traces(&self, hash: &H256) -> Option<&Vec<TxTrace>> { self.trace.get(hash) } pub(crate) fn add_orphan( &mut self, cycles: Option<Cycle>, tx: Transaction, unknowns: Vec<OutPoint>, ) { trace!(target: "tx_pool", "add_orphan {:#x}", &tx.hash()); if self.config.trace_enable() { self.trace.add_orphan( &tx.hash(), format!("orphan tx, unknown inputs/deps {:?}", unknowns), ); } self.orphan.add_tx(cycles, tx, unknowns.into_iter()); } pub(crate) fn add_staging(&mut self, cycles: Cycle, tx: Transaction) { trace!(target: "tx_pool", "add_staging {:#x}", tx.hash()); if self.config.trace_enable() { self.trace.staged(&tx.hash(), "tx staged".to_string()); } self.touch_last_txs_updated_at(); self.staging.add_tx(cycles, tx); } pub(crate) fn remove_pending_and_conflict( &mut self, id: &ProposalShortId, ) -> Option<PoolEntry> { self.pending .remove(id) .or_else(|| self.conflict.remove(id)) .map(|entry| { if self.config.trace_enable() { self.trace .proposed(&entry.transaction.hash(), format!("{:?} proposed", id)); } entry }) } pub(crate) fn capacity(&self) -> usize { self.staging.capacity() + self.orphan.capacity() } pub(crate) fn touch_last_txs_updated_at(&mut self) { self.last_txs_updated_at = unix_time_as_millis(); } pub fn staging_txs_iter(&self) -> impl Iterator<Item = &PoolEntry> { self.staging.txs_iter() } pub fn contains_proposal_id(&self, id: &ProposalShortId) -> bool { self.pending.contains_key(id) || self.conflict.contains_key(id) || self.staging.contains_key(id) || self.orphan.contains_key(id) } pub fn get_entry(&self, id: &ProposalShortId) -> Option<&PoolEntry> { self.pending .get(id) .or_else(|| self.staging.get(id)) .or_else(|| self.orphan.get(id)) .or_else(|| self.conflict.get(id)) } pub fn get_tx(&self, id: &ProposalShortId) -> Option<Transaction> { self.pending .get_tx(id) .or_else(|| self.staging.get_tx(id)) .or_else(|| self.orphan.get_tx(id)) .or_else(|| self.conflict.get(id).map(|e| &e.transaction)) .cloned() } pub fn get_tx_from_staging(&self, id: &ProposalShortId) -> Option<Transaction> { self.staging.get_tx(id).cloned() } //FIXME: use memsize pub fn is_full(&self) -> bool { self.capacity() > self.config.max_pool_size } pub(crate) fn remove_committed_txs_from_staging<'a>( &mut self, txs: impl Iterator<Item = &'a Transaction>, ) { for tx in txs { let hash = tx.hash(); trace!(target: "tx_pool", "committed {:#x}", hash); if self.config.trace_enable() { self.trace.committed(&hash, "tx committed".to_string()); } self.staging.remove_committed_tx(tx); } } pub fn remove_expired<'a>(&mut self, ids: impl Iterator<Item = &'a ProposalShortId>) { for id in ids { if let Some(entries) = self.staging.remove(id) { if self.config.trace_enable() { for entry in entries { self.trace .expired(&entry.transaction.hash(), "tx proposal expired".to_string()); self.enqueue_tx(entry.cycles, entry.transaction); } } } } } }
pub mod t;
use std::fs::File; use std::io::prelude::*; #[derive(Deserialize, Debug)] pub struct ConfigStruct { pub server: ServerConf, pub postgres: PostgresConf, } #[derive(Deserialize, Debug)] pub struct ServerConf { pub address: String, } #[derive(Deserialize, Debug)] pub struct PostgresConf { pub connection: String, } pub fn init_config() -> ConfigStruct { let mut file = File::open("config/config.toml").unwrap(); let mut toml_content = String::new(); file.read_to_string(&mut toml_content).unwrap(); let config: ConfigStruct = toml::from_str(&toml_content).unwrap(); config }
#[cfg(test)] mod tests { use super::super::common::*; use actix_web::http::StatusCode; use serde_json; #[derive(Deserialize)] struct Configuration { locales: Vec<String>, } #[actix_rt::test] async fn test_get_configuration_without_token() { let (response, content) = get("/api/v1/configuration", None).await; assert_eq!(StatusCode::UNAUTHORIZED, response.status()); assert_eq!("", content) } #[actix_rt::test] async fn test_get_configuration_with_success() { let (response, content) = get("/api/v1/configuration", valid_token()).await; assert_eq!(StatusCode::OK, response.status()); let configuration = parse_configuration(&content); assert_eq!(5, configuration.locales.len()); } fn parse_configuration(content: &str) -> Configuration { serde_json::from_str(content).expect("Can’t parse configuration from content") } }
use super::signed_message::SignedMessageV1; use ic_agent::agent::ReplicaV2Transport; use ic_agent::{AgentError, RequestId}; use ic_types::Principal; use std::fs::File; use std::future::Future; use std::io::Write; use std::path::Path; use std::pin::Pin; use thiserror::Error; #[derive(Error, Debug)] enum SerializeStatus { #[error("{0}")] Success(String), } pub(crate) struct SignReplicaV2Transport { file_name: String, message_template: SignedMessageV1, } impl SignReplicaV2Transport { pub fn new<U: Into<String>>(file_name: U, message_template: SignedMessageV1) -> Self { Self { file_name: file_name.into(), message_template, } } } impl ReplicaV2Transport for SignReplicaV2Transport { fn read_state<'a>( &'a self, _effective_canister_id: Principal, _envelope: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, AgentError>> + Send + 'a>> { async fn run(_: &SignReplicaV2Transport) -> Result<Vec<u8>, AgentError> { Err(AgentError::MessageError( "read_state calls not supported".to_string(), )) } Box::pin(run(self)) } fn call<'a>( &'a self, _effective_canister_id: Principal, envelope: Vec<u8>, request_id: RequestId, ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'a>> { async fn run( s: &SignReplicaV2Transport, envelope: Vec<u8>, request_id: RequestId, ) -> Result<(), AgentError> { let message = s .message_template .clone() .with_call_type("update".to_string()) .with_request_id(request_id) .with_content(hex::encode(&envelope)); let json = serde_json::to_string(&message) .map_err(|x| AgentError::MessageError(x.to_string()))?; let path = Path::new(&s.file_name); let mut file = File::create(&path).map_err(|x| AgentError::MessageError(x.to_string()))?; file.write_all(json.as_bytes()) .map_err(|x| AgentError::MessageError(x.to_string()))?; Err(AgentError::TransportError( SerializeStatus::Success(format!("Update message generated at [{}]", &s.file_name)) .into(), )) } Box::pin(run(self, envelope, request_id)) } fn query<'a>( &'a self, _effective_canister_id: Principal, envelope: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, AgentError>> + Send + 'a>> { async fn run(s: &SignReplicaV2Transport, envelope: Vec<u8>) -> Result<Vec<u8>, AgentError> { let message = s .message_template .clone() .with_call_type("query".to_string()) .with_content(hex::encode(&envelope)); let json = serde_json::to_string(&message) .map_err(|x| AgentError::MessageError(x.to_string()))?; let path = Path::new(&s.file_name); let mut file = File::create(&path).map_err(|x| AgentError::MessageError(x.to_string()))?; file.write_all(json.as_bytes()) .map_err(|x| AgentError::MessageError(x.to_string()))?; Err(AgentError::TransportError( SerializeStatus::Success(format!("Query message generated at [{}]", &s.file_name)) .into(), )) } Box::pin(run(self, envelope)) } fn status<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, AgentError>> + Send + 'a>> { async fn run(_: &SignReplicaV2Transport) -> Result<Vec<u8>, AgentError> { Err(AgentError::MessageError( "status calls not supported".to_string(), )) } Box::pin(run(self)) } }
fn main() { let mut ret = nfq::Queue::open().unwrap(); ret.bind(std::env::args().nth(1).unwrap().parse().unwrap()).unwrap(); loop{ let ret0 = ret.recv().ok(); if let Some(mut ret0) = ret0{ let ret1 = { let from_etherparse_slicedpacket_to_owned_network_informations = ||{ let ret2 = ret0.get_payload(); let ret2 = etherparse::SlicedPacket::from_ip(ret2).ok(); let ret2 = match ret2{ Some(ret2)=>{ let ret3 = match ret2.ip{ Some(ret2)=>match ret2{ etherparse::InternetSlice::Ipv4(ret3)=>Some(ret3.to_header()), _=>None }, _=>None, }; let ret3 = match ret3{ Some(ret3)=>match ret2.transport{ Some(ret4)=>match ret4{ etherparse::TransportSlice::Tcp(ret4)=>Some((ret3, ret4.to_header())), _=>None }, _=>None }, _=>None }; let ret3 = match ret3{ Some(ret3)=>Some((ret3.0, ret3.1, ret2.payload)), _=>None, }; ret3 }, _=>None }; ret2 }; from_etherparse_slicedpacket_to_owned_network_informations() }; if let Some(ret1) = ret1{ let ret2 = { let split_http_payload_into_u8_header_and_body = ||{ let ret3 = ret1.2; let ret3 = { let ret4 = ret3.iter().fold((false, Vec::<u8>::new(), Vec::<u8>::new(), Vec::<u8>::new()), |mut p, v|{ const SEARCH : &[u8; 4] = b"\r\n\r\n"; p.1.push(*v); if p.1.len() == SEARCH.len(){ if &[p.1[0], p.1[1], p.1[2], p.1[3]] == SEARCH{ p.0 = true; } if p.0 == true { p.3.append(&mut p.1); } else { p.2.append(&mut p.1); } } p }); let ret4 = (ret4.2, ret4.3); ret4 }; ret3 }; split_http_payload_into_u8_header_and_body() }; let ret2 = { let split_http_payload_into_string_header_and_body = ||{ (String::from_utf8_lossy(&ret2.0), String::from_utf8_lossy(&ret2.1)) }; split_http_payload_into_string_header_and_body() }; let ret2 = { let split_http_payload_into_each_string_header_and_body = ||{ (ret2.0.split("\r\n").collect::<Vec::<_>>(), ret2.1.split("\r\n").collect::<Vec::<_>>()) }; split_http_payload_into_each_string_header_and_body() }; let ret2 = { let determine_if_http_html_and_no_encoding_so_we_able_to_reverse_it = ||{ let is_http = match ret2.0.iter().nth(0){ Some(x)=> match x.to_lowercase().starts_with("http"){ true=>Some(()), false=>None }, _=>None }.is_some(); let ret3 = ret2.0.iter().fold((false, true), |mut p, v|{ if v.to_lowercase().starts_with("content-type: text/html") { p.0 = true; } if v.to_lowercase().starts_with("content-encoding") { p.0 = false; } p }); let ret3 = is_http && ret3.0 && ret3.1; let ret3 = (ret2, ret3); ret3 }; determine_if_http_html_and_no_encoding_so_we_able_to_reverse_it() }; if ret2.1 { dbg!(&ret2.0.0); ret0.set_payload({ let ret3 = etherparse::PacketBuilder::ipv4(ret1.0.source, ret1.0.destination, ret1.0.time_to_live); let ret3 = ret3.tcp( ret1.1.source_port, ret1.1.destination_port, ret1.1.sequence_number, ret1.1.window_size ); let ret3 = if ret1.1.ns { ret3.ns() } else { ret3 }; let ret3 = if ret1.1.fin { ret3.fin() } else { ret3 }; let ret3 = if ret1.1.syn { ret3.syn() } else { ret3 }; let ret3 = if ret1.1.rst { ret3.rst() } else { ret3 }; let ret3 = if ret1.1.psh { ret3.psh() } else { ret3 }; let ret3 = if ret1.1.ack { ret3.ack(ret1.1.acknowledgment_number) } else { ret3 }; let ret3 = if ret1.1.urg { ret3.urg(ret1.1.urgent_pointer) } else { ret3 }; let ret3 = if ret1.1.ece { ret3.ece() } else { ret3 }; let ret3 = if ret1.1.cwr { ret3.cwr() } else { ret3 }; let mut ret3 = (ret3, vec![], { fn traverse(node: Option<ego_tree::NodeMut<scraper::Node>>) { match node { None => return, Some(mut n) => { traverse(n.first_child()); traverse(n.next_sibling()); if let scraper::Node::Text(text) = n.value().clone(){ n.insert_before(scraper::Node::Text(scraper::node::Text{text: tendril::format_tendril!("{}", String::from_utf8_lossy(&text.text.as_bytes().iter().rev().map(|v| *v).collect::<Vec::<_>>()))})); n.detach(); } } } } let mut ret4 = scraper::Html::parse_document(&ret2.0.1.join("\r\n")); traverse(Some(ret4.tree.root_mut())); let html = ret4.root_element().html(); let ret4 = format!("{}\r\n\r\n{}{}", ret2.0.0.join("\r\n"), html, ret4.errors.iter().fold(String::from(""), |mut p, v| format!("{}{}", p, v))); dbg!(&ret4); let ret4 = ret4.as_bytes().to_vec(); ret4 }); ret3.0.write(&mut ret3.1, &ret3.2); let ret3 = ret3.1; ret3 }); } } ret.verdict(ret0); } } }
extern crate ansi_term; #[macro_use] mod color_print; mod cpu; mod bios; mod mem; mod machine; mod hw; use std::io; use std::io::prelude::*; use std::string::String; use std::collections::HashMap; use std::env::args; use bios::BootDrive; extern crate rustc_serialize; extern crate docopt; use docopt::Docopt; const USAGE: &'static str = "Usage: riapyx [--boot=<drive>] [--hd=<image>] [--fd=<image>] riapyx [--help] Options: --help Display this message --hd=<img> Hard drive image --fd=<img> Floppy disk image --boot=<drive> Boot from floppy disk (fd) or hard drive (hd) [default: hd] "; #[derive(Debug, RustcDecodable)] struct Args { flag_hd: Option<String>, flag_fd: Option<String>, flag_boot: String } const ZERO_U8: u8 = '0' as u8; const NINE_U8: u8 = '9' as u8; const A_U8: u8 = 'a' as u8; const F_U8: u8 = 'f' as u8; fn u32_from_hex_str(s: &str) -> u32 { let mut res: u32 = 0; for c in s.as_bytes() { res *= 0x10; let to_add = match *c { ZERO_U8 ... NINE_U8 => c - ZERO_U8, A_U8 ... F_U8 => (c - A_U8) + 0xa, _ => panic!("Invalid hex string: {}", s) }; res += to_add as u32; } res } fn main() { let args: Args = Docopt::new(USAGE).and_then(|d| d.decode()).unwrap_or_else(|e| e.exit()); println!("Checking that integers are wrapping properly..."); let mut x: u8 = 255; x += 1; if x != 0 { panic!("No, they're not. (255+1) % 256 = {}", x); } println!("ok"); let boot_drive = match &args.flag_boot[..] { "fd" => BootDrive::Floppy, "hd" => BootDrive::HardDrive, _ => panic!("Unrecognized boot drive: '{}'. use 'hd' or 'fd'", args.flag_boot) }; match boot_drive { BootDrive::Floppy => { if let None = args.flag_fd { panic!("Booting from floppy disk, but no floppy image specified"); } }, BootDrive::HardDrive => { if let None = args.flag_hd { panic!("Booting from hard drive, but no hard drive image specified"); } } } let mut m = machine::Machine::new( boot_drive, args.flag_fd, args.flag_hd); m.dump(); let mut bkpt_addr: HashMap<i32, (u16, u16)> = HashMap::new(); let mut addr_bkpt: HashMap<(u16, u16), i32> = HashMap::new(); let mut next_bkpt_idx = 0; loop { print!("debug> "); io::stdout().flush().unwrap(); let mut cmd = String::new(); io::stdin().read_line(&mut cmd).unwrap(); let mut words = cmd.split_whitespace(); let cmd = words.next(); match cmd { Some("d") => { let args = (words.next(), words.next()); match args { (Some(seg_str), Some(addr_str)) => { let seg = u32_from_hex_str(seg_str) as u16; let addr = u32_from_hex_str(addr_str) as u16; m.print_memory(seg, addr, 16); }, _ => debug_print!("Usage: d [segment] [address]") } }, Some("u") => { let args = (words.next(), words.next()); match args { (Some(cs_str), Some(ip_str)) => { let cs = u32_from_hex_str(cs_str) as u16; let ip = u32_from_hex_str(ip_str) as u16; m.disas(cs, ip, 5); }, _ => debug_print!("Usage: u [segment] [address]") } }, Some("b") => { let args = (words.next(), words.next()); match args { (Some(cs_str), Some(ip_str)) => { let cs = u32_from_hex_str(cs_str) as u16; let ip = u32_from_hex_str(ip_str) as u16; bkpt_addr.insert(next_bkpt_idx, (cs, ip)); addr_bkpt.insert((cs, ip), next_bkpt_idx); debug_print!("Breakpoint {} set at {:04x}:{:04x}", next_bkpt_idx, cs, ip); next_bkpt_idx += 1; }, _ => debug_print!("Usage: b [segment] [address]") } } Some("w") => { let arg = words.next(); match arg { Some(fname) => { m.dump_memory_to_file(fname); }, _ => debug_print!("Usage: w [filename]") } } Some("ws") => { let args = (words.next(), words.next()); match args { (Some(seg), Some(fname)) => { m.dump_segment_to_file(u32_from_hex_str(seg), fname); }, _ => debug_print!("Usage: ws [seg] [filename]") } } Some("c") | Some("t") => { loop { m.step(); if cmd == Some("t") { m.dump_trace(); } if addr_bkpt.contains_key(&m.get_pc()) { let (cs, ip) = m.get_pc(); let idx = addr_bkpt.get(&(cs, ip)).expect("Broke with no breakpoint?"); debug_print!("Hit breakpoint #{} at {:04x}:{:04x}", idx, cs, ip); break; } if ! m.is_running() { debug_print!("Machine halted"); break; } } m.dump(); } Some("f") => { while m.is_running() { m.step(); } m.dump(); } Some("q") => std::process::exit(0), Some(s) => { debug_print!("Unknown command: {}", s) } None => { m.step(); m.dump(); } } } }
mod kind; mod value; mod scope; pub use self::kind::Kind; pub use self::scope::Scope; pub use self::value::Value;
use num_derive::FromPrimitive; use num_enum::IntoPrimitive; use num_traits::FromPrimitive; use bytes::{ Bytes, Buf, BytesMut, BufMut }; #[derive(FromPrimitive, IntoPrimitive, Debug, PartialEq, Copy, Clone)] #[repr(u8)] pub enum Command { Notification = 0x01, } #[derive(Debug, PartialEq, Clone)] pub enum DeviceLocallyReset { Notification, } impl DeviceLocallyReset { pub const CLASS : u8 = 0x5a; pub fn encode(&self, dst: &mut BytesMut) { match self { DeviceLocallyReset::Notification => { dst.put_u8(Command::Notification.into()); }, _ => panic!("Not supported {:?}", self) } } pub fn decode(src: &mut Bytes) -> DeviceLocallyReset { let command: Option<Command> = FromPrimitive::from_u8(src.get_u8()); return match command { Some(Command::Notification) => { DeviceLocallyReset::Notification }, _ => panic!("Do not support {:?}", command) } } }
use std::fs::File; use std::io::{BufRead, BufReader}; fn deal_new_stack(original : &mut Vec<usize>) { original.reverse(); } fn cut_n_cards(original : &mut Vec<usize>, n : i32) { let c = original.clone(); if n > 0 { let nn = n as usize; let bi = original.len() - nn; original[bi..].copy_from_slice(&c[0..nn]); original[0..bi].copy_from_slice(&c[nn..]); } else { let nn = -n as usize; let bi = original.len() - nn; original[0..nn].copy_from_slice(&c[bi..]); original[nn..].copy_from_slice(&c[0..bi]); } } fn deal_with_increment(original : &mut Vec<usize>, i : usize) { let c = original.clone(); let mut pos = 0; for j in 0..c.len() { original[pos] = c[j]; pos = (pos + i) % c.len(); } } fn main() { let filename = "src/input"; // Open the file in read-only mode (ignoring errors). let file = File::open(filename).unwrap(); let reader = BufReader::new(file); let mut shufle = Vec::new(); // Read the file line by line using the lines() iterator from std::io::BufRead. for (_, line) in reader.lines().enumerate() { let line = line.unwrap(); // Ignore errors. if line.trim().len() == 0 { break; } shufle.push(line); } // const MAX_CARD_COUNT : usize = 10; const MAX_CARD_COUNT : usize = 10007; let mut cards = Vec::new(); for i in 0..MAX_CARD_COUNT { cards.push(i); } for l in shufle.iter() { if l.starts_with("deal w") { let incr : usize = l[20..].parse().unwrap(); // println!("{}", incr); deal_with_increment(&mut cards, incr); } else if l.starts_with("cut") { let n : i32 = l[4..].parse().unwrap(); // println!("{}", n); cut_n_cards(&mut cards, n); } else if l.starts_with("deal i") { deal_new_stack(&mut cards); } else { unreachable!(); } } // println!("{:?}", cards); let i = cards.iter().position(|&a| a == 2019).unwrap(); println!("Card 2019 is in pos: {}", i); }
#[doc = "Register `RCC_AHB2RSTSETR` reader"] pub type R = crate::R<RCC_AHB2RSTSETR_SPEC>; #[doc = "Register `RCC_AHB2RSTSETR` writer"] pub type W = crate::W<RCC_AHB2RSTSETR_SPEC>; #[doc = "Field `DMA1RST` reader - DMA1RST"] pub type DMA1RST_R = crate::BitReader; #[doc = "Field `DMA1RST` writer - DMA1RST"] pub type DMA1RST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `DMA2RST` reader - DMA2RST"] pub type DMA2RST_R = crate::BitReader; #[doc = "Field `DMA2RST` writer - DMA2RST"] pub type DMA2RST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `DMAMUXRST` reader - DMAMUXRST"] pub type DMAMUXRST_R = crate::BitReader; #[doc = "Field `DMAMUXRST` writer - DMAMUXRST"] pub type DMAMUXRST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `ADC12RST` reader - ADC12RST"] pub type ADC12RST_R = crate::BitReader; #[doc = "Field `ADC12RST` writer - ADC12RST"] pub type ADC12RST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `USBORST` reader - USBORST"] pub type USBORST_R = crate::BitReader; #[doc = "Field `USBORST` writer - USBORST"] pub type USBORST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `SDMMC3RST` reader - SDMMC3RST"] pub type SDMMC3RST_R = crate::BitReader; #[doc = "Field `SDMMC3RST` writer - SDMMC3RST"] pub type SDMMC3RST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; impl R { #[doc = "Bit 0 - DMA1RST"] #[inline(always)] pub fn dma1rst(&self) -> DMA1RST_R { DMA1RST_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - DMA2RST"] #[inline(always)] pub fn dma2rst(&self) -> DMA2RST_R { DMA2RST_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2 - DMAMUXRST"] #[inline(always)] pub fn dmamuxrst(&self) -> DMAMUXRST_R { DMAMUXRST_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 5 - ADC12RST"] #[inline(always)] pub fn adc12rst(&self) -> ADC12RST_R { ADC12RST_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 8 - USBORST"] #[inline(always)] pub fn usborst(&self) -> USBORST_R { USBORST_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 16 - SDMMC3RST"] #[inline(always)] pub fn sdmmc3rst(&self) -> SDMMC3RST_R { SDMMC3RST_R::new(((self.bits >> 16) & 1) != 0) } } impl W { #[doc = "Bit 0 - DMA1RST"] #[inline(always)] #[must_use] pub fn dma1rst(&mut self) -> DMA1RST_W<RCC_AHB2RSTSETR_SPEC, 0> { DMA1RST_W::new(self) } #[doc = "Bit 1 - DMA2RST"] #[inline(always)] #[must_use] pub fn dma2rst(&mut self) -> DMA2RST_W<RCC_AHB2RSTSETR_SPEC, 1> { DMA2RST_W::new(self) } #[doc = "Bit 2 - DMAMUXRST"] #[inline(always)] #[must_use] pub fn dmamuxrst(&mut self) -> DMAMUXRST_W<RCC_AHB2RSTSETR_SPEC, 2> { DMAMUXRST_W::new(self) } #[doc = "Bit 5 - ADC12RST"] #[inline(always)] #[must_use] pub fn adc12rst(&mut self) -> ADC12RST_W<RCC_AHB2RSTSETR_SPEC, 5> { ADC12RST_W::new(self) } #[doc = "Bit 8 - USBORST"] #[inline(always)] #[must_use] pub fn usborst(&mut self) -> USBORST_W<RCC_AHB2RSTSETR_SPEC, 8> { USBORST_W::new(self) } #[doc = "Bit 16 - SDMMC3RST"] #[inline(always)] #[must_use] pub fn sdmmc3rst(&mut self) -> SDMMC3RST_W<RCC_AHB2RSTSETR_SPEC, 16> { SDMMC3RST_W::new(self) } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } } #[doc = "This register is used to activate the reset of the corresponding peripheral.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rcc_ahb2rstsetr::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rcc_ahb2rstsetr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct RCC_AHB2RSTSETR_SPEC; impl crate::RegisterSpec for RCC_AHB2RSTSETR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`rcc_ahb2rstsetr::R`](R) reader structure"] impl crate::Readable for RCC_AHB2RSTSETR_SPEC {} #[doc = "`write(|w| ..)` method takes [`rcc_ahb2rstsetr::W`](W) writer structure"] impl crate::Writable for RCC_AHB2RSTSETR_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets RCC_AHB2RSTSETR to value 0"] impl crate::Resettable for RCC_AHB2RSTSETR_SPEC { const RESET_VALUE: Self::Ux = 0; }
// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). use std::collections::{HashMap, HashSet, VecDeque}; use std::fs::File; use std::fs::OpenOptions; use std::io::{self, BufWriter, Write}; use std::path::{Path, PathBuf}; use std::sync::RwLock; use futures::future::{self, Future}; use externs; use core::FNV; use nodes::{ Context, ContextFactory, Failure, Node, NodeFuture, NodeKey, NodeResult, TryInto }; #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct EntryId(usize); pub type DepSet = HashSet<EntryId, FNV>; type EntryStateField = future::Shared<NodeFuture<NodeResult>>; trait EntryStateGetter { fn get<N: Node>(&self) -> NodeFuture<N::Output>; } impl EntryStateGetter for EntryStateField { fn get<N: Node>(&self) -> NodeFuture<N::Output> { self .clone() .then(|node_result| Entry::unwrap::<N>(node_result)) .boxed() } } /** * An Entry and its adjacencies. */ pub struct Entry { id: EntryId, // TODO: This is a clone of the Node, which is also kept in the `nodes` map. It would be // nice to avoid keeping two copies of each Node, but tracking references between the two // maps is painful. node: NodeKey, state: EntryStateField, // Sets of all Nodes which have ever been awaited by this Node. dependencies: DepSet, dependents: DepSet, // Deps that would be illegal to actually provide, since they would be cyclic. cyclic_dependencies: DepSet, } impl Entry { /** * Creates an Entry, wrapping its execution in `future::lazy` to defer execution until a * a caller actually pulls on it. This indirection exists in order to allow Nodes to start * outside of the Graph lock. */ fn new(id: EntryId, node: NodeKey, context: Context) -> Entry { let core = context.core(); let pool = core.pool(); Entry { id: id, node: node.clone(), state: future::Shared::new( pool.spawn_fn(move || { node.run(context) }) .boxed() ), dependencies: Default::default(), dependents: Default::default(), cyclic_dependencies: Default::default(), } } fn unwrap<N: Node>( res: Result<future::SharedItem<NodeResult>, future::SharedError<Failure>> ) -> Result<N::Output, Failure> { match res { Ok(nr) => Ok( nr.clone().try_into().unwrap_or_else(|_| { panic!("A Node implementation was ambiguous.") }) ), Err(failure) => Err(failure.clone()) } } /** * Returns a reference to the Node's Future. */ fn state(&self) -> EntryStateField { self.state.clone() } /** * If the Future for this Node has already completed, returns a clone of its result. */ fn peek<N: Node>(&self) -> Option<Result<N::Output, Failure>> { self.state().peek().map(|nr| Entry::unwrap::<N>(nr)) } fn dependencies(&self) -> &DepSet { &self.dependencies } fn dependents(&self) -> &DepSet { &self.dependents } fn cyclic_dependencies(&self) -> &DepSet { &self.cyclic_dependencies } fn format<N: Node>(&self) -> String { let state = match self.peek::<N>() { Some(Ok(ref nr)) => format!("{:?}", nr), Some(Err(Failure::Throw(ref v))) => externs::val_to_str(v), Some(Err(ref x)) => format!("{:?}", x), None => "<None>".to_string(), }; format!("{} == {}", self.node.format(), state).replace("\"", "\\\"") } } type Nodes = HashMap<NodeKey, EntryId, FNV>; type Entries = HashMap<EntryId, Entry, FNV>; struct InnerGraph { id_generator: usize, nodes: Nodes, entries: Entries, } impl InnerGraph { fn cyclic<T: Send + 'static>(&self) -> NodeFuture<T> { future::err(Failure::Noop("Dep would be cyclic.", None)).boxed() } fn entry(&self, node: &NodeKey) -> Option<&Entry> { self.nodes.get(node).map(|&id| self.entry_for_id(id)) } fn entry_for_id(&self, id: EntryId) -> &Entry { self.entries.get(&id).unwrap_or_else(|| panic!("Invalid EntryId: {:?}", id)) } fn entry_for_id_mut(&mut self, id: EntryId) -> &mut Entry { self.entries.get_mut(&id).unwrap_or_else(|| panic!("Invalid EntryId: {:?}", id)) } fn ensure_entry(&mut self, context: &ContextFactory, node: NodeKey) -> EntryId { InnerGraph::ensure_entry_internal( &mut self.entries, &mut self.nodes, &mut self.id_generator, context, node ) } fn ensure_entry_internal<'a>( entries: &'a mut Entries, nodes: &mut Nodes, id_generator: &mut usize, context_factory: &ContextFactory, node: NodeKey ) -> EntryId { // See TODO on Entry. let entry_node = node.clone(); let id = nodes.entry(node).or_insert_with(|| { EntryId(*id_generator) }).clone(); // If this was an existing entry, we're done.. if id.0 != *id_generator { return id; } // New entry. let context = context_factory.create(id); *id_generator += 1; entries.insert(id, Entry::new(id, entry_node, context)); id } /** * Detect whether adding an edge from src to dst would create a cycle. * * Returns true if a cycle would be created by adding an edge from src->dst. */ fn detect_cycle(&self, src_id: EntryId, dst_id: EntryId) -> bool { // Search either forward from the dst, or backward from the src. let (root, needle, dependents) = if self.entry_for_id(dst_id).dependencies().len() < self.entry_for_id(src_id).dependents().len() { (dst_id, src_id, false) } else { (src_id, dst_id, true) }; // Search for an existing path from dst to src. let mut roots = VecDeque::new(); roots.push_back(root); self.walk(roots, { |_| true }, dependents).any(|e| e.id == needle) } /** * Begins a topological Walk from the given roots. */ fn walk<P>(&self, roots: VecDeque<EntryId>, predicate: P, dependents: bool) -> Walk<P> where P: Fn(&Entry)->bool { Walk { graph: self, dependents: dependents, deque: roots, walked: HashSet::default(), predicate: predicate, } } /** * Begins a topological walk from the given roots. Provides both the current entry as well as the * depth from the root. */ fn leveled_walk<P>(&self, roots: VecDeque<EntryId>, predicate: P, dependents: bool) -> LeveledWalk<P> where P: Fn(&Entry, Level) -> bool { let rrr = roots.iter().map(|&r| (r, 0)).collect::<VecDeque<_>>(); LeveledWalk { graph: self, dependents: dependents, deque: rrr, walked: HashSet::default(), predicate: predicate, } } /** * Finds all Nodes with the given subjects, and invalidates their transitive dependents. */ fn invalidate(&mut self, paths: HashSet<PathBuf>) -> usize { // Collect all entries that will be deleted. let ids: HashSet<EntryId, FNV> = { let root_ids = self.nodes.iter() .filter_map(|(node, &entry_id)| { node.fs_subject().and_then(|path| { if paths.contains(path) { Some(entry_id) } else { None } }) }) .collect(); self.walk(root_ids, { |_| true }, true).map(|e| e.id).collect() }; // Then remove all entries in one shot. InnerGraph::invalidate_internal( &mut self.entries, &mut self.nodes, &ids, ); // And return the removed count. ids.len() } fn invalidate_internal(entries: &mut Entries, nodes: &mut Nodes, ids: &HashSet<EntryId, FNV>) { if ids.is_empty() { return; } for &id in ids { // Remove the entries from their dependencies' dependents lists. let dep_ids = entries[&id].dependencies.clone(); for dep_id in dep_ids { entries.get_mut(&dep_id).map(|entry| { entry.dependents.remove(&id); }); } // Validate that all dependents of the id are also scheduled for removal. assert!(entries[&id].dependents.iter().all(|dep| ids.contains(dep))); // Remove the entry itself. entries.remove(&id); } // Filter the Nodes to delete any with matching ids. let filtered: Vec<(NodeKey, EntryId)> = nodes.drain() .filter(|&(_, id)| !ids.contains(&id)) .collect(); nodes.extend(filtered); assert!( nodes.len() == entries.len(), "The Nodes and Entries maps are mismatched: {} vs {}", nodes.len(), entries.len() ); } pub fn visualize(&self, roots: &Vec<NodeKey>, path: &Path) -> io::Result<()> { let file = try!(File::create(path)); let mut f = BufWriter::new(file); let mut viz_colors = HashMap::new(); let viz_color_scheme = "set312"; let viz_max_colors = 12; let mut format_color = |entry: &Entry| { match entry.peek::<NodeKey>() { None | Some(Err(Failure::Noop(_, _))) => "white".to_string(), Some(Err(Failure::Throw(_))) => "4".to_string(), Some(Ok(_)) => { let viz_colors_len = viz_colors.len(); viz_colors.entry(entry.node.product_str()).or_insert_with(|| { format!("{}", viz_colors_len % viz_max_colors + 1) }).clone() }, } }; try!(f.write_all(b"digraph plans {\n")); try!(f.write_fmt(format_args!(" node[colorscheme={}];\n", viz_color_scheme))); try!(f.write_all(b" concentrate=true;\n")); try!(f.write_all(b" rankdir=TB;\n")); let root_entries = roots.iter().filter_map(|n| self.entry(n)).map(|e| e.id).collect(); let predicate = |_| true; for entry in self.walk(root_entries, |_| true, false) { let node_str = entry.format::<NodeKey>(); // Write the node header. try!(f.write_fmt(format_args!(" \"{}\" [style=filled, fillcolor={}];\n", node_str, format_color(entry)))); for (cyclic, adjacencies) in vec![(false, &entry.dependencies), (true, &entry.cyclic_dependencies)] { let style = if cyclic { " [style=dashed]" } else { "" }; for &dep_id in adjacencies { let dep_entry = self.entry_for_id(dep_id); if !predicate(dep_entry) { continue; } // Write an entry per edge. let dep_str = dep_entry.format::<NodeKey>(); try!(f.write_fmt(format_args!(" \"{}\" -> \"{}\"{}\n", node_str, dep_str, style))); } } } try!(f.write_all(b"}\n")); Ok(()) } pub fn trace(&self, root: &NodeKey, path: &Path) -> io::Result<()> { let file = try!(OpenOptions::new().append(true).open(path)); let mut f = BufWriter::new(file); let is_bottom = |entry: &Entry| -> bool { match entry.peek::<NodeKey>() { None | Some(Err(Failure::Noop(..))) => true, Some(Err(Failure::Throw(_))) => false, Some(Ok(_)) => true, } }; let is_one_level_above_bottom = |c: &Entry| -> bool { for d in &c.dependencies { if !is_bottom(self.entry_for_id(*d)) { return false; } } true }; let _indent = |level: u32| -> String { let mut indent = String::new(); for _ in 0..level { indent.push_str(" "); } indent }; let _format = |entry: &Entry, level: u32| -> String { let indent = _indent(level); let output = format!("{}Computing {}", indent, entry.node.format()); if is_one_level_above_bottom(entry) { let state_str = match entry.peek::<NodeKey>() { None => "<None>".to_string(), Some(Ok(ref x)) => format!("{:?}", x), Some(Err(Failure::Throw(ref x))) => format!("Throw({})", externs::val_to_str(x)), Some(Err(Failure::Noop(ref x, ref opt_node))) => format!("Noop({:?}, {:?})", x, opt_node), }; format!("{}\n{} {}", output, indent, state_str) } else { output } }; let root_entries = vec![root].iter().filter_map(|n| self.entry(n)).map(|e| e.id).collect(); for t in self.leveled_walk(root_entries, |e,_| !is_bottom(e), false) { let (entry, level) = t; try!(write!(&mut f, "{}\n", _format(entry, level))); for dep_entry in &entry.cyclic_dependencies { let indent= _indent(level); try!(write!(&mut f, "{}cycle for {:?}\n", indent, dep_entry)); } } try!(f.write_all(b"\n")); Ok(()) } } /** * A DAG (enforced on mutation) of Entries. */ pub struct Graph { inner: RwLock<InnerGraph>, } impl Graph { pub fn new() -> Graph { let inner = InnerGraph { id_generator: 0, nodes: HashMap::default(), entries: HashMap::default(), }; Graph { inner: RwLock::new(inner), } } pub fn len(&self) -> usize { let inner = self.inner.read().unwrap(); inner.entries.len() } /** * If the given Node has completed, returns a clone of its state. */ pub fn peek<N: Node>(&self, node: N) -> Option<Result<N::Output, Failure>> { let node = node.into(); let inner = self.inner.read().unwrap(); inner.entry(&node).and_then(|e| e.peek::<N>()) } /** * In the context of the given src Node, declare a dependency on the given dst Node and * begin its execution if it has not already started. * * TODO: Restore the invariant that completed Nodes may only depend on other completed Nodes * to make cycle detection cheaper. * * TODO: The vast majority of `get` calls will occur exactly once per src+dst, so double * checking a RwLock here is probably overkill. Should switch to Mutex and acquire once. */ pub fn get<N: Node>(&self, src_id: EntryId, context: &ContextFactory, dst_node: N) -> NodeFuture<N::Output> { let dst_node = dst_node.into(); // First, check whether the destination already exists, and the dep is already declared. let dst_state_opt = { let inner = self.inner.read().unwrap(); let src_entry = inner.entry_for_id(src_id); if let Some(dst_entry) = inner.entry(&dst_node) { if src_entry.dependencies().contains(&dst_entry.id) { // Declared and valid. Some(dst_entry.state()) } else if src_entry.cyclic_dependencies().contains(&dst_entry.id) { // Declared but cyclic. return inner.cyclic(); } else { // Exists, but isn't declared. None } } else { // Hasn't been created. None } }; // Got the destination's state. Now that we're outside the graph locks, we can safely // retrieve it. if let Some(dst_state) = dst_state_opt { return dst_state.get::<N>(); } // Get or create the destination, and then insert the dep and return its state. // TODO: doing cycle detection under the writelock... unfortunate, but probably unavoidable // without a much more complicated algorithm. let dst_state = { let mut inner = self.inner.write().unwrap(); let dst_id = inner.ensure_entry(context, dst_node.clone()); if inner.detect_cycle(src_id, dst_id) { inner.entry_for_id_mut(src_id).cyclic_dependencies.insert(dst_id); return inner.cyclic(); } else { inner.entry_for_id_mut(src_id).dependencies.insert(dst_id); let dst_entry = inner.entry_for_id_mut(dst_id); dst_entry.dependents.insert(src_id); dst_entry.state() } }; dst_state.get::<N>() } /** * Create the given Node if it does not already exist. */ pub fn create<N: Node>(&self, node: N, context: &ContextFactory) -> NodeFuture<N::Output> { // Initialize the state while under the lock... let state = { let mut inner = self.inner.write().unwrap(); let id = inner.ensure_entry(context, node.into()); inner.entry_for_id(id).state() }; // ...but only `get` it outside the lock. state.get::<N>() } pub fn invalidate(&self, paths: HashSet<PathBuf>) -> usize { let mut inner = self.inner.write().unwrap(); inner.invalidate(paths) } pub fn trace(&self, root: &NodeKey, path: &Path) -> io::Result<()> { let inner = self.inner.read().unwrap(); inner.trace(root, path) } pub fn visualize(&self, roots: &Vec<NodeKey>, path: &Path) -> io::Result<()> { let inner = self.inner.read().unwrap(); inner.visualize(roots, path) } } /** * Represents the state of a particular topological walk through a Graph. Implements Iterator and * has the same lifetime as the Graph itself. */ struct Walk<'a, P: Fn(&Entry)->bool> { graph: &'a InnerGraph, dependents: bool, deque: VecDeque<EntryId>, walked: HashSet<EntryId, FNV>, predicate: P, } impl<'a, P: Fn(&Entry)->bool> Iterator for Walk<'a, P> { type Item = &'a Entry; fn next(&mut self) -> Option<&'a Entry> { while let Some(id) = self.deque.pop_front() { if self.walked.contains(&id) { continue; } self.walked.insert(id); let entry = self.graph.entry_for_id(id); if !(self.predicate)(entry) { continue; } // Entry matches. if self.dependents { self.deque.extend(&entry.dependents); } else { self.deque.extend(&entry.dependencies); } return Some(entry); } None } } type Level = u32; /** * Represents the state of a particular topological walk through a Graph. Implements Iterator and * has the same lifetime as the Graph itself. */ struct LeveledWalk<'a, P: Fn(&Entry, Level)->bool> { graph: &'a InnerGraph, dependents: bool, deque: VecDeque<(EntryId, Level)>, walked: HashSet<EntryId, FNV>, predicate: P, } impl<'a, P: Fn(&Entry, Level)->bool> Iterator for LeveledWalk<'a, P> { type Item = (&'a Entry, Level); fn next(&mut self) -> Option<(&'a Entry, Level)> { while let Some((id, level)) = self.deque.pop_front() { if self.walked.contains(&id) { continue; } self.walked.insert(id); let entry = self.graph.entry_for_id(id); if !(self.predicate)(entry, level) { continue; } // Entry matches. if self.dependents { for d in &entry.dependents { self.deque.push_back((*d, level+1)); } } else { for d in &entry.dependencies { self.deque.push_back((*d, level+1)); } } return Some((entry, level)); } None } }
/* This is part of mktcb - which is under the MIT License ********************/ mod config; mod decompress; mod download; mod error; mod interrupt; mod linux; mod logging; mod patch; mod toolchain; mod uboot; mod util; // Traits --------------------------------------------------------------------- use std::io::Write; // ---------------------------------------------------------------------------- use snafu::{ResultExt}; use clap::{Arg, App, SubCommand}; use crate::error::Result; use log::*; use std::path::PathBuf; fn run(matches: &clap::ArgMatches) -> Result<()> { let config = config::new(&matches)?; let interrupt = interrupt::get()?; if let Some(matches) = matches.subcommand_matches("linux") { let mut agent = linux::new(&config, interrupt)?; if matches.is_present("check-update") { if agent.check_update()? { info!("A new version of the Linux kernel is available"); } else { std::process::exit(100); } } if matches.is_present("fetch") { agent.fetch()?; } if matches.is_present("reconfigure") { agent.reconfigure()?; } if matches.is_present("debpkg") { let toolchain = toolchain::new(&config)?; let result = agent.debpkg(&toolchain)?; let path = PathBuf::from(matches.value_of("debpkg").unwrap()); let mut file = std::fs::File::create(&path) .context(error::CreateFileError{path: path.clone()})?; for pkg in result { let val = pkg.to_str().unwrap(); writeln!(file, "{}", val) .context(error::FailedToWrite{path:path.clone()})?; } } if matches.occurrences_of("make") != 0 { // Retrive the make target to be run. It is a required argument, // so we can safely unwrap(). let target = matches.value_of("make").unwrap(); let toolchain = toolchain::new(&config)?; agent.make(target, &toolchain)?; } } else if let Some(matches) = matches.subcommand_matches("uboot") { let agent = uboot::new(&config, interrupt)?; if matches.is_present("fetch") { agent.fetch()?; } if matches.occurrences_of("make") != 0 { // Retrive the make target to be run. It is a required argument, // so we can safely unwrap(). let target = matches.value_of("make").unwrap(); let toolchain = toolchain::new(&config)?; agent.make(target, &toolchain)?; } } Ok(()) } fn main() { let matches = App::new("mktcb") .version("0.1.0") .author("Jean Guyomarc'h <jean@guyomarch.bzh>") .about("Build the Trusted Computing Base (TCB)") .arg(Arg::with_name("library") .short("L") .long("library") .value_name("DIR") .help("Set the path to the TCB library") .takes_value(true)) .arg(Arg::with_name("build_dir") .short("B") .long("build-dir") .value_name("DIR") .help("Set the path to the build directory") .takes_value(true)) .arg(Arg::with_name("download_dir") .short("D") .long("download-dir") .value_name("DIR") .help("Set the path to the download directory") .takes_value(true)) .arg(Arg::with_name("target") .short("t") .long("target") .value_name("TARGET") .required(true) .help("Name of the target to operate on") .takes_value(true)) .arg(Arg::with_name("jobs") .short("j") .long("jobs") .value_name("JOBS") .help("Set the number of parallel jobs to be used") .takes_value(true)) .subcommand(SubCommand::with_name("linux") .about("operations on the Linux kernel") .arg(Arg::with_name("make") .long("make") .value_name("TARGET") .default_value("all") .help("Run a make target in the Linux tree") .takes_value(true)) .arg(Arg::with_name("check-update") .long("check-update") .help("Check whether a new update is available on kernel.org. \ If no update is available, mkctb will exit with status 100.")) .arg(Arg::with_name("reconfigure") .long("reconfigure") .help("Re-generate the Linux .config from the target config")) .arg(Arg::with_name("debpkg") .long("debpkg") .conflicts_with("make") .help("Build the linux-image Debian package and integrates it to \ a meta-package for easy upgrade. The paths to these packages \ will be made available in the provided file (one by line)") .value_name("FILE") .takes_value(true)) .arg(Arg::with_name("fetch") .long("fetch") .help("Retrieve the latest version of the Linux kernel"))) .subcommand(SubCommand::with_name("uboot") .about("operations on the U-Boot") .arg(Arg::with_name("make") .long("make") .value_name("TARGET") .default_value("all") .help("Run a make target in the U-Boot tree") .takes_value(true)) .arg(Arg::with_name("fetch") .long("fetch") .help("Retrieve U-Boot"))) .get_matches(); if let Err(err) = logging::init(log::LevelFilter::Trace) { eprintln!("ERROR: {}", err); std::process::exit(3); }; match run(&matches) { Ok(()) => {}, Err(err) => { error!("{}", err); std::process::exit(2); } } }
use crate::fetcher::Fetcher; use std::default; #[derive(Default, Debug, Clone)] pub struct Quote { pub ticker: String, pub open: f32, pub high: f32, pub low: f32, pub price: f32, pub volume: u64, pub ltd: f32, pub previous_close: f32, pub change: f32, pub change_percent: f32, } #[derive(Default, Debug, Clone)] pub struct Equity { pub name: Option<String>, pub ticker: String, pub marketcap: Option<i32>, pub time_updated: Option<i32>, pub fivetwo_high: Option<f32>, pub fivetwo_low: Option<f32>, pub daily_volume: Option<i32>, pub owned_percent: Option<f32>, pub owned_shares: Option<u32>, pub global_quote: Option<Quote>, } impl Quote { fn new( ticker: String, open: f32, high: f32, low: f32, price: f32, volume: u64, ltd: f32, previous_close: f32, change: f32, change_percent: f32, ) -> Self { Quote { ticker, open, high, low, price, volume, ltd, previous_close, change, change_percent, } } } impl Equity { pub fn new(ticker: String) -> Self { Equity { name: None, ticker, marketcap: None, time_updated: None, fivetwo_high: None, fivetwo_low: None, daily_volume: None, owned_percent: None, owned_shares: None, global_quote: None, } } pub fn populate_price(&mut self, fetcher: &Fetcher) {} pub fn populate_overview(&mut self, fetcher: &Fetcher) {} pub fn print_price(&mut self) {} pub fn short_info() {} pub fn long_info() {} }
use rust_sodiumoxide_examples::hashing; fn main() { println!("Let the hashing begin!\n"); hashing::hash_timed(); }
//! Allocates and loads an given ELF buffer into memory at //! an offset // // Considerations // // We might want to consider keeping track of each segment loaded into memory and there type // given there size and there starting address, so when a page fault occurs we can reference // the tasks segment size to see if it is out of bounds or more memory can be allocated to it. // Also the way that this is set up, is meant for processes that are position independent executables use elfloader::{ElfLoader, TypeRela64}; use memory::{active_level_4_table, phys::FRAME_ALLOCATOR}; use x86_64::{ align_up, structures::paging::{ FrameAllocator, Mapper, Page, PageSize, PageTableFlags, RecursivePageTable, Size4KiB, }, VirtAddr, }; extern crate alloc; use alloc::vec::Vec; pub fn align_bin(bin: &[u8]) -> Vec<u8> { let mut vec = Vec::<u8>::new(); vec.resize(bin.len(), 0); vec.clone_from_slice(bin); vec } /// This struct represents a loaded ELF executable in memory starting at an /// offset. Using the [elfloader] crate we allocate memory for the elf /// and load the elf into the new memory section at a given offset pub struct ElfMemory { /// Virtual base where the elf mapping starts at vbase: u64, } impl ElfMemory { /// Create a new ElfMemory at an offset in virtual memory pub fn new(vbase: u64) -> Self { Self { vbase } } /// Get a reference to loaded elf base memory address. pub fn vbase(&self) -> &u64 { &self.vbase } } impl ElfLoader for ElfMemory { /// Allocate the required memory for the elf from the offset /// for each of the loadable elf header fn allocate( &mut self, load_headers: elfloader::LoadableHeaders, ) -> Result<(), elfloader::ElfLoaderErr> { let mut current_pt = RecursivePageTable::new(active_level_4_table()).unwrap(); for header in load_headers { let _flags = header.flags(); let ptf = PageTableFlags::PRESENT | PageTableFlags::WRITABLE; let start = self.vbase + header.virtual_addr(); let end = align_up(start + header.mem_size(), Size4KiB::SIZE); let start_virt = VirtAddr::new(start); let end_virt = VirtAddr::new(end - 1); let start_page = Page::<Size4KiB>::containing_address(start_virt); let end_page = Page::<Size4KiB>::containing_address(end_virt); let page_range = Page::range_inclusive(start_page, end_page); for page in page_range { let frame = FRAME_ALLOCATOR.wait().unwrap().allocate_frame().unwrap(); unsafe { let result = current_pt.map_to_with_table_flags( page, frame, ptf, PageTableFlags::PRESENT | PageTableFlags::WRITABLE, FRAME_ALLOCATOR.wait().as_mut().unwrap(), ); match result { Ok(mapper_flush) => mapper_flush.flush(), Err(err) => panic!("{:#?} => {:#?}", page, err), } } } } Ok(()) } /// Load the elf segment from the static memory location /// into the buffer obtained from allocate fn load( &mut self, flags: elfloader::Flags, base: elfloader::VAddr, region: &[u8], ) -> Result<(), elfloader::ElfLoaderErr> { let start = self.vbase + base; let start_ptr = start as *mut u8; for (offset, entry) in region.iter().enumerate() { unsafe { *(start_ptr.add(offset)) = *entry; } } Ok(()) } /// TODO fn relocate( &mut self, entry: &elfloader::Rela<elfloader::P64>, ) -> Result<(), elfloader::ElfLoaderErr> { let typ = TypeRela64::from(entry.get_type()); let addr: *mut u64 = (self.vbase + entry.get_offset()) as *mut u64; match typ { TypeRela64::R_RELATIVE => { unsafe { *addr = self.vbase() + entry.get_addend() }; Ok(()) } _ => todo!("{:#?} else not yet implemented", typ) } } }
pub use xi_unicode::LineBreakLeafIter; use super::font::{ create_font_properties, Font, FontCacheKey, FontContext, FontProperties, GlyphBrushFont, PxScale, ScaleFont, }; use super::{BoxType, LayoutBox}; use crate::dom::NodeType; use crate::font_list::fallback_font_families; use crate::str::char_is_whitespace; use crate::style::StyledNode; use std::ops::Range; use unicode_script::Script; #[derive(Debug, Clone, PartialEq)] pub enum TextFlags { SuppressLineBreakBefore, } #[derive(Debug, Clone)] pub struct TextNode<'a> { pub styled_node: &'a StyledNode<'a>, pub range: Range<usize>, pub text_run: TextRun, pub flags: Vec<TextFlags>, } impl<'a> TextNode<'a> { fn new( styled_node: &'a StyledNode<'a>, text_run: TextRun, flags: Vec<TextFlags>, ) -> TextNode<'a> { TextNode { styled_node, range: 0..text_run.glyphs.len(), text_run, flags, } } pub fn get_text(&self) -> String { let mut s = String::new(); for glyph in &self.text_run.glyphs[self.range.clone()] { s.push_str(&self.text_run.text[glyph.range.clone()]); } s } pub fn calculate_split_position( &mut self, max_width: f32, remaining_width: f32, font: &Font, font_context: &mut FontContext, ) -> Option<(Option<SplitInfo>, Option<SplitInfo>)> { let mut total_width = 0.0; let font_ref = font.as_ref(font_context); let glyphs_iter = self.text_run.glyphs[self.range.clone()].iter(); let glyphs_length = glyphs_iter.len(); let mut break_normal_position: Option<usize> = None; // No break because it calculate total width for (i, glyph) in glyphs_iter.enumerate() { let text = &self.text_run.text[glyph.range.clone()]; let scaled_font = font_ref.as_scaled(PxScale::from(font.size)); for c in text.chars() { let advanced_width = scaled_font.h_advance(scaled_font.glyph_id(c)); total_width += advanced_width; if total_width > remaining_width && break_normal_position.is_none() { break_normal_position = Some(i); } } if break_normal_position.is_some() { break; } } let idx = match break_normal_position { Some(idx) => idx, None => { return Some(( None, Some(SplitInfo::new(self.range.start..self.range.end, true)), )) } }; if idx == 0 && total_width > max_width { return Some(( Some(SplitInfo::new(self.range.start..self.range.end, true)), None, )); } if idx == 0 && self.text_run.has_start && self.flags.contains(&TextFlags::SuppressLineBreakBefore) { return None; } let break_point = idx + self.range.start; if idx == glyphs_length - 1 { if let Some(glyph) = self.text_run.glyphs.get(break_point) { if glyph.glyph_store.is_whitespace { return Some(( Some(SplitInfo::new(self.range.start..break_point, false)), None, )); } } } if idx == 0 { if let Some(glyph) = self.text_run.glyphs.get(break_point) { if glyph.glyph_store.is_whitespace { return Some(( None, Some(SplitInfo::new(break_point + 1..self.range.end, true)), )); } } } if idx == 0 && self.text_run.has_start { return Some(( None, Some(SplitInfo::new(self.range.start..self.range.end, true)), )); } let inline_start = SplitInfo::new(self.range.start..break_point, false); let mut inline_end = None; if break_point != self.range.end { inline_end = Some(SplitInfo::new(break_point..self.range.end, false)); } Some((Some(inline_start), inline_end)) } } #[derive(Clone)] pub struct SplitInfo { pub range: Range<usize>, pub is_hidden: bool, } impl SplitInfo { pub fn new(range: Range<usize>, is_hidden: bool) -> SplitInfo { SplitInfo { range, is_hidden } } } impl Default for SplitInfo { fn default() -> SplitInfo { SplitInfo::new(0..0, false) } } struct RunInfo { pub text: String, pub font: Font, } #[derive(Debug, Clone)] pub struct GlyphStore { pub is_whitespace: bool, } impl GlyphStore { fn new(is_whitespace: bool) -> GlyphStore { GlyphStore { is_whitespace } } } #[derive(Debug, Clone)] pub struct GlyphRun { pub glyph_store: GlyphStore, pub range: Range<usize>, } impl GlyphRun { fn new(glyph_store: GlyphStore, range: Range<usize>) -> GlyphRun { GlyphRun { glyph_store, range } } } #[derive(Debug, Clone)] pub struct TextRun { pub text: String, pub descriptor: FontProperties, pub size: f32, pub font: Font, pub cache_key: FontCacheKey, pub glyphs: Vec<GlyphRun>, pub has_start: bool, } impl TextRun { pub fn new( text: String, size: f32, descriptor: FontProperties, font: Font, breaker: &mut Option<LineBreakLeafIter>, has_start: bool, ) -> (TextRun, bool) { let (glyphs, break_at_zero) = TextRun::split_with_line_break_opportunity(&text, breaker); ( TextRun { cache_key: FontCacheKey::new(size, descriptor, font.family_name.clone()), text, size, descriptor, font, glyphs, has_start, }, break_at_zero, ) } fn split_with_line_break_opportunity( text: &str, breaker: &mut Option<LineBreakLeafIter>, ) -> (Vec<GlyphRun>, bool) { let mut glyphs = vec![]; let mut slice = 0..0; let mut finished = false; let mut break_at_zero = false; if breaker.is_none() { if text.is_empty() { return (glyphs, true); } *breaker = Some(LineBreakLeafIter::new(text, 0)); } let breaker = breaker.as_mut().unwrap(); while !finished { let (idx, _is_hard_break) = breaker.next(text); if idx == text.len() { finished = true; } if idx == 0 { break_at_zero = true; } // Extend the slice to the next UAX#14 line break opportunity. slice.end = idx; let word = &text[slice.clone()]; // Split off any trailing whitespace into a separate glyph run. let mut whitespace = slice.end..slice.end; if let Some((i, _)) = word .char_indices() .rev() .take_while(|&(_, c)| char_is_whitespace(c)) .last() { whitespace.start = slice.start + i; slice.end = whitespace.start; } else { // TODO: Support break-word: keep-all; } if !slice.is_empty() { glyphs.push(GlyphRun::new(GlyphStore::new(false), slice.clone())); } if !whitespace.is_empty() { glyphs.push(GlyphRun::new(GlyphStore::new(true), whitespace.clone())); } slice.start = whitespace.end; } (glyphs, break_at_zero) } pub fn scan_for_runs<'a>( layout_box: &mut LayoutBox<'a>, styled_node: &'a StyledNode<'a>, font_context: &mut FontContext, last_whitespace: &mut bool, breaker: &mut Option<LineBreakLeafIter>, ) { let content = match &styled_node.node.node_type { NodeType::Text(text) => text, _ => unreachable!(), }; let descriptor = create_font_properties(styled_node); let size = styled_node.font_size(); let families = styled_node.font_family(); let mut script = Script::Common; let mut font: Option<Font> = None; let mut run_info_list = vec![]; let (mut start_pos, mut end_pos) = (0, 0); for (_, ch) in content.char_indices() { if !ch.is_control() { let has_glyph = |font: &Font| font.glyph_index(ch).is_some(); let new_script = Script::from(ch); let compatible_script = is_compatible(new_script, script); if compatible_script && !is_specific(script) && is_specific(new_script) { // Initialize Script::Common to new_script, if new_script is specific script = new_script; } let new_font = families .iter() .map(|family| { let key = FontCacheKey::new(size, descriptor, family.clone()); font_context.get_or_create_by(&key) }) .find(has_glyph); let new_font = if new_font.is_some() { new_font } else { fallback_font_families(Some(ch)) .into_iter() .map(|family| { let key = FontCacheKey::new(size, descriptor, family); font_context.get_or_create_by(&key) }) .find(has_glyph) }; let has_font = match &font { Some(font) => match &new_font { Some(new_font) => font.family_name == new_font.family_name, None => false, }, None => false, }; let is_flush = !has_font || !compatible_script; if is_flush { if end_pos > 0 { if let Some(font) = font { run_info_list.push(RunInfo { text: transform_text( content, &mut start_pos, end_pos, last_whitespace, ), font, }); } } font = new_font; script = new_script; } } end_pos += ch.len_utf8(); } if start_pos != end_pos { run_info_list.push(RunInfo { text: transform_text(content, &mut start_pos, end_pos, last_whitespace), font: font.unwrap(), }); } for (i, run) in run_info_list.into_iter().enumerate() { let mut flags = vec![]; let (text_run, break_at_zero) = TextRun::new(run.text, size, descriptor, run.font, breaker, i == 0); if !break_at_zero && i == 0 { flags.push(TextFlags::SuppressLineBreakBefore); } let child = LayoutBox::new(BoxType::TextNode(TextNode::new( styled_node, text_run, flags, ))); layout_box.get_inline_container().children.push(child); } } } fn is_compatible(new: Script, old: Script) -> bool { new == old || !is_specific(new) || !is_specific(old) } fn is_specific(script: Script) -> bool { script != Script::Common && script != Script::Inherited } fn transform_text( content: &str, start_pos: &mut usize, end_pos: usize, last_whitespace: &mut bool, ) -> String { let mut text = String::new(); let sliced_content = &content[(*start_pos)..end_pos]; for ch in sliced_content.chars() { let is_whitespace = is_in_whitespace(ch); if !is_whitespace { text.push(ch); } else if !*last_whitespace { text.push(' '); } *last_whitespace = is_whitespace; } *start_pos = end_pos; text } // TODO: check white_space property value fn is_in_whitespace(ch: char) -> bool { match ch { ' ' => true, '\t' => true, '\n' => true, ' ' => true, _ => false, } }
use super::{vote::BroadcastVote, Connect, Disconnect}; use crate::websocket::WsClient; use actix::prelude::*; use std::collections::HashSet; use tracing::{debug, info}; // Actor pub struct BroadcastActor { clients: HashSet<Addr<WsClient>>, } impl BroadcastActor { pub fn new() -> Self { BroadcastActor { clients: HashSet::new(), } } } impl Default for BroadcastActor { fn default() -> Self { unimplemented!( "Broadcast actor can't be unitialized using default because it needs a logger" ) } } impl Actor for BroadcastActor { type Context = Context<Self>; fn started(&mut self, _ctx: &mut Self::Context) { info!("Broadcast actor started"); } } impl Handler<Connect> for BroadcastActor { type Result = <Connect as Message>::Result; fn handle(&mut self, msg: Connect, _ctx: &mut Context<Self>) -> Self::Result { debug!("Adding new client to broadcast"); self.clients.insert(msg.addr); Ok(()) } } impl Handler<Disconnect> for BroadcastActor { type Result = (); fn handle(&mut self, msg: Disconnect, _ctx: &mut Context<Self>) -> Self::Result { debug!("Removing client from broadcast"); self.clients.remove(&msg.addr); } } macro_rules! broadcast_handler { ($message_type:ident) => { impl Handler<$message_type> for BroadcastActor { type Result = (); fn handle(&mut self, msg: $message_type, _ctx: &mut Context<Self>) -> Self::Result { debug!( "Broadcasting {type} to clients. Number of clients: {clients}", type = stringify!($message_type), clients = self.clients.len() ); for client in &self.clients { client.do_send(msg.clone()); } } } }; } broadcast_handler!(BroadcastVote); impl SystemService for BroadcastActor {} impl Supervised for BroadcastActor {}
pub mod enums; pub mod file; pub mod macros; pub mod rust; pub mod thread; pub use file::read_username_from_file_match; pub use file::read_username_from_file_question; pub use rust::plus_one;
use void::Void; use util::ConstDefault; use arm::{irq, IrqHandler, STACK_START, start}; use core::ptr; pub type VectorTable<I> = irq::VectorTable<ExceptionVectors, I>; pub extern fn cortex_m0_isr() { unsafe { asm!(" .thumb_func .global __default_isr_handler __default_isr_handler: bkpt b . "::::"volatile"); } } #[repr(C)] pub struct ExceptionVectors { pub initial_sp: *const Void, pub reset: IrqHandler, pub nmi: IrqHandler, pub hard_fault: IrqHandler, pub memory_fault: IrqHandler, pub bus_fault: IrqHandler, pub usage_fault: IrqHandler, pub reserved_7: [IrqHandler; 4], pub svcall: IrqHandler, pub reserved_12: [IrqHandler; 2], pub pendsv: IrqHandler, pub systick: IrqHandler, } impl ConstDefault for ExceptionVectors { const DEFAULT: ExceptionVectors = ExceptionVectors { initial_sp: STACK_START, reset: IrqHandler::new(start as *const _), nmi: IrqHandler::DEFAULT, hard_fault: IrqHandler::DEFAULT, memory_fault: IrqHandler::DEFAULT, bus_fault: IrqHandler::DEFAULT, usage_fault: IrqHandler::DEFAULT, reserved_7: [IrqHandler::DEFAULT; 4], svcall: IrqHandler::DEFAULT, reserved_12: [IrqHandler::DEFAULT; 2], pendsv: IrqHandler::DEFAULT, systick: IrqHandler::DEFAULT, }; } #[repr(C)] #[derive(Debug)] pub struct IrqContext { pub r0: usize, pub r1: usize, pub r2: usize, pub r3: usize, pub r12: usize, pub lr: usize, pub pc: *mut u16, pub x_psr: usize, } impl IrqContext { pub fn sp(&mut self) -> *mut Void { unsafe { (self as *mut _).offset(1) as *mut _ } } pub unsafe fn svc(&self) -> u8 { *self.pc.offset(-1) as u8 } } impl ConstDefault for IrqContext { const DEFAULT: IrqContext = IrqContext { r0: 0, r1: 0, r2: 0, r3: 0, r12: 0, lr: 0, pc: ptr::null_mut(), x_psr: 0, }; } impl Default for IrqContext { fn default() -> Self { ConstDefault::DEFAULT } }
use std::collections::{HashMap, HashSet}; enum Command { On, Toggle, Off, } struct Instruction { x0: u32, y0: u32, x1: u32, y1: u32, command: Command, } const ON: &str = "turn on "; const TOGGLE: &str = "toggle "; const OFF: &str = "turn off "; impl std::str::FromStr for Instruction { type Err = (); fn from_str(mut s: &str) -> Result<Self, Self::Err> { let command = if s.starts_with(ON) { s = s.trim_start_matches(ON); Command::On } else if s.starts_with(TOGGLE) { s = s.trim_start_matches(TOGGLE); Command::Toggle } else if s.starts_with(OFF) { s = s.trim_start_matches(OFF); Command::Off } else { unreachable!() }; let mut parts = s.split(" through "); let mut coord0 = parts.next().unwrap().split(','); let x0 = coord0.next().unwrap().parse().unwrap(); let y0 = coord0.next().unwrap().parse().unwrap(); let mut coord1 = parts.next().unwrap().split(','); let x1 = coord1.next().unwrap().parse().unwrap(); let y1 = coord1.next().unwrap().parse().unwrap(); Ok(Self { x0, y0, x1, y1, command, }) } } fn main() { let input: Vec<Instruction> = std::fs::read_to_string("input").unwrap() .lines() .map(|l| l.parse().unwrap()) .collect(); part1(&input); part2(&input); } fn part1(input: &[Instruction]) { let mut grid = HashSet::new(); for instr in input.iter() { for x in instr.x0..=instr.x1 { for y in instr.y0..=instr.y1 { match instr.command { Command::On => { grid.insert((x, y)); } Command::Toggle => { if grid.contains(&(x, y)) { grid.remove(&(x, y)); } else { grid.insert((x, y)); } } Command::Off => { grid.remove(&(x, y)); } } } } } println!("{}", grid.len()); } fn part2(input: &[Instruction]) { let mut grid: HashMap<_, u32> = HashMap::new(); for instr in input.iter() { for x in instr.x0..=instr.x1 { for y in instr.y0..=instr.y1 { match instr.command { Command::On => *grid.entry((x, y)).or_insert(0) += 1, Command::Toggle => *grid.entry((x, y)).or_insert(0) += 2, Command::Off => { let e = grid.entry((x, y)).or_insert(0); *e = e.saturating_sub(1); } } } } } let total: u32 = grid.values().sum(); println!("{}", total); }
// Copyright 2018 The Exonum Team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //! Traits for core crypto primitives used in `PwBox`. use anyhow::Error; use hex_buffer_serde::{Hex as _, HexForm}; use serde::{Deserialize, Serialize}; use core::{fmt, marker::PhantomData}; use crate::alloc::{Box, Vec}; /// Key derivation function (KDF). /// /// An instance of `DeriveKey` implementation corresponds to a particular set of difficulty params /// of a particular KDF. /// /// # Implementation notes /// /// If you want to use a `DeriveKey` implementation with an [`Eraser`](crate::Eraser), it should /// additionally implement the following traits: /// /// - [`Default`] (should return a KDF instance with reasonable difficulty params) /// - [`Clone`] /// - [`Serialize`] / [`Deserialize`] from `serde` pub trait DeriveKey: 'static { /// Returns byte size of salt supplied to the KDF. fn salt_len(&self) -> usize; /// Derives a key from the given password and salt. /// /// # Safety /// /// When used within `PwBox`, `salt` is guaranteed to have the correct size. fn derive_key(&self, buf: &mut [u8], password: &[u8], salt: &[u8]) -> Result<(), Error>; } impl DeriveKey for Box<dyn DeriveKey> { fn salt_len(&self) -> usize { (**self).salt_len() } fn derive_key(&self, buf: &mut [u8], password: &[u8], salt: &[u8]) -> Result<(), Error> { (**self).derive_key(buf, password, salt) } } /// Error corresponding to MAC mismatch in [`Cipher::open()`]. #[derive(Debug, Clone, Default)] pub struct MacMismatch; impl fmt::Display for MacMismatch { fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { formatter.write_str("MAC mismatch") } } #[cfg(feature = "std")] impl std::error::Error for MacMismatch {} /// Authenticated symmetric cipher. pub trait Cipher: 'static { /// Byte size of a key. const KEY_LEN: usize; /// Byte size of a nonce (aka initialization vector, or IV). const NONCE_LEN: usize; /// Byte size of a message authentication code (MAC). const MAC_LEN: usize; /// Encrypts `message` with the provided `key` and `nonce`. /// /// # Safety /// /// When used within [`PwBox`](crate::PwBox), `key` and `nonce` are guaranteed /// to have correct sizes. fn seal(message: &[u8], nonce: &[u8], key: &[u8]) -> CipherOutput; /// Decrypts `encrypted` message with the provided `key` and `nonce` and stores /// the result into `output`. If the MAC does not verify, returns an error. /// /// # Safety /// /// When used within [`PwBox`](crate::PwBox), `key`, `nonce`, `encrypted.mac` and `output` /// are guaranteed to have correct sizes. fn open( output: &mut [u8], encrypted: &CipherOutput, nonce: &[u8], key: &[u8], ) -> Result<(), MacMismatch>; } /// Helper for converting `Cipher`s into `ObjectSafeCipher`s. #[derive(Debug)] pub(crate) struct CipherObject<T>(PhantomData<T>); impl<T> Default for CipherObject<T> { fn default() -> Self { CipherObject(PhantomData) } } /// Object-safe equivalent of a `Cipher`. pub(crate) trait ObjectSafeCipher: 'static { fn key_len(&self) -> usize; fn nonce_len(&self) -> usize; fn mac_len(&self) -> usize; fn seal(&self, message: &[u8], nonce: &[u8], key: &[u8]) -> CipherOutput; fn open( &self, output: &mut [u8], encrypted: &CipherOutput, nonce: &[u8], key: &[u8], ) -> Result<(), MacMismatch>; } /// Output of a `Cipher`. #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CipherOutput { /// Encrypted data. Has the same size as the original data. #[serde(with = "HexForm")] pub ciphertext: Vec<u8>, /// Message authentication code for the `ciphertext`. #[serde(with = "HexForm")] pub mac: Vec<u8>, } impl<T: Cipher> ObjectSafeCipher for CipherObject<T> { fn key_len(&self) -> usize { T::KEY_LEN } fn nonce_len(&self) -> usize { T::NONCE_LEN } fn mac_len(&self) -> usize { T::MAC_LEN } fn seal(&self, message: &[u8], nonce: &[u8], key: &[u8]) -> CipherOutput { T::seal(message, nonce, key) } fn open( &self, output: &mut [u8], encrypted: &CipherOutput, nonce: &[u8], key: &[u8], ) -> Result<(), MacMismatch> { T::open(output, encrypted, nonce, key) } } impl ObjectSafeCipher for Box<dyn ObjectSafeCipher> { fn key_len(&self) -> usize { (**self).key_len() } fn nonce_len(&self) -> usize { (**self).nonce_len() } fn mac_len(&self) -> usize { (**self).mac_len() } fn seal(&self, message: &[u8], nonce: &[u8], key: &[u8]) -> CipherOutput { (**self).seal(message, nonce, key) } fn open( &self, output: &mut [u8], encrypted: &CipherOutput, nonce: &[u8], key: &[u8], ) -> Result<(), MacMismatch> { (**self).open(output, encrypted, nonce, key) } }
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Common definitions for resource monitors. //! //! # Summary //! //! This module defines the common elements surrounding resource monitors. //! Monitors are intended to be discrete units for capturing details around //! resource usage and reporting them back. The elements found in this module //! are intended only for the monitors and therefore seperate from other //! definitions, such as the monitor MessageHub, which is used by other entities //! like agents. use crate::internal::monitor; use futures::future::BoxFuture; use std::sync::Arc; /// `Context` is passed to monitors through [`GenerateMonitor`] to provide /// the necessary facilities to connect and listen to various aspects of the /// setting service. It is expected that there will be new additions to /// `Context` as the variety of monitored resources expands. #[derive(Clone)] pub struct Context { pub monitor_messenger_factory: monitor::message::Factory, } /// `GenerateMonitor` defines the closure for generating a monitor. This is /// passed into the setting service's environment builder to specify a /// participating monitor. pub type GenerateMonitor = Arc<dyn Fn(Context) -> BoxFuture<'static, Result<(), anyhow::Error>> + Send + Sync>;
//! Error management //! //! there are two ways to handle errors in nom. The first one, //! activated by default, uses the `nom::ErrorKind<E=u32>` enum //! in the error branch of `IResult`. This enum can hold either //! a parser specific error code, or a custom error type you //! specify. //! //! If you need more advanced error management, you can activate //! the "verbose-errors" compilation feature, which will give you //! the error system available in nom 1.0. The verbose errors //! accumulate error codes and positions as you backtrack through //! the parser tree. From there, you can precisely identify which //! parts of the input triggered the error case. //! //! Please note that the verbose error management is a bit slower //! than the simple one. use util::ErrorKind; use internal::{IResult, IError}; use internal::IResult::*; /// Contains the error that a parser can return /// /// If you use the `verbose-errors` compilation feature, /// `nom::Err` will be the enum defined here, /// otherwise, it will amount to a `ErrorKind<E=u32>`. /// /// It can represent a linked list of errors, indicating the path taken in the parsing tree, with corresponding position in the input data. /// It depends on P, the input position (for a &[u8] parser, it would be a &[u8]), and E, the custom error type (by default, u32) #[derive(Debug,PartialEq,Eq,Clone)] pub enum Err<P,E=u32>{ /// An error code, represented by an ErrorKind, which can contain a custom error code represented by E Code(ErrorKind<E>), /// An error code, and the next error Node(ErrorKind<E>, Vec<Err<P,E>>), /// An error code, and the input position Position(ErrorKind<E>, P), /// An error code, the input position and the next error NodePosition(ErrorKind<E>, P, Vec<Err<P,E>>) } impl<I,O,E> IResult<I,O,E> { /// Maps a `IResult<I, O, E>` to `IResult<I, O, N>` by appling a function /// to a contained `Error` value, leaving `Done` and `Incomplete` value /// untouched. #[inline] pub fn map_err<N, F>(self, f: F) -> IResult<I, O, N> where F: FnOnce(Err<I, E>) -> Err<I, N> { match self { Error(e) => Error(f(e)), Incomplete(n) => Incomplete(n), Done(i, o) => Done(i, o), } } /// Unwrap the contained `Error(I, E)` value, or panic if the `IResult` is not /// `Error`. pub fn unwrap_err(self) -> Err<I, E> { match self { Error(e) => e, Done(_, _) => panic!("unwrap_err() called on an IResult that is Done"), Incomplete(_) => panic!("unwrap_err() called on an IResult that is Incomplete"), } } /// Convert the IResult to a std::result::Result pub fn to_full_result(self) -> Result<O, IError<I,E>> { match self { Done(_, o) => Ok(o), Incomplete(n) => Err(IError::Incomplete(n)), Error(e) => Err(IError::Error(e)) } } /// Convert the IResult to a std::result::Result pub fn to_result(self) -> Result<O, Err<I,E>> { match self { Done(_, o) => Ok(o), Error(e) => Err(e), Incomplete(_) => panic!("to_result() called on an IResult that is Incomplete") } } } #[cfg(feature = "std")] use std::any::Any; #[cfg(feature = "std")] use std::{error,fmt}; #[cfg(feature = "std")] use std::fmt::Debug; #[cfg(feature = "std")] impl<P:Debug+Any,E:Debug+Any> error::Error for Err<P,E> { fn description(&self) -> &str { let kind = match *self { Err::Code(ref e) | Err::Node(ref e, _) | Err::Position(ref e, _) | Err::NodePosition(ref e, _, _) => e }; kind.description() } } #[cfg(feature = "std")] impl<P:fmt::Debug,E:fmt::Debug> fmt::Display for Err<P,E> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { Err::Code(ref e) | Err::Node(ref e, _) => { write!(f, "{:?}", e) }, Err::Position(ref e, ref p) | Err::NodePosition(ref e, ref p, _) => { write!(f, "{:?}:{:?}", p, e) } } } } /// translate parser result from IResult<I,O,u32> to IResult<I,O,E> with a custom type /// /// ``` /// # #[macro_use] extern crate nom; /// # use std::collections; /// # use nom::IResult::Error; /// # use nom::Err::{Position,NodePosition}; /// # use nom::ErrorKind; /// # fn main() { /// // will add a Custom(42) error to the error chain /// named!(err_test, add_return_error!(ErrorKind::Custom(42), tag!("abcd"))); /// // Convert to IREsult<&[u8], &[u8], &str> /// named!(parser<&[u8], &[u8], &str>, add_return_error!(ErrorKind::Custom("custom error message"), fix_error!(&str, err_test))); /// /// let a = &b"efghblah"[..]; /// let res_a = parser(a); /// assert_eq!(res_a, Error(NodePosition( ErrorKind::Custom("custom error message"), a, vec!(Position(ErrorKind::Fix, a))))); /// # } /// ``` #[macro_export] macro_rules! fix_error ( ($i:expr, $t:ty, $submac:ident!( $($args:tt)* )) => ( { match $submac!($i, $($args)*) { $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), $crate::IResult::Error(e) => { let err = match e { $crate::Err::Code($crate::ErrorKind::Custom(_)) | $crate::Err::Node($crate::ErrorKind::Custom(_), _) => { let e: $crate::ErrorKind<$t> = $crate::ErrorKind::Fix; $crate::Err::Code(e) }, $crate::Err::Position($crate::ErrorKind::Custom(_), p) | $crate::Err::NodePosition($crate::ErrorKind::Custom(_), p, _) => { let e: $crate::ErrorKind<$t> = $crate::ErrorKind::Fix; $crate::Err::Position(e, p) }, $crate::Err::Code(_) | $crate::Err::Node(_, _) => { let e: $crate::ErrorKind<$t> = $crate::ErrorKind::Fix; $crate::Err::Code(e) }, $crate::Err::Position(_, p) | $crate::Err::NodePosition(_, p, _) => { let e: $crate::ErrorKind<$t> = $crate::ErrorKind::Fix; $crate::Err::Position(e, p) }, }; $crate::IResult::Error(err) } } } ); ($i:expr, $t:ty, $f:expr) => ( fix_error!($i, $t, call!($f)); ); ); /// `flat_map!(R -> IResult<R,S>, S -> IResult<S,T>) => R -> IResult<R, T>` /// /// combines a parser R -> IResult<R,S> and /// a parser S -> IResult<S,T> to return another /// parser R -> IResult<R,T> #[macro_export] macro_rules! flat_map( ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( { match $submac!($i, $($args)*) { $crate::IResult::Error(e) => $crate::IResult::Error(e), $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { $crate::IResult::Error(e) => { let err = match e { $crate::Err::Code(k) | $crate::Err::Node(k, _) | $crate::Err::Position(k, _) | $crate::Err::NodePosition(k, _, _) => { $crate::Err::Position(k, $i) } }; $crate::IResult::Error(err) }, $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), $crate::IResult::Incomplete($crate::Needed::Size(ref i2)) => $crate::IResult::Incomplete($crate::Needed::Size(*i2)), $crate::IResult::Done(_, o2) => $crate::IResult::Done(i, o2) } } } ); ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( flat_map!($i, $submac!($($args)*), call!($g)); ); ($i:expr, $f:expr, $g:expr) => ( flat_map!($i, call!($f), call!($g)); ); ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( flat_map!($i, call!($f), $submac!($($args)*)); ); );
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; use near_sdk::collections::LookupMap; use near_sdk::json_types::{U128, U64}; use near_sdk::serde::{Deserialize, Serialize}; use near_sdk::serde_json::{self, json}; use near_sdk::wee_alloc::WeeAlloc; use near_sdk::{env, ext_contract, near_bindgen, AccountId, PromiseResult}; use std::convert::TryInto; use std::str; #[global_allocator] static ALLOC: WeeAlloc = WeeAlloc::INIT; pub const DEFAULT_GAS: u64 = 300_000_000_000_000; pub type Base64String = String; #[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] #[serde(crate = "near_sdk::serde")] pub struct Round { answer: u128, started_at: u64, updated_at: u64, answered_in_round: u64, } #[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] #[serde(crate = "near_sdk::serde")] pub struct RoundDetails { submissions: Vec<u128>, max_submissions: u64, min_submissions: u64, timeout: u64, payment_amount: u128, } #[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] #[serde(crate = "near_sdk::serde")] pub struct OracleStatus { withdrawable: u128, starting_round: u64, ending_round: u128, last_reported_round: u64, last_started_round: u64, latest_submission: u128, index: u64, admin: AccountId, pending_admin: AccountId, } #[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize)] #[serde(crate = "near_sdk::serde")] pub struct Requester { authorized: bool, delay: u64, last_started_round: u64, } #[derive(BorshDeserialize, BorshSerialize, Serialize, Deserialize, Clone)] #[serde(crate = "near_sdk::serde")] pub struct Funds { available: u128, allocated: u128, } const VERSION: u128 = 3; const RESERVE_ROUNDS: u128 = 2; const MAX_ORACLE_COUNT: u128 = 77; const ROUND_MAX: u128 = 4294967295; // 2**32-1 const V3_NO_DATA_ERROR: &str = "No data present"; #[near_bindgen] #[derive(BorshDeserialize, BorshSerialize)] pub struct FluxAggregator { pub owner: AccountId, pending_owner: AccountId, pub link_token: AccountId, pub validator: AccountId, pub payment_amount: u128, pub max_submission_count: u64, pub min_submission_count: u64, pub restart_delay: u64, pub timeout: u64, pub decimals: u64, pub description: Base64String, pub min_submission_value: u128, pub max_submission_value: u128, reporting_round_id: u64, latest_round_id: u64, oracles: LookupMap<AccountId, OracleStatus>, rounds: LookupMap<u64, Round>, details: LookupMap<u128, RoundDetails>, requesters: LookupMap<AccountId, Requester>, oracle_addresses: Vec<AccountId>, recorded_funds: Funds, } impl Default for FluxAggregator { fn default() -> Self { panic!("FluxAggregator should be initialized before usage"); } } #[near_bindgen] impl FluxAggregator { /** * @notice set up the aggregator with initial configuration * @param _link The address of the LINK token * @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK) * @param _timeout is the number of seconds after the previous round that are * allowed to lapse before allowing an oracle to skip an unfinished round * @param _validator is an optional contract address for validating * external validation of answers * @param _minSubmissionValue is an immutable check for a lower bound of what * submission values are accepted from an oracle * @param _maxSubmissionValue is an immutable check for an upper bound of what * submission values are accepted from an oracle * @param _decimals represents the number of decimals to offset the answer by * @param _description a short description of what is being reported */ #[init] pub fn new( owner_id: AccountId, link_id: AccountId, _payment_amount: U128, _timeout: U64, _validator: AccountId, _min_submission_value: U128, _max_submission_value: U128, _decimals: U64, _description: Base64String, ) -> Self { assert!( env::is_valid_account_id(owner_id.as_bytes()), "Owner's account ID is invalid" ); assert!( env::is_valid_account_id(link_id.as_bytes()), "Link token account ID is invalid" ); assert!(!env::state_exists(), "Already initialized"); let payment_amount_u128: u128 = _payment_amount.into(); let timeout_u64: u64 = _timeout.into(); let min_submission_value_u128: u128 = _min_submission_value.into(); let max_submission_value_u128: u128 = _max_submission_value.into(); let decimals_u64: u64 = _decimals.into(); let vector: Vec<AccountId> = Vec::new(); let mut result = Self { owner: owner_id, pending_owner: "".to_string(), link_token: link_id, validator: "".to_string(), payment_amount: 0_u128, max_submission_count: 0_u64, min_submission_count: 0_u64, restart_delay: 0_u64, timeout: 0_u64, decimals: decimals_u64, description: _description, min_submission_value: min_submission_value_u128, max_submission_value: max_submission_value_u128, reporting_round_id: 0_u64, latest_round_id: 0_u64, oracles: LookupMap::new(b"oracles".to_vec()), rounds: LookupMap::new(b"rounds".to_vec()), details: LookupMap::new(b"details".to_vec()), requesters: LookupMap::new(b"requesters".to_vec()), oracle_addresses: vector, recorded_funds: Funds { available: 0_u128, allocated: 0_u128, }, }; let updated_at_insert: u64 = env::block_timestamp().saturating_sub(timeout_u64); let new_round: Round = Round { answer: 0_u128, started_at: 0_u64, updated_at: updated_at_insert, answered_in_round: 0_u64, }; result.rounds.insert(&0, &new_round); result.update_future_rounds( U128::from(payment_amount_u128), U64::from(0), U64::from(0), U64::from(0), U64::from(timeout_u64), ); result.set_validator(_validator); result } /** * @notice called by oracles when they have witnessed a need to update * @param _roundId is the ID of the round this submission pertains to * @param _submission is the updated data that the oracle is submitting */ pub fn submit(&mut self, _round_id: U128, _submission: U128) { let round_id_u128: u128 = _round_id.into(); let submission_u128: u128 = _submission.into(); let error: Base64String = self.validate_oracle_round(env::predecessor_account_id(), round_id_u128 as u64); assert!( submission_u128 >= self.min_submission_value, "value below min_submission_value" ); assert!( submission_u128 <= self.max_submission_value, "value above max_submission_value" ); if error.len() != 0 { env::panic(format!("{}", error).as_bytes()); } self.oracle_initialize_new_round(round_id_u128 as u64); self.record_submission(submission_u128, round_id_u128); let (updated, new_answer): (bool, u128) = self.update_round_answer(round_id_u128 as u64); self.pay_oracle(round_id_u128 as u64); self.delete_round_details(round_id_u128 as u64); if updated { self.validate_answer(round_id_u128 as u64, new_answer); } } /** * @notice called by the owner to remove and add new oracles as well as * update the round related parameters that pertain to total oracle count * @param _removed is the list of addresses for the new Oracles being removed * @param _added is the list of addresses for the new Oracles being added * @param _addedAdmins is the admin addresses for the new respective _added * list. Only this address is allowed to access the respective oracle's funds * @param _minSubmissions is the new minimum submission count for each round * @param _maxSubmissions is the new maximum submission count for each round * @param _restartDelay is the number of rounds an Oracle has to wait before * they can initiate a round */ pub fn change_oracles( &mut self, _removed: Vec<AccountId>, _added: Vec<AccountId>, _added_admins: Vec<AccountId>, _min_submissions: U64, _max_submissions: U64, _restart_delay: U64, ) { self.only_owner(); let min_submissions_u64: u64 = _min_submissions.into(); let max_submissions_u64: u64 = _max_submissions.into(); let restart_delay_u64: u64 = _restart_delay.into(); for i in 0.._removed.len() { self.remove_oracle(_removed[i].clone()); } assert!( _added.len() == _added_admins.len(), "need same oracle and admin count" ); assert!( (self.oracle_count() as usize + _added.len()) as u128 <= MAX_ORACLE_COUNT, "max oracles allowed" ); for i in 0.._added.len() { self.add_oracle(_added[i].clone(), _added_admins[i].clone()); } self.update_future_rounds( U128::from(self.payment_amount), U64::from(min_submissions_u64), U64::from(max_submissions_u64), U64::from(restart_delay_u64), U64::from(self.timeout), ); } /** * @notice update the round and payment related parameters for subsequent * rounds * @param _paymentAmount is the payment amount for subsequent rounds * @param _minSubmissions is the new minimum submission count for each round * @param _maxSubmissions is the new maximum submission count for each round * @param _restartDelay is the number of rounds an Oracle has to wait before * they can initiate a round */ pub fn update_future_rounds( &mut self, _payment_amount: U128, _min_submissions: U64, _max_submissions: U64, _restart_delay: U64, _timeout: U64, ) { // Look into how to call this function in the initialization while having a an owner_id provided that is not the contract if env::predecessor_account_id() != env::current_account_id() { self.only_owner(); } let payment_amount_u128: u128 = _payment_amount.into(); let min_submissions_u64: u64 = _min_submissions.into(); let max_submissions_u64: u64 = _max_submissions.into(); let restart_delay_u64: u64 = _restart_delay.into(); let timeout_u64: u64 = _timeout.into(); let oracle_num: u128 = self.oracle_count(); // Save on storage reads assert!( max_submissions_u64 >= min_submissions_u64, "max must equal/exceed min" ); assert!( oracle_num >= max_submissions_u64.into(), "max cannot exceed total" ); assert!( oracle_num == 0 || oracle_num > restart_delay_u64.into(), "revert delay cannot exceed total" ); // off for tests assert!( self.recorded_funds.available >= self.required_reserve(payment_amount_u128), "insufficient funds for payment" ); if self.oracle_count() > 0 { assert!(min_submissions_u64 > 0, "min must be greater than 0") } self.payment_amount = payment_amount_u128; self.min_submission_count = min_submissions_u64; self.max_submission_count = max_submissions_u64; self.restart_delay = restart_delay_u64; self.timeout = timeout_u64; env::log( format!( "{}, {}, {}, {}, {}", payment_amount_u128, min_submissions_u64, max_submissions_u64, restart_delay_u64, timeout_u64 ) .as_bytes(), ); } /** * @notice the amount of payment yet to be withdrawn by oracles */ pub fn allocated_funds(&self) -> u128 { self.recorded_funds.allocated } /** * @notice the amount of future funding available to oracles */ pub fn available_funds(&self) -> u128 { self.recorded_funds.available } pub fn min_submission_count(&self) -> u64 { self.min_submission_count } pub fn max_submission_count(&self) -> u64 { self.max_submission_count } pub fn restart_delay(&self) -> u64 { self.restart_delay } /** * @notice recalculate the amount of LINK available for payouts */ pub fn update_available_funds(&self) { let prepaid_gas = env::prepaid_gas(); let get_balance_promise = env::promise_create( self.link_token.clone(), b"ft_balance_of", json!({ "account_id": "flux_aggregator" }) .to_string() .as_bytes(), 0, (prepaid_gas / 6).into(), ); env::promise_then( get_balance_promise, env::current_account_id(), b"get_balance_promise_results", json!({}).to_string().as_bytes(), 0, (prepaid_gas / 6).into(), ); } pub fn get_balance_promise_results(&mut self) { let funds: &Funds = &self.recorded_funds; assert_eq!(env::current_account_id(), env::predecessor_account_id()); assert_eq!(env::promise_results_count(), 1); let get_balance_promise_result: Vec<u8> = match env::promise_result(0) { PromiseResult::Successful(_x) => _x, _x => panic!("Promise with index 0 failed"), }; let link_balance: U128 = serde_json::from_slice(&get_balance_promise_result).unwrap(); let now_available: u128 = u128::from(link_balance) - funds.allocated; if funds.available != now_available { self.recorded_funds.available = now_available; env::log(format!("{}", now_available).as_bytes()); } } /** * @notice returns the number of oracles */ pub fn oracle_count(&self) -> u128 { self.oracle_addresses.len() as u128 } /** * @notice returns an array of addresses containing the oracles on contract */ pub fn get_oracles(&self) -> Vec<AccountId> { self.oracle_addresses.clone() } pub fn get_payment_amount(&self) -> u128 { self.payment_amount } pub fn get_timeout(&self) -> u64 { self.timeout } pub fn get_validator(&self) -> AccountId { self.validator.clone() } pub fn get_owner(&self) -> AccountId { self.owner.clone() } /** * @notice get the most recently reported answer * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better verification information. */ pub fn latest_answer(&self) -> u128 { let round_option = self.rounds.get(&self.latest_round_id); if round_option.is_none() { return 0; } let round = round_option.unwrap(); if round.answer == 0 { return 0; } round.answer } /** * @notice get the most recent updated at timestamp * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better verification information. */ pub fn latest_timestamp(&self) -> u64 { let round_option = self.rounds.get(&self.latest_round_id); if round_option.is_none() { // env::panic(b"Did not find this oracle account. {latest_timestamp}"); return 0; } let round = round_option.unwrap(); round.updated_at } /** * @notice get the ID of the last updated round * * @dev #[deprecated] Use latestRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended latestRoundData * instead which includes better verification information. */ pub fn latest_round(&self) -> u64 { self.latest_round_id } /** * @notice get past rounds answers * @param _roundId the round number to retrieve the answer for * * @dev #[deprecated] Use getRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended getRoundData * instead which includes better verification information. */ pub fn get_answer(&self, _round_id: U128) -> u128 { let round_id_u128: u128 = _round_id.into(); let round_option = self.rounds.get(&(round_id_u128 as u64)); if round_option.is_none() { env::panic(b"Did not find this round."); } let round = round_option.unwrap(); if self.valid_round_id(round_id_u128) { return round.answer; } return 0; } /** * @notice get timestamp when an answer was last updated * @param _roundId the round number to retrieve the updated timestamp for * * @dev #[deprecated] Use getRoundData instead. This does not error if no * answer has been reached, it will simply return 0. Either wait to point to * an already answered Aggregator or use the recommended getRoundData * instead which includes better verification information. */ pub fn get_timestamp(&self, _round_id: U128) -> u64 { let round_id_u128: u128 = _round_id.into(); let round_option = self.rounds.get(&(round_id_u128 as u64)); if round_option.is_none() { env::panic(b"Did not find this round."); } let round = round_option.unwrap(); if self.valid_round_id(round_id_u128) { return round.updated_at; } return 0; } /** * @notice get data about a round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * @param _roundId the round ID to retrieve the round data for * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. This is 0 * if the round hasn't been started yet. * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. answeredInRound may be smaller than roundId when the round * timed out. answeredInRound is equal to roundId when the round didn't time out * and was completed regularly. * @dev Note that for in-progress rounds (i.e. rounds that haven't yet received * maxSubmissions) answer and updatedAt may change between queries. */ pub fn get_round_data(&self, _round_id: U64) -> (u64, u128, u64, u64, u64) { let round_id_u64: u64 = _round_id.into(); let round_option = self.rounds.get(&round_id_u64); if round_option.is_none() { env::panic(b"No data present"); } let round = round_option.unwrap(); let r: Round = round; assert!( r.answered_in_round > 0 && self.valid_round_id(round_id_u64.into()), V3_NO_DATA_ERROR ); return ( round_id_u64, r.answer, r.started_at, r.updated_at, r.answered_in_round, ); } /** * @notice get data about the latest round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. Consumers are encouraged to * use this more fully featured method over the "legacy" latestRound/ * latestAnswer/latestTimestamp functions. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. This is 0 * if the round hasn't been started yet. * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. answeredInRound may be smaller than roundId when the round * timed out. answeredInRound is equal to roundId when the round didn't time * out and was completed regularly. * @dev Note that for in-progress rounds (i.e. rounds that haven't yet * received maxSubmissions) answer and updatedAt may change between queries. */ pub fn latest_round_data(&self) -> (u64, u128, u64, u64, u64) { self.get_round_data(U64::from(self.latest_round_id)) } /** * @notice query the available amount of LINK for an oracle to withdraw */ pub fn withdrawable_payment(&self, _oracle: AccountId) -> u128 { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let oracle = oracle_option.unwrap(); oracle.withdrawable } /** * @notice transfers the oracle's LINK to another address. Can only be called * by the oracle's admin. * @param _oracle is the oracle whose LINK is transferred * @param _recipient is the address to send the LINK to * @param _amount is the amount of LINK to send */ #[payable] pub fn withdraw_payment(&mut self, _oracle: AccountId, _recipient: AccountId, _amount: U128) { let prepaid_gas = env::prepaid_gas(); let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle."); } let mut oracle = oracle_option.unwrap(); assert!( oracle.admin == env::predecessor_account_id(), "only callable by admin" ); let amount_u128: u128 = _amount.into(); let available: u128 = oracle.withdrawable; assert!( available >= amount_u128, "revert insufficient withdrawable funds" ); oracle.withdrawable = available - amount_u128; self.oracles.insert(&_oracle, &oracle); self.recorded_funds.allocated = self.recorded_funds.allocated - amount_u128; let ft_transfer = env::promise_create( self.link_token.clone(), b"ft_transfer", json!({"receiver_id": _recipient.clone(), "amount": _amount, "memo": "None"}) .to_string() .as_bytes(), 1, (prepaid_gas / 6).into(), ); env::promise_then( ft_transfer, "flux_aggregator".to_string(), b"update_available_funds_promise_resolution", json!({}).to_string().as_bytes(), 0, (prepaid_gas / 6).into(), ); } /** * @notice transfers the owner's LINK to another address * @param _recipient is the address to send the LINK to * @param _amount is the amount of LINK to send */ #[payable] pub fn withdraw_funds(&mut self, _recipient: AccountId, _amount: U128) { self.only_owner(); let prepaid_gas = env::prepaid_gas(); let available: u128 = self.recorded_funds.available as u128; let amount_u128: u128 = _amount.into(); assert!( (available - self.required_reserve(self.payment_amount)) >= amount_u128, "insufficient reserve funds" ); let ft_transfer = env::promise_create( self.link_token.clone(), b"ft_transfer", json!({"receiver_id": _recipient.clone(), "amount": _amount, "memo": "None"}) .to_string() .as_bytes(), 1, (prepaid_gas / 6).into(), ); let ft_transfer_resolve = env::promise_then( ft_transfer, "flux_aggregator".to_string(), b"update_available_funds_promise_resolution", json!({}).to_string().as_bytes(), 0, (prepaid_gas / 6).into(), ); env::promise_return(ft_transfer_resolve); } /** * @notice recalculate the amount of LINK available for payouts */ pub fn update_available_funds_promise_resolution(&self) { let prepaid_gas = env::prepaid_gas(); let get_balance_promise = env::promise_create( self.link_token.clone(), b"ft_balance_of", json!({ "account_id": "flux_aggregator" }) .to_string() .as_bytes(), 0, (prepaid_gas / 6).into(), ); let get_balance_promise_resolve = env::promise_then( get_balance_promise, "flux_aggregator".to_string(), b"get_balance_promise_results", json!({}).to_string().as_bytes(), 0, (prepaid_gas / 6).into(), ); env::promise_return(get_balance_promise_resolve); } /** * @notice get the admin address of an oracle * @param _oracle is the address of the oracle whose admin is being queried */ pub fn get_admin(&self, _oracle: AccountId) -> AccountId { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle."); } let oracle = oracle_option.unwrap(); oracle.admin } /** * @notice transfer the admin address for an oracle * @param _oracle is the address of the oracle whose admin is being transferred * @param _newAdmin is the new admin address */ pub fn transfer_admin(&mut self, _oracle: AccountId, _new_admin: AccountId) { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle."); } let mut oracle = oracle_option.unwrap(); assert!( oracle.admin == env::predecessor_account_id(), "revert only callable by admin" ); oracle.pending_admin = _new_admin; self.oracles.insert(&_oracle, &oracle); env::log( format!( "{}, {}, {}", _oracle, env::predecessor_account_id(), oracle.pending_admin ) .as_bytes(), ); } /** * @notice accept the admin address transfer for an oracle * @param _oracle is the address of the oracle whose admin is being transferred */ pub fn accept_admin(&mut self, _oracle: AccountId) { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let mut oracle = oracle_option.unwrap(); assert!( oracle.pending_admin == env::predecessor_account_id(), "only callable by pending admin" ); oracle.pending_admin = "".to_string(); oracle.admin = env::predecessor_account_id(); self.oracles.insert(&_oracle, &oracle); env::log(format!("{}, {}", _oracle, env::predecessor_account_id()).as_bytes()); } /** * @notice allows non-oracles to request a new round */ pub fn request_new_round(&mut self) -> u64 { let requester_option = self.requesters.get(&env::predecessor_account_id()); if requester_option.is_none() { env::panic(b"not authorized requester"); } let requester = requester_option.unwrap(); assert!(requester.authorized, "not authorized requester"); let current: u64 = self.reporting_round_id; let round_option = self.rounds.get(&current); if round_option.is_none() { env::panic(b"Did not find this round."); } let round = round_option.unwrap(); assert!( round.updated_at > 0 || self.timed_out(current), "prev round must be supersedable" ); let new_round_id: u64 = current + 1; self.requester_initialize_new_round(new_round_id); return new_round_id; } /** * @notice allows the owner to specify new non-oracles to start new rounds * @param _requester is the address to set permissions for * @param _authorized is a boolean specifying whether they can start new rounds or not * @param _delay is the number of rounds the requester must wait before starting another round */ pub fn set_requester_permissions( &mut self, _requester: AccountId, _authorized: bool, _delay: U64, ) { self.only_owner(); let delay_u64: u64 = _delay.into(); let requester_option = self.requesters.get(&_requester); let mut requester: Requester; if requester_option.is_none() { requester = Requester { authorized: _authorized, delay: u64::from(_delay), last_started_round: 0, }; } else { requester = requester_option.unwrap(); if requester.authorized == _authorized { return; } } if _authorized { requester.authorized = _authorized; requester.delay = delay_u64; self.requesters.insert(&_requester, &requester); } else { self.requesters.remove(&_requester); } env::log(format!("{}, {}, {}", _requester, _authorized, u64::from(_delay)).as_bytes()); } /** * @notice called through LINK's transferAndCall to update available funds * in the same transaction as the funds were transferred to the aggregator * @param _data is mostly ignored. It is checked for length, to be sure * nothing strange is passed in. */ pub fn on_token_transfer(&mut self, sender_id: AccountId, amount: U128, msg: String) { assert!(msg.len() == 0, "transfer doesn't accept calldata"); self.update_available_funds(); } /** * @notice called through LINK's transferAndCall to update available funds * in the same transaction as the funds were transferred to the aggregator * @param msg is mostly ignored. It is checked for length, to be sure * nothing strange is passed in. */ pub fn ft_on_transfer(&mut self, sender_id: AccountId, amount: U128, msg: String) { env::log(format!("{}", "HERE!").as_bytes()); assert!(msg.len() == 0, "transfer doesn't accept calldata"); self.update_available_funds(); } /** * @notice a method to provide all current info oracles need. Intended only * only to be callable by oracles. Not for use by contracts to read state. * @param _oracle the address to look up information for. */ pub fn oracle_round_state( &mut self, _oracle: AccountId, _queried_round_id: U64, ) -> (bool, u64, u128, u64, u64, u128, u64, u128) { assert!( env::predecessor_account_id() == env::signer_account_id(), "off-chain reading only" ); let queried_round_id_u64: u64 = _queried_round_id.into(); if queried_round_id_u64 > 0 { let round_option = self.rounds.get(&queried_round_id_u64); let mut round: Round; if round_option.is_none() { round = Round { answer: 0, started_at: 0, updated_at: 0, answered_in_round: 0, } } else { round = round_option.unwrap(); } let detail_option = self.details.get(&u128::from(queried_round_id_u64)); let mut detail: RoundDetails; if detail_option.is_none() { detail = RoundDetails { submissions: Vec::new(), max_submissions: 0, min_submissions: 0, timeout: 0, payment_amount: 0, } } else { detail = detail_option.unwrap(); } let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this round oracle."); } let oracle = oracle_option.unwrap(); return ( self.eligible_for_specific_round(_oracle, queried_round_id_u64), queried_round_id_u64, oracle.latest_submission, round.started_at, detail.timeout, self.recorded_funds.available, self.oracle_count() as u64, if round.started_at > 0 { detail.payment_amount } else { self.payment_amount }, ); } else { return self.oracle_round_state_suggest_round(_oracle); } } /** * @notice method to update the address which does external data validation. * @param _newValidator designates the address of the new validation contract. */ pub fn set_validator(&mut self, _new_validator: AccountId) { // Look into how to call this function in the initialization while having a an owner_id provided that is not the contract if env::predecessor_account_id() != env::current_account_id() { self.only_owner(); } let previous: AccountId = String::from(&self.validator) as AccountId; let init_new: AccountId = _new_validator.clone(); if previous != _new_validator { self.validator = _new_validator; env::log(format!("{}, {}", previous, init_new).as_bytes()); } } /** * Private */ fn initialize_new_round(&mut self, _round_id: u64) { self.update_timed_out_round_info(_round_id - 1); self.reporting_round_id = _round_id; let vector: Vec<u128> = Vec::new(); let next_details: RoundDetails = RoundDetails { submissions: vector, max_submissions: self.max_submission_count, min_submissions: self.min_submission_count, timeout: self.timeout, payment_amount: self.payment_amount, }; let new_round: Round = Round { answer: 0_u128, started_at: env::block_timestamp() as u64, updated_at: 0_u64, answered_in_round: 0_u64, }; self.details.insert(&u128::from(_round_id), &next_details); self.rounds.insert(&_round_id, &new_round); env::log( format!( "{}, {}, {}", _round_id, env::predecessor_account_id(), new_round.started_at ) .as_bytes(), ); } fn oracle_initialize_new_round(&mut self, _round_id: u64) { if !self.new_round(_round_id) { return; } let oracle_option = self.oracles.get(&env::predecessor_account_id()); if oracle_option.is_none() { env::panic( format!( "{} Did not find this oracle.", &env::predecessor_account_id() ) .as_bytes(), ); } let mut oracle = oracle_option.unwrap(); let last_started: u64 = oracle.last_started_round; // cache storage reads if _round_id <= last_started + self.restart_delay && last_started != 0 { return; } self.initialize_new_round(_round_id); oracle.last_started_round = _round_id; self.oracles.insert(&env::predecessor_account_id(), &oracle); } fn requester_initialize_new_round(&mut self, _round_id: u64) { if !self.new_round(_round_id) { return; } let requester_option = self.requesters.get(&env::predecessor_account_id()); if requester_option.is_none() { env::panic(b"Did not find this requester."); } let mut requester = requester_option.unwrap(); let last_started: u128 = requester.last_started_round.into(); // cache storage reads assert!( (_round_id as u128) > last_started + (requester.delay as u128) || last_started == 0, "must delay requests" ); self.initialize_new_round(_round_id); requester.last_started_round = _round_id; self.requesters .insert(&env::predecessor_account_id(), &requester); } fn update_timed_out_round_info(&mut self, _round_id: u64) { if !self.timed_out(_round_id) { return; } let prev_id: u64 = _round_id - 1; let round_option = self.rounds.get(&_round_id); if round_option.is_none() { env::panic(format!("{} Did not find this round.", _round_id.to_string()).as_bytes()); } let mut round = round_option.unwrap(); let prev_option = self.rounds.get(&prev_id); if prev_option.is_none() { env::panic( format!("{} Did not find this previous round.", prev_id.to_string()).as_bytes(), ); // return; } let prev = prev_option.unwrap(); round.answer = prev.answer; round.answered_in_round = prev.answered_in_round; round.updated_at = env::block_timestamp() as u64; self.rounds.insert(&_round_id, &round); self.details.remove(&(_round_id as u128)); } fn eligible_for_specific_round(&mut self, _oracle: AccountId, _queried_round_id: u64) -> bool { let init_oracle = &_oracle; let round_option = self.rounds.get(&_queried_round_id); let mut round: Round; if round_option.is_none() { round = Round { answer: 0, started_at: 0, updated_at: 0, answered_in_round: 0, }; } else { round = round_option.unwrap(); } if round.started_at > 0 { return self.accepting_submissions(_queried_round_id.into()) && self .validate_oracle_round(init_oracle.to_string(), _queried_round_id) .len() == 0; } else { return self.delayed(_oracle.to_string(), _queried_round_id) && self .validate_oracle_round(init_oracle.to_string(), _queried_round_id) .len() == 0; } } fn oracle_round_state_suggest_round( &mut self, _oracle: AccountId, ) -> (bool, u64, u128, u64, u64, u128, u64, u128) { let round_option = self.rounds.get(&1); let init_oracle = &_oracle; let mut round: Round; if round_option.is_none() { round = Round { answer: 0, started_at: 0, updated_at: 0, answered_in_round: 0, }; } else { round = round_option.unwrap(); } let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let oracle = oracle_option.unwrap(); let should_supersede: bool = oracle.last_reported_round == self.reporting_round_id || !self.accepting_submissions(self.reporting_round_id as u128); // Instead of nudging oracles to submit to the next round, the inclusion of // the should_supersede bool in the if condition pushes them towards // submitting in a currently open round. let mut _round_id: u64; let mut _payment_amount: u128; let mut _eligible_to_submit: bool; let _reporting_round_id: u64 = self.reporting_round_id; let detail_option = self.details.get(&(_reporting_round_id as u128)); let mut detail: RoundDetails; if detail_option.is_none() { detail = RoundDetails { submissions: Vec::new(), max_submissions: 0, min_submissions: 0, timeout: 0, payment_amount: 0, } } else { detail = detail_option.unwrap(); } if self.supersedable(self.reporting_round_id) && should_supersede { _round_id = self.reporting_round_id + 1; let round_from_id_option = self.rounds.get(&_round_id); if round_from_id_option.is_none() { // Do nothing, keep the round the same } else { round = round_from_id_option.unwrap(); } _payment_amount = self.payment_amount; _eligible_to_submit = self.delayed(_oracle.to_string(), _round_id); } else { _round_id = self.reporting_round_id; let round_from_id_option = self.rounds.get(&_reporting_round_id); if round_from_id_option.is_none() { // Do nothing, keep the round the same } else { round = round_from_id_option.unwrap(); } _payment_amount = detail.payment_amount; _eligible_to_submit = self.accepting_submissions(_round_id.into()); } if self .validate_oracle_round(init_oracle.to_string(), _round_id) .len() != 0 { _eligible_to_submit = false; } return ( _eligible_to_submit, _round_id, oracle.latest_submission, round.started_at, detail.timeout, self.recorded_funds.available, self.oracle_count() as u64, _payment_amount, ); } fn update_round_answer(&mut self, _round_id: u64) -> (bool, u128) { let detail_option = self.details.get(&(_round_id as u128)); if detail_option.is_none() { env::panic(b"Did not find details for this Round ID."); } let detail = detail_option.unwrap(); let submissions_length = detail.submissions.len() as u64; if submissions_length < detail.min_submissions { return (false, 0 as u128); } let round_option = self.rounds.get(&_round_id); if round_option.is_none() { env::panic(b"Did not find this round."); } let mut round = round_option.unwrap(); let new_answer: u128 = self.median(detail.submissions).into(); env::log(format!("{}", new_answer).as_bytes()); round.answer = new_answer; round.updated_at = env::block_timestamp() as u64; round.answered_in_round = _round_id; self.rounds.insert(&_round_id, &round); self.latest_round_id = _round_id; return (true, new_answer); } fn validate_answer(&self, _round_id: u64, _new_answer: u128) { let av: AccountId = self.validator.clone(); // cache storage reads if av == "" { return; } let _round_id_u128: u128 = _round_id as u128; let prepaid_gas = env::prepaid_gas(); let prev_round: u64 = _round_id - 1; if prev_round == 0 { // TRY CATCH env::promise_create( self.validator.clone(), b"validate", json!({ "previous_round_id": U128::from(0), "previous_answer": U128::from(0), "current_round_id": U128::from(_round_id_u128), "current_answer": U128::from(_new_answer)}) .to_string() .as_bytes(), 0, (prepaid_gas / 2).into(), ); } else { let round_option = self.rounds.get(&prev_round); if round_option.is_none() { env::panic(b"Did not find this round."); } let round = round_option.unwrap(); let prev_answer_round_id: u64 = round.answered_in_round; let prev_answer_round_id_u128: u128 = prev_answer_round_id as u128; let prev_round_answer: u128 = round.answer; // TRY CATCH env::promise_create( self.validator.clone(), b"validate", json!({ "previous_round_id": U128::from(prev_answer_round_id_u128), "previous_answer": U128::from(prev_round_answer), "current_round_id": U128::from(_round_id_u128), "current_answer": U128::from(_new_answer)}) .to_string() .as_bytes(), 0, (prepaid_gas / 2).into(), ); } } fn pay_oracle(&mut self, _round_id: u64) { let detail_option = self.details.get(&(_round_id as u128)); if detail_option.is_none() { env::panic(b"Did not find details for this Round ID."); } let detail = detail_option.unwrap(); let oracle_option = self.oracles.get(&env::predecessor_account_id()); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let mut oracle = oracle_option.unwrap(); let payment: u128 = detail.payment_amount; let mut funds: Funds = self.recorded_funds.clone(); env::log(format!("{}", funds.available.saturating_sub(payment)).as_bytes()); env::log(format!("{}", funds.allocated.saturating_add(payment)).as_bytes()); funds.available = funds.available.saturating_sub(payment); funds.allocated = funds.allocated.saturating_add(payment); self.recorded_funds = funds; self.oracles.remove(&env::predecessor_account_id()); oracle.withdrawable = oracle.withdrawable.saturating_add(payment); self.oracles.insert(&env::predecessor_account_id(), &oracle); } fn record_submission(&mut self, _submission: u128, _round_id: u128) { assert!( self.accepting_submissions(_round_id), "round not accepting submissions" ); let detail_option = self.details.get(&(_round_id as u128)); if detail_option.is_none() { env::panic(b"Did not find details for this Round ID."); } let mut detail = detail_option.unwrap(); let oracle_option = self.oracles.get(&env::predecessor_account_id()); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let mut oracle = oracle_option.unwrap(); detail.submissions.push(_submission); self.details.insert(&(_round_id as u128), &detail); oracle.last_reported_round = _round_id as u64; oracle.latest_submission = _submission; self.oracles.insert(&env::predecessor_account_id(), &oracle); env::log( format!( "{}, {}, {}", _submission, _round_id, env::predecessor_account_id() ) .as_bytes(), ); } fn delete_round_details(&mut self, _round_id: u64) { let detail_option = self.details.get(&(_round_id as u128)); if detail_option.is_none() { env::panic(b"Did not find details for this Round ID."); } let detail = detail_option.unwrap(); if (detail.submissions.len() as u64) < detail.max_submissions { return; } else { self.details.remove(&(_round_id as u128)); } } fn timed_out(&mut self, _round_id: u64) -> bool { let round_option = self.rounds.get(&_round_id); if round_option.is_none() { return false; } let round = round_option.unwrap(); let detail_option = self.details.get(&(_round_id as u128)); if detail_option.is_none() { return false; } let detail = detail_option.unwrap(); let started_at: u64 = round.started_at; let round_timeout: u64 = detail.timeout; // commented out for test failure return started_at > 0 && round_timeout > 0 && started_at.saturating_add(round_timeout) < env::block_timestamp(); // return false; } fn get_starting_round(&self, _oracle: AccountId) -> u64 { let current_round: u64 = self.reporting_round_id; let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { return current_round + 1; } let oracle = oracle_option.unwrap(); if current_round != 0 && current_round == oracle.ending_round as u64 { return current_round; } return current_round + 1; } fn previous_and_current_unanswered(&self, _round_id: u64, _rr_id: u64) -> bool { let round_option = self.rounds.get(&_rr_id); if round_option.is_none() { return false; } let round = round_option.unwrap(); return (_round_id + 1) == _rr_id && round.updated_at == 0; } fn required_reserve(&self, payment: u128) -> u128 { return payment * (self.oracle_count() * RESERVE_ROUNDS); } fn add_oracle(&mut self, _oracle: AccountId, _admin: AccountId) { let init_oracle = &_oracle; let init_admin = &_admin; assert!( !self.oracle_enabled(init_oracle.to_string()), "oracle already enabled" ); assert!(_admin != "", "cannot set admin to 0"); let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { // assert not required since there is_none let oracle: OracleStatus = OracleStatus { withdrawable: 0_u128, starting_round: self.get_starting_round(_oracle.clone()), ending_round: ROUND_MAX, last_reported_round: 0_u64, last_started_round: 0_u64, latest_submission: 0_u128, index: self.oracle_addresses.len() as u64, admin: _admin.clone(), pending_admin: "".to_string(), }; self.oracles.insert(&_oracle, &oracle); self.oracle_addresses.push(_oracle.clone()); } else { let oracle_unwrapped: OracleStatus = oracle_option.unwrap(); assert!( &oracle_unwrapped.admin == "" || &oracle_unwrapped.admin == init_admin, "owner cannot overwrite admin" ); // oracle_option.ending_round = self.get_starting_round(_oracle.clone()); // self.oracles.insert(&init_oracle, &oracle_option); } // Oracle Permissions Updated env::log(format!("{}, {}", &init_oracle.clone(), true).as_bytes()); // Oracle Admin Updated env::log(format!("{}, {}", &init_admin.clone(), true).as_bytes()); } fn remove_oracle(&mut self, _oracle: AccountId) { let init_oracle = &_oracle; assert!( self.oracle_enabled(init_oracle.to_string()), "oracle not enabled" ); let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let mut oracle = oracle_option.unwrap(); let last_oracle: usize = (self.oracle_count() - 1) as usize; let tail: AccountId = self.oracle_addresses[last_oracle].clone(); let init_tail = &tail; let oracle_tail_option = self.oracles.get(&tail); if oracle_tail_option.is_none() { env::panic(b"Did not find this oracle account."); } let mut oracle_tail = oracle_tail_option.unwrap(); oracle.ending_round = (self.reporting_round_id.saturating_add(1)).into(); let index: usize = oracle.index.try_into().unwrap(); oracle_tail.index = index.try_into().unwrap(); oracle.index = 0_u64; self.oracle_addresses[index] = init_tail.to_string(); self.oracle_addresses.pop(); self.oracles.insert(&_oracle, &oracle); self.oracles.insert(&tail, &oracle_tail); // Oracle Permissions Updated env::log(format!("{}, {}", &init_oracle.clone(), false).as_bytes()); } fn validate_oracle_round(&mut self, _oracle: AccountId, _round_id: u64) -> Base64String { // cache storage reads let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { return "not enabled oracle".to_string(); } let oracle = oracle_option.unwrap(); let starting_round: u64 = oracle.starting_round; let rr_id: u64 = self.reporting_round_id; if starting_round == 0 { return "not enabled oracle".to_string(); } else if starting_round > _round_id { return "not yet enabled oracle".to_string(); } else if oracle.ending_round < _round_id.into() { return "no longer allowed oracle".to_string(); } else if oracle.last_reported_round >= _round_id { return "cannot report on previous rounds".to_string(); } else if _round_id != rr_id && _round_id != rr_id + 1 && !self.previous_and_current_unanswered(_round_id, rr_id) { return "invalid round to report".to_string(); } else if _round_id != 1 && !self.supersedable(_round_id - 1) { return "previous round not supersedable".to_string(); } else { return "".to_string(); } } fn supersedable(&mut self, _round_id: u64) -> bool { if self.timed_out(_round_id) { return self.timed_out(_round_id); } let round_option = self.rounds.get(&_round_id); if round_option.is_none() { return false; } let round = round_option.unwrap(); round.updated_at > 0 } fn oracle_enabled(&self, _oracle: AccountId) -> bool { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { return false; } let oracle = oracle_option.unwrap(); oracle.ending_round == ROUND_MAX } fn accepting_submissions(&self, _round_id: u128) -> bool { let round_option = self.details.get(&_round_id); if round_option.is_none() { return false; } let round = round_option.unwrap(); round.max_submissions != 0 } fn delayed(&self, _oracle: AccountId, _round_id: u64) -> bool { let oracle_option = self.oracles.get(&_oracle); if oracle_option.is_none() { env::panic(b"Did not find this oracle account."); } let oracle = oracle_option.unwrap(); let last_started: u64 = oracle.last_started_round; _round_id > (last_started + self.restart_delay) || last_started == 0 } fn new_round(&self, _round_id: u64) -> bool { _round_id == self.reporting_round_id + 1 } fn valid_round_id(&self, _round_id: u128) -> bool { _round_id <= ROUND_MAX } fn only_owner(&self) { assert_eq!( self.owner, env::predecessor_account_id(), "Only callable by owner" ); } fn median(&mut self, mut numbers: Vec<u128>) -> u128 { numbers.sort(); let _mid = numbers.len() / 2; let sum: u128 = numbers.iter().sum(); let len: u128 = numbers.len().try_into().unwrap(); sum / len } pub fn get_decimals(&self) -> u64 { self.decimals } pub fn get_description(&self) -> String { self.description.clone() } pub fn get_version(&self) -> u128 { VERSION } pub fn accept_ownership(&mut self) { assert_eq!( env::predecessor_account_id(), self.pending_owner, "Must be proposed owner" ); let old_owner: AccountId = self.owner.clone(); self.owner = env::predecessor_account_id(); self.pending_owner = "".to_string(); env::log(format!("{}, {}", old_owner, env::predecessor_account_id()).as_bytes()); } pub fn transfer_ownership(&mut self, _to: AccountId) { self.only_owner(); let init_to: AccountId = _to.clone(); self.pending_owner = _to; env::log(format!("{}, {}", self.owner, init_to).as_bytes()); } }
use azure_core::errors::AzureError; use azure_core::headers::{utc_date_from_rfc2822, CommonStorageResponseHeaders}; use chrono::{DateTime, Utc}; use hyper::header::HeaderMap; use std::convert::TryInto; #[derive(Debug, Clone)] pub struct PeekMessagesResponse { pub common_storage_response_headers: CommonStorageResponseHeaders, pub messages: Vec<PeekMessage>, } #[derive(Debug, Clone, Serialize, Deserialize)] struct PeekMessageInternal { #[serde(rename = "MessageId")] pub message_id: String, #[serde(rename = "InsertionTime")] pub insertion_time: String, #[serde(rename = "ExpirationTime")] pub expiration_time: String, #[serde(rename = "DequeueCount")] pub dequeue_count: u64, #[serde(rename = "MessageText")] pub message_text: String, } #[derive(Debug, Clone)] pub struct PeekMessage { pub message_id: String, pub insertion_time: DateTime<Utc>, pub expiration_time: DateTime<Utc>, pub dequeue_count: u64, pub message_text: String, } #[derive(Debug, Clone, Serialize, Deserialize)] struct PeekMessagesInternal { #[serde(rename = "QueueMessage")] pub messages: Option<Vec<PeekMessageInternal>>, } impl std::convert::TryFrom<(&HeaderMap, &[u8])> for PeekMessagesResponse { type Error = AzureError; fn try_from(value: (&HeaderMap, &[u8])) -> Result<Self, Self::Error> { let headers = value.0; let body = value.1; debug!("headers == {:?}", headers); let received = &std::str::from_utf8(body)?[3..]; debug!("receieved == {:#?}", received); let response: PeekMessagesInternal = serde_xml_rs::from_reader(&body[3..])?; debug!("response == {:?}", response); let mut messages = Vec::new(); for message in response.messages.unwrap_or_default().into_iter() { messages.push(PeekMessage { message_id: message.message_id, insertion_time: utc_date_from_rfc2822(&message.insertion_time)?, expiration_time: utc_date_from_rfc2822(&message.expiration_time)?, dequeue_count: message.dequeue_count, message_text: message.message_text, }) } Ok(PeekMessagesResponse { common_storage_response_headers: headers.try_into()?, messages, }) } }
use std::path::PathBuf; #[derive(Debug)] pub enum Operation<'a> { AddCategory(&'a str), AddLocation(&'a str, f32, f32), Index(PathBuf), List, ListLike(&'a str), }
use std::fmt; use std::ops::*; /// Scale factor. /// /// This is the width or height of a square tile in pixels. /// /// When zoomed in close, the scale factor is large, and the base-2 logarithm of /// the scale factor is positive. #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)] pub struct Scale { log2_factor: f64, } impl Default for Scale { fn default() -> Self { // 16 pixels per tile is the default in classic Minesweeper. Self::from_factor(16.0) } } impl fmt::Display for Scale { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}:1", self.log2_factor.exp2().round()) } } impl Scale { /// The lower scale limit; i.e. the furthest the player can zoom out. const LOWER_LIMIT: f64 = 3.0; /// The upper scale limit; i.e. the furthest the player can zoom in. const UPPER_LIMIT: f64 = 6.0; /// Creates a `Scale` from a scale factor's base-2 logarithm (e.g. `3.0` = /// 8:1 scale). /// /// # Panics /// /// This function panics if `log2_factor` is not finite. pub fn from_log2_factor(log2_factor: f64) -> Self { assert!(log2_factor.is_finite()); Self { log2_factor } } /// Creates a `Scale` from a scale factor (e.g. `8` = 8:1 scale). /// /// # Panics /// /// This function panics if `factor` is not greater than zero. pub fn from_factor(factor: f64) -> Self { Self::from_log2_factor(factor.log2()) } /// Clamps the scale to the lower and upper limits. This is not /// automatically enforced by `Scale`; it must be called manually. #[must_use = "This method returns a new value instead of mutating its input"] pub fn clamp(self) -> Self { if self.log2_factor < Self::LOWER_LIMIT { Self::from_log2_factor(Self::LOWER_LIMIT) } else if self.log2_factor > Self::UPPER_LIMIT { Self::from_log2_factor(Self::UPPER_LIMIT) } else { self } } /// Returns the base-2 logarithm of the scale factor (e.g. -2.0 = 4:1 scale). pub fn log2_factor(self) -> f64 { self.log2_factor } /// Returns the scale factor, which is the length of pixels per tile. pub fn factor(self) -> f64 { self.log2_factor().exp2() } /// Returns the inverse scale factor. pub fn inv_factor(self) -> f64 { 1.0 / self.factor() } /// Rounds the scale factor to the nearest power of 2. pub fn round(self) -> Self { Self { log2_factor: self.log2_factor.round(), } } } impl Mul<f64> for Scale { type Output = Self; /// Scales up / zooms in by a factor. fn mul(self, factor: f64) -> Self { Self::from_log2_factor(self.log2_factor + factor.log2()) } } impl MulAssign<f64> for Scale { /// Scales up / zooms in by a factor. fn mul_assign(&mut self, factor: f64) { self.log2_factor += factor.log2(); } } impl Div<f64> for Scale { type Output = Self; /// Scales down / zooms out by a factor. fn div(self, factor: f64) -> Self { Self::from_log2_factor(self.log2_factor - factor.log2()) } } impl DivAssign<f64> for Scale { /// Scales down / zooms out by a factor. fn div_assign(&mut self, factor: f64) { self.log2_factor -= factor.log2(); } } impl Div<Scale> for Scale { type Output = f64; /// Computes the ratio between two scales. /// /// # Panics /// /// This operation panics if the result does not fit in an `f64`. fn div(self, other: Self) -> f64 { (self.log2_factor - other.log2_factor).exp2() } }
mod animation_frames; mod interval; mod map; mod window_event; pub use animation_frames::{animation_frames, AnimationFrames}; pub use interval::{interval, Interval}; pub use map::Map; pub use window_event::{window_event, WindowEvent}; use crate::env::Env; use futures::stream::FusedStream; pub trait Subscription { type Msg: 'static; type Stream: FusedStream<Item = Self::Msg>; fn subscribe(self, env: &Env) -> crate::Result<Self::Stream>; /// Map the message type to another one. fn map<F, TMsg>(self, f: F) -> Map<Self, F> where Self: Sized, F: FnMut(Self::Msg) -> TMsg, TMsg: 'static, { Map::new(self, f) } }
use crate::{ db::HirDatabase, fold::{HirFoldable, HirFolder, HirVisitor}, ids::{Identifier, ScopedIdentifier}, }; use core::{ fmt, iter::{from_fn, once}, }; use valis_ds::{FmtWith, Intern, Untern}; use valis_ds_macros::DebugWith; use valis_syntax::Symbol; #[derive(Debug, DebugWith, Clone, PartialEq, Eq, Hash)] pub struct IdentifierData { pub text: Symbol, } impl Identifier { pub fn get_text(self, db: &impl HirDatabase) -> String { db.lookup_intern_symbol(db.lookup_intern_identifier(self).text) } pub fn get_ident(name: String, db: &impl HirDatabase) -> Identifier { db.intern_identifier(IdentifierData { text: db.intern_symbol(name), }) } } impl From<Symbol> for IdentifierData { fn from(text: Symbol) -> Self { IdentifierData { text } } } impl<Cx: HirDatabase> FmtWith<Cx> for Identifier { fn fmt_with_specialized(&self, cx: &Cx, fmt: &mut fmt::Formatter) -> fmt::Result { write!(fmt, "{}", self.get_text(cx)) } } impl HirFoldable for Identifier { fn super_fold_with<F: HirFolder>(&self, _folder: &mut F) -> Self { Clone::clone(self) } fn super_visit_with<V: HirVisitor>(&self, visitor: &mut V) -> V::Output { visitor.default_output() } fn fold_with<F: HirFolder>(&self, folder: &mut F) -> Self { folder.fold_identifier(*self) } fn visit_with<V: HirVisitor>(&self, visitor: &mut V) -> V::Output { visitor.visit_identifier(*self) } } #[derive(Debug, DebugWith, Clone, PartialEq, Eq, Hash)] pub struct ScopedIdentifierData { pub parent: Option<ScopedIdentifier>, pub name: Identifier, } impl ScopedIdentifier { #[allow(clippy::wrong_self_convention)] pub fn new(parent: ScopedIdentifier, name: Identifier, db: &impl HirDatabase) -> Self { ScopedIdentifierData { parent: Some(parent), name, } .intern(db.into()) } pub fn root(name: Identifier, db: &impl HirDatabase) -> Self { ScopedIdentifierData { name, parent: None }.intern(db.into()) } pub fn child(self, name: Identifier, db: &impl HirDatabase) -> Self { ScopedIdentifierData { parent: Some(self), name, } .intern(db.into()) } pub fn parent(self, db: &impl HirDatabase) -> Option<Self> { self.untern(db.into()).parent } pub fn from_iter<T: IntoIterator<Item = Identifier>>(iter: T, db: &impl HirDatabase) -> Self { let mut it = iter.into_iter(); if let Some(first) = it.next() { let mut current = ScopedIdentifier::root(first, db); for child_name in it { current = current.child(child_name, db); } current } else { panic!("called `ScopedIdentifier::from_iter` on an empty iterator") } } // Lazily return each of the identifiers that comprise this scoped identifier, // starting with the base and moving towards the top level identifier. pub fn lazy_expansion( self, db: &impl HirDatabase, ) -> impl Iterator<Item = ScopedIdentifierData> + '_ { let tables = db.into(); let mut current = Some(self); from_fn(move || { if let Some(current_ident) = current { let current_data = current_ident.untern(tables); current = current_data.parent; Some(current_data) } else { None } }) } // Return the expansion of the scoped identifier with the most top level // identifier as the first in the list, and the most specific identifier as last pub fn expand(self, db: &impl HirDatabase) -> Vec<Identifier> { let mut result: Vec<_> = self .lazy_expansion(db) .map(|scoped_data| scoped_data.name) .collect(); result.reverse(); result } // find the longest common prefix that both ScopedIdentifiers share pub fn common_prefix(self, other: Self, db: &impl HirDatabase) -> Option<ScopedIdentifier> { // this a list of the ScopedIdentifiers that comprise the overall 'self' // ScopedIdentifier. Each earlier ScopedIdentifier implies all the later ones let self_expanded: Vec<ScopedIdentifier> = once(self) .chain( self.lazy_expansion(db) .filter_map(|scoped_data| scoped_data.parent), ) .collect(); // this same situation as above for 'other'. This one is lazily generated // because each ScopedIdentifier will only be needed once. let other_scoped_ident_it = once(other).chain( other .lazy_expansion(db) .filter_map(|scoped_data| scoped_data.parent), ); for scoped_ident in other_scoped_ident_it { let found_match = self_expanded .iter() // This searches from left to right to find the longest implied match .find(|self_scoped_ident| scoped_ident == **self_scoped_ident); if found_match.is_some() { return found_match.copied(); } } None } } impl<Cx: HirDatabase> FmtWith<Cx> for ScopedIdentifier { fn fmt_with_specialized(&self, cx: &Cx, fmt: &mut fmt::Formatter) -> fmt::Result { let mut expanded: Vec<_> = self .lazy_expansion(cx) .map(|scoped_data| scoped_data.name.get_text(cx)) .collect(); expanded.reverse(); write!(fmt, "{}", expanded.join("::")) } } impl HirFoldable for ScopedIdentifier { fn super_fold_with<F: HirFolder>(&self, folder: &mut F) -> Self { let ScopedIdentifierData { parent, name } = self.untern(folder.tables()); let new_parent = parent.fold_with(folder); let new_name = name.fold_with(folder); if new_parent == parent && new_name == name { *self } else { ScopedIdentifierData { parent: new_parent, name: new_name, } .intern(folder.tables()) } } fn super_visit_with<V: HirVisitor>(&self, visitor: &mut V) -> V::Output { let ScopedIdentifierData { parent, name } = self.untern(visitor.tables()); let o1 = parent.visit_with(visitor); let o2 = name.visit_with(visitor); visitor.combine_output(o1, o2) } fn fold_with<F: HirFolder>(&self, folder: &mut F) -> Self { folder.fold_scoped_identifier(*self) } fn visit_with<V: HirVisitor>(&self, visitor: &mut V) -> V::Output { visitor.visit_scoped_identifier(*self) } }
#[doc = "Register `HISR` reader"] pub type R = crate::R<HISR_SPEC>; #[doc = "Field `FEIF4` reader - Stream x FIFO error interrupt flag (x=7..4)"] pub type FEIF4_R = crate::BitReader<FEIF4_A>; #[doc = "Stream x FIFO error interrupt flag (x=7..4)\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum FEIF4_A { #[doc = "0: No FIFO error event on stream x"] NoError = 0, #[doc = "1: A FIFO error event occurred on stream x"] Error = 1, } impl From<FEIF4_A> for bool { #[inline(always)] fn from(variant: FEIF4_A) -> Self { variant as u8 != 0 } } impl FEIF4_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> FEIF4_A { match self.bits { false => FEIF4_A::NoError, true => FEIF4_A::Error, } } #[doc = "No FIFO error event on stream x"] #[inline(always)] pub fn is_no_error(&self) -> bool { *self == FEIF4_A::NoError } #[doc = "A FIFO error event occurred on stream x"] #[inline(always)] pub fn is_error(&self) -> bool { *self == FEIF4_A::Error } } #[doc = "Field `DMEIF4` reader - Stream x direct mode error interrupt flag (x=7..4)"] pub type DMEIF4_R = crate::BitReader<DMEIF4_A>; #[doc = "Stream x direct mode error interrupt flag (x=7..4)\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum DMEIF4_A { #[doc = "0: No Direct Mode error on stream x"] NoError = 0, #[doc = "1: A Direct Mode error occurred on stream x"] Error = 1, } impl From<DMEIF4_A> for bool { #[inline(always)] fn from(variant: DMEIF4_A) -> Self { variant as u8 != 0 } } impl DMEIF4_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> DMEIF4_A { match self.bits { false => DMEIF4_A::NoError, true => DMEIF4_A::Error, } } #[doc = "No Direct Mode error on stream x"] #[inline(always)] pub fn is_no_error(&self) -> bool { *self == DMEIF4_A::NoError } #[doc = "A Direct Mode error occurred on stream x"] #[inline(always)] pub fn is_error(&self) -> bool { *self == DMEIF4_A::Error } } #[doc = "Field `TEIF4` reader - Stream x transfer error interrupt flag (x=7..4)"] pub type TEIF4_R = crate::BitReader<TEIF4_A>; #[doc = "Stream x transfer error interrupt flag (x=7..4)\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum TEIF4_A { #[doc = "0: No transfer error on stream x"] NoError = 0, #[doc = "1: A transfer error occurred on stream x"] Error = 1, } impl From<TEIF4_A> for bool { #[inline(always)] fn from(variant: TEIF4_A) -> Self { variant as u8 != 0 } } impl TEIF4_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> TEIF4_A { match self.bits { false => TEIF4_A::NoError, true => TEIF4_A::Error, } } #[doc = "No transfer error on stream x"] #[inline(always)] pub fn is_no_error(&self) -> bool { *self == TEIF4_A::NoError } #[doc = "A transfer error occurred on stream x"] #[inline(always)] pub fn is_error(&self) -> bool { *self == TEIF4_A::Error } } #[doc = "Field `HTIF4` reader - Stream x half transfer interrupt flag (x=7..4)"] pub type HTIF4_R = crate::BitReader<HTIF4_A>; #[doc = "Stream x half transfer interrupt flag (x=7..4)\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum HTIF4_A { #[doc = "0: No half transfer event on stream x"] NotHalf = 0, #[doc = "1: A half transfer event occurred on stream x"] Half = 1, } impl From<HTIF4_A> for bool { #[inline(always)] fn from(variant: HTIF4_A) -> Self { variant as u8 != 0 } } impl HTIF4_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> HTIF4_A { match self.bits { false => HTIF4_A::NotHalf, true => HTIF4_A::Half, } } #[doc = "No half transfer event on stream x"] #[inline(always)] pub fn is_not_half(&self) -> bool { *self == HTIF4_A::NotHalf } #[doc = "A half transfer event occurred on stream x"] #[inline(always)] pub fn is_half(&self) -> bool { *self == HTIF4_A::Half } } #[doc = "Field `TCIF4` reader - Stream x transfer complete interrupt flag (x=7..4)"] pub type TCIF4_R = crate::BitReader<TCIF4_A>; #[doc = "Stream x transfer complete interrupt flag (x=7..4)\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum TCIF4_A { #[doc = "0: No transfer complete event on stream x"] NotComplete = 0, #[doc = "1: A transfer complete event occurred on stream x"] Complete = 1, } impl From<TCIF4_A> for bool { #[inline(always)] fn from(variant: TCIF4_A) -> Self { variant as u8 != 0 } } impl TCIF4_R { #[doc = "Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> TCIF4_A { match self.bits { false => TCIF4_A::NotComplete, true => TCIF4_A::Complete, } } #[doc = "No transfer complete event on stream x"] #[inline(always)] pub fn is_not_complete(&self) -> bool { *self == TCIF4_A::NotComplete } #[doc = "A transfer complete event occurred on stream x"] #[inline(always)] pub fn is_complete(&self) -> bool { *self == TCIF4_A::Complete } } #[doc = "Field `DMEIF5` reader - Stream x direct mode error interrupt flag (x=7..4)"] pub use DMEIF4_R as DMEIF5_R; #[doc = "Field `DMEIF6` reader - Stream x direct mode error interrupt flag (x=7..4)"] pub use DMEIF4_R as DMEIF6_R; #[doc = "Field `DMEIF7` reader - Stream x direct mode error interrupt flag (x=7..4)"] pub use DMEIF4_R as DMEIF7_R; #[doc = "Field `FEIF5` reader - Stream x FIFO error interrupt flag (x=7..4)"] pub use FEIF4_R as FEIF5_R; #[doc = "Field `FEIF6` reader - Stream x FIFO error interrupt flag (x=7..4)"] pub use FEIF4_R as FEIF6_R; #[doc = "Field `FEIF7` reader - Stream x FIFO error interrupt flag (x=7..4)"] pub use FEIF4_R as FEIF7_R; #[doc = "Field `HTIF5` reader - Stream x half transfer interrupt flag (x=7..4)"] pub use HTIF4_R as HTIF5_R; #[doc = "Field `HTIF6` reader - Stream x half transfer interrupt flag (x=7..4)"] pub use HTIF4_R as HTIF6_R; #[doc = "Field `HTIF7` reader - Stream x half transfer interrupt flag (x=7..4)"] pub use HTIF4_R as HTIF7_R; #[doc = "Field `TCIF5` reader - Stream x transfer complete interrupt flag (x=7..4)"] pub use TCIF4_R as TCIF5_R; #[doc = "Field `TCIF6` reader - Stream x transfer complete interrupt flag (x=7..4)"] pub use TCIF4_R as TCIF6_R; #[doc = "Field `TCIF7` reader - Stream x transfer complete interrupt flag (x=7..4)"] pub use TCIF4_R as TCIF7_R; #[doc = "Field `TEIF5` reader - Stream x transfer error interrupt flag (x=7..4)"] pub use TEIF4_R as TEIF5_R; #[doc = "Field `TEIF6` reader - Stream x transfer error interrupt flag (x=7..4)"] pub use TEIF4_R as TEIF6_R; #[doc = "Field `TEIF7` reader - Stream x transfer error interrupt flag (x=7..4)"] pub use TEIF4_R as TEIF7_R; impl R { #[doc = "Bit 0 - Stream x FIFO error interrupt flag (x=7..4)"] #[inline(always)] pub fn feif4(&self) -> FEIF4_R { FEIF4_R::new((self.bits & 1) != 0) } #[doc = "Bit 2 - Stream x direct mode error interrupt flag (x=7..4)"] #[inline(always)] pub fn dmeif4(&self) -> DMEIF4_R { DMEIF4_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3 - Stream x transfer error interrupt flag (x=7..4)"] #[inline(always)] pub fn teif4(&self) -> TEIF4_R { TEIF4_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4 - Stream x half transfer interrupt flag (x=7..4)"] #[inline(always)] pub fn htif4(&self) -> HTIF4_R { HTIF4_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Stream x transfer complete interrupt flag (x=7..4)"] #[inline(always)] pub fn tcif4(&self) -> TCIF4_R { TCIF4_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - Stream x FIFO error interrupt flag (x=7..4)"] #[inline(always)] pub fn feif5(&self) -> FEIF5_R { FEIF5_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 8 - Stream x direct mode error interrupt flag (x=7..4)"] #[inline(always)] pub fn dmeif5(&self) -> DMEIF5_R { DMEIF5_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9 - Stream x transfer error interrupt flag (x=7..4)"] #[inline(always)] pub fn teif5(&self) -> TEIF5_R { TEIF5_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10 - Stream x half transfer interrupt flag (x=7..4)"] #[inline(always)] pub fn htif5(&self) -> HTIF5_R { HTIF5_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Stream x transfer complete interrupt flag (x=7..4)"] #[inline(always)] pub fn tcif5(&self) -> TCIF5_R { TCIF5_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 16 - Stream x FIFO error interrupt flag (x=7..4)"] #[inline(always)] pub fn feif6(&self) -> FEIF6_R { FEIF6_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 18 - Stream x direct mode error interrupt flag (x=7..4)"] #[inline(always)] pub fn dmeif6(&self) -> DMEIF6_R { DMEIF6_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19 - Stream x transfer error interrupt flag (x=7..4)"] #[inline(always)] pub fn teif6(&self) -> TEIF6_R { TEIF6_R::new(((self.bits >> 19) & 1) != 0) } #[doc = "Bit 20 - Stream x half transfer interrupt flag (x=7..4)"] #[inline(always)] pub fn htif6(&self) -> HTIF6_R { HTIF6_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 21 - Stream x transfer complete interrupt flag (x=7..4)"] #[inline(always)] pub fn tcif6(&self) -> TCIF6_R { TCIF6_R::new(((self.bits >> 21) & 1) != 0) } #[doc = "Bit 22 - Stream x FIFO error interrupt flag (x=7..4)"] #[inline(always)] pub fn feif7(&self) -> FEIF7_R { FEIF7_R::new(((self.bits >> 22) & 1) != 0) } #[doc = "Bit 24 - Stream x direct mode error interrupt flag (x=7..4)"] #[inline(always)] pub fn dmeif7(&self) -> DMEIF7_R { DMEIF7_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25 - Stream x transfer error interrupt flag (x=7..4)"] #[inline(always)] pub fn teif7(&self) -> TEIF7_R { TEIF7_R::new(((self.bits >> 25) & 1) != 0) } #[doc = "Bit 26 - Stream x half transfer interrupt flag (x=7..4)"] #[inline(always)] pub fn htif7(&self) -> HTIF7_R { HTIF7_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bit 27 - Stream x transfer complete interrupt flag (x=7..4)"] #[inline(always)] pub fn tcif7(&self) -> TCIF7_R { TCIF7_R::new(((self.bits >> 27) & 1) != 0) } } #[doc = "high interrupt status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`hisr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct HISR_SPEC; impl crate::RegisterSpec for HISR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`hisr::R`](R) reader structure"] impl crate::Readable for HISR_SPEC {} #[doc = "`reset()` method sets HISR to value 0"] impl crate::Resettable for HISR_SPEC { const RESET_VALUE: Self::Ux = 0; }
use std::collections::HashMap; use util::ConvCoord; pub fn create_3d_maze_walls_w( colors: &HashMap<::na::Vector3<isize>, (::graphics::Color, bool)>, maze: &::maze::Maze<::na::U3>, world: &::specs::World, ) { create_3d_maze_walls( &colors, maze, &mut world.write(), &mut world.write(), &mut world.write_resource(), &world.read_resource(), &world.read_resource(), ); } pub fn create_3d_maze_walls<'a>( colors: &HashMap<::na::Vector3<isize>, (::graphics::Color, bool)>, maze: &::maze::Maze<::na::U3>, bodies: &mut ::specs::WriteStorage<'a, ::component::PhysicBody>, static_draws: &mut ::specs::WriteStorage<'a, ::component::StaticDraw>, physic_world: &mut ::specs::FetchMut<'a, ::resource::PhysicWorld>, graphics: &::specs::Fetch<'a, ::resource::Graphics>, entities: &::specs::Entities, ) { let index = |x, y, z, o| match o { 0 => x as usize * 3, 1 => y as usize * 3 + o, 2 => z as usize * 3 + o, _ => unreachable!(), }; let groups = ::graphics::Primitive::Plane .reserve(maze.size.iter().max().unwrap().clone() as usize * 3 + 3); let groups_color = groups.iter().map(|_| ::CONFIG.random_wall_color()).collect::<Vec<_>>(); for cell in &maze.walls { ::entity::create_wall_cube_physic( maze.to_world(cell), maze.scale / 2.0, bodies, physic_world, entities, ); for dl in &maze.neighbours { let neighbour = cell + dl; if maze.walls.contains(&neighbour) { continue; } let orientation = dl.iter() .enumerate() .find(|&(_, &n)| n != 0) .map(|(i, _)| i) .unwrap(); // FIXME: activated let (color, groups) = if let Some(&(color, _)) = colors.get(&neighbour) { ( color.clone(), ::graphics::Primitive::Plane.reserve(1).pop().unwrap(), ) } else { let i = index(cell[0], cell[1], cell[2], orientation); ( groups_color[i], groups[i].clone(), ) }; let dl_f32 = ::na::Vector3::new(dl[0] as f32, dl[1] as f32, dl[2] as f32) * maze.scale / 2.; let pos = ::na::Isometry3::new(maze.to_world(cell) + dl_f32, dl.axis_angle_z()); ::entity::create_wall_side_draw( pos, maze.scale / 2., color, groups, static_draws, graphics, entities, ); } } }
#[doc = "Reader of register DDRCTRL_PCFGWQOS0_1"] pub type R = crate::R<u32, super::DDRCTRL_PCFGWQOS0_1>; #[doc = "Writer for register DDRCTRL_PCFGWQOS0_1"] pub type W = crate::W<u32, super::DDRCTRL_PCFGWQOS0_1>; #[doc = "Register DDRCTRL_PCFGWQOS0_1 `reset()`'s with value 0x0e00"] impl crate::ResetValue for super::DDRCTRL_PCFGWQOS0_1 { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x0e00 } } #[doc = "Reader of field `WQOS_MAP_LEVEL1`"] pub type WQOS_MAP_LEVEL1_R = crate::R<u8, u8>; #[doc = "Write proxy for field `WQOS_MAP_LEVEL1`"] pub struct WQOS_MAP_LEVEL1_W<'a> { w: &'a mut W, } impl<'a> WQOS_MAP_LEVEL1_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } #[doc = "Reader of field `WQOS_MAP_LEVEL2`"] pub type WQOS_MAP_LEVEL2_R = crate::R<u8, u8>; #[doc = "Write proxy for field `WQOS_MAP_LEVEL2`"] pub struct WQOS_MAP_LEVEL2_W<'a> { w: &'a mut W, } impl<'a> WQOS_MAP_LEVEL2_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } #[doc = "WQOS_MAP_REGION0\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum WQOS_MAP_REGION0_A { #[doc = "0: NPW, 1: VPW."] B_0X0 = 0, } impl From<WQOS_MAP_REGION0_A> for u8 { #[inline(always)] fn from(variant: WQOS_MAP_REGION0_A) -> Self { variant as _ } } #[doc = "Reader of field `WQOS_MAP_REGION0`"] pub type WQOS_MAP_REGION0_R = crate::R<u8, WQOS_MAP_REGION0_A>; impl WQOS_MAP_REGION0_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, WQOS_MAP_REGION0_A> { use crate::Variant::*; match self.bits { 0 => Val(WQOS_MAP_REGION0_A::B_0X0), i => Res(i), } } #[doc = "Checks if the value of the field is `B_0X0`"] #[inline(always)] pub fn is_b_0x0(&self) -> bool { *self == WQOS_MAP_REGION0_A::B_0X0 } } #[doc = "Write proxy for field `WQOS_MAP_REGION0`"] pub struct WQOS_MAP_REGION0_W<'a> { w: &'a mut W, } impl<'a> WQOS_MAP_REGION0_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: WQOS_MAP_REGION0_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "NPW, 1: VPW."] #[inline(always)] pub fn b_0x0(self) -> &'a mut W { self.variant(WQOS_MAP_REGION0_A::B_0X0) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16); self.w } } #[doc = "WQOS_MAP_REGION1\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum WQOS_MAP_REGION1_A { #[doc = "0: NPW, 1: VPW."] B_0X0 = 0, } impl From<WQOS_MAP_REGION1_A> for u8 { #[inline(always)] fn from(variant: WQOS_MAP_REGION1_A) -> Self { variant as _ } } #[doc = "Reader of field `WQOS_MAP_REGION1`"] pub type WQOS_MAP_REGION1_R = crate::R<u8, WQOS_MAP_REGION1_A>; impl WQOS_MAP_REGION1_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, WQOS_MAP_REGION1_A> { use crate::Variant::*; match self.bits { 0 => Val(WQOS_MAP_REGION1_A::B_0X0), i => Res(i), } } #[doc = "Checks if the value of the field is `B_0X0`"] #[inline(always)] pub fn is_b_0x0(&self) -> bool { *self == WQOS_MAP_REGION1_A::B_0X0 } } #[doc = "Write proxy for field `WQOS_MAP_REGION1`"] pub struct WQOS_MAP_REGION1_W<'a> { w: &'a mut W, } impl<'a> WQOS_MAP_REGION1_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: WQOS_MAP_REGION1_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "NPW, 1: VPW."] #[inline(always)] pub fn b_0x0(self) -> &'a mut W { self.variant(WQOS_MAP_REGION1_A::B_0X0) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20); self.w } } #[doc = "WQOS_MAP_REGION2\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum WQOS_MAP_REGION2_A { #[doc = "0: NPW, 1: VPW."] B_0X0 = 0, } impl From<WQOS_MAP_REGION2_A> for u8 { #[inline(always)] fn from(variant: WQOS_MAP_REGION2_A) -> Self { variant as _ } } #[doc = "Reader of field `WQOS_MAP_REGION2`"] pub type WQOS_MAP_REGION2_R = crate::R<u8, WQOS_MAP_REGION2_A>; impl WQOS_MAP_REGION2_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, WQOS_MAP_REGION2_A> { use crate::Variant::*; match self.bits { 0 => Val(WQOS_MAP_REGION2_A::B_0X0), i => Res(i), } } #[doc = "Checks if the value of the field is `B_0X0`"] #[inline(always)] pub fn is_b_0x0(&self) -> bool { *self == WQOS_MAP_REGION2_A::B_0X0 } } #[doc = "Write proxy for field `WQOS_MAP_REGION2`"] pub struct WQOS_MAP_REGION2_W<'a> { w: &'a mut W, } impl<'a> WQOS_MAP_REGION2_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: WQOS_MAP_REGION2_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "NPW, 1: VPW."] #[inline(always)] pub fn b_0x0(self) -> &'a mut W { self.variant(WQOS_MAP_REGION2_A::B_0X0) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); self.w } } impl R { #[doc = "Bits 0:3 - WQOS_MAP_LEVEL1"] #[inline(always)] pub fn wqos_map_level1(&self) -> WQOS_MAP_LEVEL1_R { WQOS_MAP_LEVEL1_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 8:11 - WQOS_MAP_LEVEL2"] #[inline(always)] pub fn wqos_map_level2(&self) -> WQOS_MAP_LEVEL2_R { WQOS_MAP_LEVEL2_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 16:17 - WQOS_MAP_REGION0"] #[inline(always)] pub fn wqos_map_region0(&self) -> WQOS_MAP_REGION0_R { WQOS_MAP_REGION0_R::new(((self.bits >> 16) & 0x03) as u8) } #[doc = "Bits 20:21 - WQOS_MAP_REGION1"] #[inline(always)] pub fn wqos_map_region1(&self) -> WQOS_MAP_REGION1_R { WQOS_MAP_REGION1_R::new(((self.bits >> 20) & 0x03) as u8) } #[doc = "Bits 24:25 - WQOS_MAP_REGION2"] #[inline(always)] pub fn wqos_map_region2(&self) -> WQOS_MAP_REGION2_R { WQOS_MAP_REGION2_R::new(((self.bits >> 24) & 0x03) as u8) } } impl W { #[doc = "Bits 0:3 - WQOS_MAP_LEVEL1"] #[inline(always)] pub fn wqos_map_level1(&mut self) -> WQOS_MAP_LEVEL1_W { WQOS_MAP_LEVEL1_W { w: self } } #[doc = "Bits 8:11 - WQOS_MAP_LEVEL2"] #[inline(always)] pub fn wqos_map_level2(&mut self) -> WQOS_MAP_LEVEL2_W { WQOS_MAP_LEVEL2_W { w: self } } #[doc = "Bits 16:17 - WQOS_MAP_REGION0"] #[inline(always)] pub fn wqos_map_region0(&mut self) -> WQOS_MAP_REGION0_W { WQOS_MAP_REGION0_W { w: self } } #[doc = "Bits 20:21 - WQOS_MAP_REGION1"] #[inline(always)] pub fn wqos_map_region1(&mut self) -> WQOS_MAP_REGION1_W { WQOS_MAP_REGION1_W { w: self } } #[doc = "Bits 24:25 - WQOS_MAP_REGION2"] #[inline(always)] pub fn wqos_map_region2(&mut self) -> WQOS_MAP_REGION2_W { WQOS_MAP_REGION2_W { w: self } } }
use regex::Captures; #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub struct Position { pub x: isize, pub y: isize, } #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub enum Direction { North, East, South, West, } pub fn move_in_direction(pos: &Position, dir: &Direction) -> Position { match dir { Direction::North => Position { x: pos.x, y: pos.y - 1, }, Direction::South => Position { x: pos.x, y: pos.y + 1, }, Direction::East => Position { x: pos.x + 1, y: pos.y, }, Direction::West => Position { x: pos.x - 1, y: pos.y, }, } } pub fn manhattan_distance(x1: isize, y1: isize, x2: isize, y2: isize) -> usize { (x1 as isize - x2 as isize).abs() as usize + (y1 as isize - y2 as isize).abs() as usize } #[test] fn test_manhattan_distance() { assert_eq!(manhattan_distance(0, 0, 1, 1), 2); assert_eq!(manhattan_distance(0, 1, 1, 1), 1); assert_eq!(manhattan_distance(1, 1, 1, 1), 0); assert_eq!(manhattan_distance(1, 1, 3, 0), 3); } pub fn get_number_match(capture: &Captures<'_>, index: usize) -> usize { capture.get(index).unwrap().as_str().parse().unwrap() } pub fn get_string_match<'l>(capture: &Captures<'l>, index: usize) -> &'l str { capture.get(index).unwrap().as_str() }
use chrono::{DateTime, NaiveDateTime, Utc}; use futures::TryStreamExt; use crate::models::ItemType; #[derive(Debug)] pub struct Comic { pub id: u16, pub image_type: i32, pub is_guest_comic: u8, pub is_non_canon: u8, pub has_no_cast: u8, pub has_no_location: u8, pub has_no_storyline: u8, pub has_no_title: u8, pub has_no_tagline: u8, pub title: String, pub tagline: Option<String>, pub publish_date: Option<NaiveDateTime>, pub is_accurate_publish_date: u8, } impl Comic { pub async fn count<'e, 'c: 'e, E>(executor: E) -> sqlx::Result<i64> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT COUNT(*) FROM `Comic` "#, ) .fetch_one(executor) .await } pub async fn all_with_mapping<'e, 'c: 'e, E, T, F>( executor: E, include_guest_comics: Option<bool>, include_non_canon_comics: Option<bool>, map: F, ) -> sqlx::Result<Vec<T>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, F: FnMut(Self) -> T, { sqlx::query_as!( Self, r#" SELECT * FROM `Comic` WHERE (? is NULL OR `is_guest_comic` = ?) AND (? is NULL OR `is_non_canon` = ?) ORDER BY `id` ASC "#, include_guest_comics, include_guest_comics, include_non_canon_comics, include_non_canon_comics ) .fetch(executor) .map_ok(map) .try_collect() .await } pub async fn ensure_exists_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" INSERT IGNORE INTO `Comic` (`id`) VALUES (?) "#, id, ) .execute(executor) .await } pub async fn exists_by_id<'e, 'c: 'e, E>(executor: E, id: u16) -> sqlx::Result<bool> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT COUNT(1) FROM `Comic` WHERE `id` = ? "#, id, ) .fetch_one(executor) .await .map(|c| c == 1) } pub async fn by_id<'e, 'c: 'e, E>(executor: E, id: u16) -> sqlx::Result<Option<Self>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_as!( Self, r#" SELECT * FROM `Comic` WHERE `id` = ? "#, id ) .fetch_optional(executor) .await } pub async fn previous_id<'e, 'c: 'e, E>( executor: E, id: u16, include_guest_comics: Option<bool>, include_non_canon_comics: Option<bool>, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `id` FROM `Comic` WHERE `id` < ? AND (? is NULL OR `is_guest_comic` = ?) AND (? is NULL OR `is_non_canon` = ?) ORDER BY `id` DESC "#, id, include_guest_comics, include_guest_comics, include_non_canon_comics, include_non_canon_comics, ) .fetch_optional(executor) .await } pub async fn next_id<'e, 'c: 'e, E>( executor: E, id: u16, include_guest_comics: Option<bool>, include_non_canon_comics: Option<bool>, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `id` FROM `Comic` WHERE `id` > ? AND (? is NULL OR `is_guest_comic` = ?) AND (? is NULL OR `is_non_canon` = ?) ORDER BY `id` ASC "#, id, include_guest_comics, include_guest_comics, include_non_canon_comics, include_non_canon_comics, ) .fetch_optional(executor) .await } pub async fn publish_date_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<Option<NaiveDateTime>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `publish_date` FROM `Comic` WHERE `id` = ? "#, id ) .fetch_one(executor) .await } pub async fn update_publish_date_by_id<'e, 'c: 'e, E>( executor: E, id: u16, publish_date: DateTime<Utc>, is_accurate_publish_date: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `publish_date` = ?, `is_accurate_publish_date` = ? WHERE `id` = ? "#, publish_date.naive_utc(), is_accurate_publish_date, id, ) .execute(executor) .await } pub async fn update_is_guest_comic_by_id<'e, 'c: 'e, E>( executor: E, id: u16, is_guest_comic: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `is_guest_comic` = ? WHERE `id` = ? "#, is_guest_comic, id, ) .execute(executor) .await } pub async fn update_is_non_canon_by_id<'e, 'c: 'e, E>( executor: E, id: u16, is_non_canon: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `is_non_canon` = ? WHERE `id` = ? "#, is_non_canon, id, ) .execute(executor) .await } pub async fn update_has_no_cast_by_id<'e, 'c: 'e, E>( executor: E, id: u16, has_no_cast: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `has_no_cast` = ? WHERE `id` = ? "#, has_no_cast, id, ) .execute(executor) .await } pub async fn update_has_no_location_by_id<'e, 'c: 'e, E>( executor: E, id: u16, has_no_location: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `has_no_location` = ? WHERE `id` = ? "#, has_no_location, id, ) .execute(executor) .await } pub async fn update_has_no_storyline_by_id<'e, 'c: 'e, E>( executor: E, id: u16, has_no_storyline: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `has_no_storyline` = ? WHERE `id` = ? "#, has_no_storyline, id, ) .execute(executor) .await } pub async fn update_has_no_title_by_id<'e, 'c: 'e, E>( executor: E, id: u16, has_no_title: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `has_no_title` = ? WHERE `id` = ? "#, has_no_title, id, ) .execute(executor) .await } pub async fn update_has_no_tagline_by_id<'e, 'c: 'e, E>( executor: E, id: u16, has_no_tagline: bool, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" UPDATE `Comic` SET `has_no_tagline` = ? WHERE `id` = ? "#, has_no_tagline, id, ) .execute(executor) .await } pub async fn first_and_last_missing_tagline<'e, 'c: 'e, E>( executor: E, ) -> sqlx::Result<(Option<u16>, Option<u16>)> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_as!( FirstLast, r#" SELECT MIN(`c`.`id`) as `first`, MAX(`c`.`id`) as `last` FROM `Comic` `c` WHERE (`c`.`tagline` IS NULL or NULLIF(`c`.`tagline`, '') IS NULL) AND NOT `c`.`has_no_tagline` AND `c`.`id` > 3132 "# ) .fetch_optional(executor) .await .map(|ofl| ofl.map_or((None, None), |fl| (fl.first, fl.last))) } pub async fn previous_missing_tagline_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE (`c`.`tagline` IS NULL OR NULLIF(`c`.`tagline`, '') IS NULL) AND NOT `c`.`has_no_tagline` AND `c`.`id` < ? AND `c`.`id` > 3132 ORDER BY `c`.`id` DESC LIMIT 1 "#, id ) .fetch_optional(executor) .await } pub async fn next_missing_tagline_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE (`c`.`tagline` IS NULL OR NULLIF(c.`tagline`, '') IS NULL) AND NOT `c`.`has_no_tagline` AND `c`.`id` > ? AND `c`.`id` > 3132 ORDER BY `c`.`id` ASC LIMIT 1 "#, id ) .fetch_optional(executor) .await } // --- pub async fn first_and_last_missing_title<'e, 'c: 'e, E>( executor: E, ) -> sqlx::Result<(Option<u16>, Option<u16>)> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_as!( FirstLast, r#" SELECT MIN(`c`.`id`) as `first`, MAX(`c`.`id`) as `last` FROM `Comic` `c` WHERE (`c`.`title` IS NULL or NULLIF(`c`.`title`, '') IS NULL) AND NOT `c`.`has_no_title` "# ) .fetch_optional(executor) .await .map(|ofl| ofl.map_or((None, None), |fl| (fl.first, fl.last))) } pub async fn previous_missing_title_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE (`c`.`title` IS NULL OR NULLIF(`c`.`title`, '') IS NULL) AND NOT `c`.`has_no_title` AND `c`.`id` < ? ORDER BY `c`.`id` DESC LIMIT 1 "#, id ) .fetch_optional(executor) .await } pub async fn next_missing_title_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE (`c`.`title` IS NULL OR NULLIF(`c`.`title`, '') IS NULL) AND NOT `c`.`has_no_title` AND `c`.`id` > ? ORDER BY `c`.`id` ASC LIMIT 1 "#, id ) .fetch_optional(executor) .await } // --- pub async fn first_missing_items_by_type<'e, 'c: 'e, E>( executor: E, r#type: ItemType, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { let r#type = r#type.as_str(); sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE `c`.`id` NOT IN ( SELECT `o`.`comic_id` FROM `Occurrence` `o` LEFT JOIN `Item` `i` ON `o`.`item_id` = `i`.`id` WHERE `i`.`type` = ? AND `o`.`comic_id` = `c`.`id` GROUP BY `o`.`comic_id` ) AND (? <> 'cast' OR NOT `c`.`has_no_cast`) AND (? <> 'location' OR NOT `c`.`has_no_location`) AND (? <> 'storyline' OR NOT `c`.`has_no_storyline`) ORDER BY `c`.`id` ASC LIMIT 1 "#, r#type, r#type, r#type, r#type ) .fetch_optional(executor) .await } pub async fn previous_missing_items_by_id_and_type<'e, 'c: 'e, E>( executor: E, id: u16, r#type: ItemType, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { let r#type = r#type.as_str(); sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE `c`.`id` NOT IN ( SELECT `o`.`comic_id` FROM `Occurrence` `o` LEFT JOIN `Item` `i` ON `o`.`item_id` = `i`.`id` WHERE `i`.`type` = ? AND `o`.`comic_id` = `c`.`id` GROUP BY `o`.`comic_id` ) AND `c`.`id` < ? AND (? <> 'cast' OR NOT `c`.`has_no_cast`) AND (? <> 'location' OR NOT `c`.`has_no_location`) AND (? <> 'storyline' OR NOT `c`.`has_no_storyline`) ORDER BY c.id DESC LIMIT 1 "#, r#type, id, r#type, r#type, r#type ) .fetch_optional(executor) .await } pub async fn next_missing_items_by_id_and_type<'e, 'c: 'e, E>( executor: E, id: u16, r#type: ItemType, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { let r#type = r#type.as_str(); sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE `c`.`id` NOT IN ( SELECT `o`.`comic_id` FROM `Occurrence` `o` LEFT JOIN `Item` `i` ON `o`.`item_id` = `i`.`id` WHERE `i`.`type` = ? AND `o`.`comic_id` = `c`.`id` GROUP BY `o`.`comic_id` ) AND `c`.`id` > ? AND (? <> 'cast' OR NOT `c`.`has_no_cast`) AND (? <> 'location' OR NOT `c`.`has_no_location`) AND (? <> 'storyline' OR NOT `c`.`has_no_storyline`) ORDER BY `c`.`id` ASC LIMIT 1 "#, r#type, id, r#type, r#type, r#type ) .fetch_optional(executor) .await } pub async fn last_missing_items_by_type<'e, 'c: 'e, E>( executor: E, r#type: ItemType, ) -> sqlx::Result<Option<u16>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { let r#type = r#type.as_str(); sqlx::query_scalar!( r#" SELECT `c`.`id` FROM `Comic` `c` WHERE `c`.`id` NOT IN ( SELECT `o`.`comic_id` FROM `Occurrence` `o` LEFT JOIN `Item` `i` ON `o`.`item_id` = `i`.`id` WHERE `i`.`type` = ? AND `o`.`comic_id` = `c`.`id` GROUP BY `o`.`comic_id` ) AND (? <> 'cast' OR NOT `c`.`has_no_cast`) AND (? <> 'location' OR NOT `c`.`has_no_location`) AND (? <> 'storyline' OR NOT `c`.`has_no_storyline`) ORDER BY `c`.`id` DESC LIMIT 1 "#, r#type, r#type, r#type, r#type ) .fetch_optional(executor) .await } pub async fn tagline_by_id<'e, 'c: 'e, E>(executor: E, id: u16) -> sqlx::Result<Option<String>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `tagline` FROM `Comic` WHERE `id` = ? "#, id ) .fetch_optional(executor) .await .map(|o| o.flatten()) } pub async fn update_tagline_by_id<'e, 'c: 'e, E>( executor: E, id: u16, tagline: &str, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" UPDATE `Comic` SET `tagline` = ? WHERE `id` = ? "#, tagline, id ) .execute(executor) .await } pub async fn title_by_id<'e, 'c: 'e, E>(executor: E, id: u16) -> sqlx::Result<Option<String>> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" SELECT `title` FROM `Comic` WHERE `id` = ? "#, id ) .fetch_optional(executor) .await } pub async fn update_title_by_id<'e, 'c: 'e, E>( executor: E, id: u16, title: &str, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" UPDATE `Comic` SET `title` = ? WHERE `id` = ? "#, title, id ) .execute(executor) .await } pub async fn needs_updating_by_id<'e, 'c: 'e, E>( executor: E, id: u16, ) -> sqlx::Result<(bool, bool, Option<NaiveDateTime>)> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { if let Some(needs) = sqlx::query_as!( NeedsQuery, r#" SELECT `title`, `image_type`, `publish_date` FROM `Comic` WHERE `id` = ? "#, id ) .fetch_optional(executor) .await? { Ok(( needs.title.is_empty(), needs.image_type == 0, needs.publish_date, )) } else { Ok((true, true, None)) } } pub async fn insert_or_update_title_imagetype_and_publish_date_by_id<'e, 'c: 'e, E>( executor: E, id: u16, title: &str, image_type: i32, publish_date: NaiveDateTime, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query!( r#" INSERT INTO `Comic` (`id`, `title`, `image_type`, `publish_date`, `is_accurate_publish_date`) VALUES (?, ?, ?, ?, 0) ON DUPLICATE KEY UPDATE `title` = ?, `image_type` = ?, `publish_date` = ? "#, id, title, image_type, publish_date, title, image_type, publish_date, ) .execute(executor) .await } pub async fn update_image_type_and_publish_date_by_id<'e, 'c: 'e, E>( executor: E, id: u16, image_type: i32, publish_date: NaiveDateTime, ) -> sqlx::Result<crate::DatabaseQueryResult> where E: 'e + sqlx::Executor<'c, Database = crate::DatabaseDriver>, { sqlx::query_scalar!( r#" UPDATE `Comic` SET `image_type` = ?, `publish_date` = ?, `is_accurate_publish_date` = 0 WHERE `id` = ? "#, image_type, publish_date, id ) .execute(executor) .await } } #[derive(Debug, sqlx::FromRow)] struct FirstLast { first: Option<u16>, last: Option<u16>, } #[derive(Debug, sqlx::FromRow)] struct NeedsQuery { title: String, image_type: i32, publish_date: Option<NaiveDateTime>, }
use crate::{ quic::QuicStream, socks::{CmdReply, CmdRequest, Command, RespCode, SOCKS_VERSION}, }; use bytes::BytesMut; use futures::StreamExt; use log::*; use quinn::{ crypto::rustls::TlsSession, generic::Incoming, transport::Socket, CertificateChain, PrivateKey, TransportConfig, }; use rcgen::generate_simple_self_signed; use tokio::{io::AsyncWriteExt, net::TcpStream}; pub struct Server<T: Socket> { incoming: Incoming<TlsSession, T>, } impl<T: Socket> Server<T> { pub fn new(socket: T) -> anyhow::Result<Self> { // Generate a certificate that's valid for "localhost" // We are having trouble with IP signed root CA let subject_alt_names = vec!["localhost".to_string()]; let cert = generate_simple_self_signed(subject_alt_names).unwrap(); let cert_chain = CertificateChain::from_pem(&cert.serialize_pem()?.into_bytes())?; let priv_key = PrivateKey::from_pem(&cert.serialize_private_key_pem().into_bytes())?; let mut servercfg = quinn::generic::ServerConfigBuilder::default(); servercfg.protocols(crate::ALPN_QUIC); servercfg.certificate(cert_chain, priv_key)?; // Set up the server config let mut servercfg = servercfg.build(); let mut transport_cfg = TransportConfig::default(); transport_cfg.max_idle_timeout(Some(std::time::Duration::from_secs(180)))?; servercfg.transport = std::sync::Arc::new(transport_cfg); let mut endpt_cfg = quinn::generic::Endpoint::<TlsSession, T>::builder(); endpt_cfg.listen(servercfg); let (_, incoming) = endpt_cfg.with_socket(socket)?; Ok(Self { incoming }) } pub async fn serve(&mut self) -> anyhow::Result<()> { while let Some(connecting) = self.incoming.next().await { info!("connecting from remote: {:?}", connecting.remote_address()); // TODO: will this be throttling when connecting. match connecting.await { Ok(mut conn) => { info!( "connection established from remote: {:?}", conn.connection.remote_address() ); // We spawn to create handle each bidi stream. tokio::spawn(async move { while let Some(x) = conn.bi_streams.next().await { match x { Ok((send, recv)) => { tokio::spawn(handle_bidi(QuicStream::new(recv, send))); } Err(e) => { warn!("a connection error occured: {}", e); return; } } } }); } Err(e) => { warn!("connection failed to establish: {}", e); } } } Ok(()) } } async fn handle_bidi<T: Socket>(mut stream: QuicStream<T>) -> anyhow::Result<()> { // Authentication and methods selection have already been done on the "client" side of the QUIC connection, we only care about method. match CmdRequest::read(&mut stream).await? { CmdRequest { version, command, addr, } if version == SOCKS_VERSION && command == Command::Connect => { match TcpStream::connect(addr.addr).await { Ok(mut v) => { // We successfully established the connection to remote, now we send back reply with confirmation info!("successfully established connection to remote"); let msg: BytesMut = CmdReply::success(addr.into()).into(); stream.write_all(&msg).await?; tokio::io::copy_bidirectional(&mut stream, &mut v) .await .unwrap(); info!("client closed stream"); } Err(_) => { warn!("failed to connect to remote host via TCP, replying the client with a connection failure"); let msg: BytesMut = CmdReply::failure(RespCode::GeneralFailure).into(); stream.write_all(&msg).await?; return Err(anyhow::anyhow!( "failed to connect to the remote host via TCP" )); } } } _ => { warn!("unsupported SOCKS protocol version or command, replying with a failure msg"); let msg: BytesMut = CmdReply::failure(RespCode::GeneralFailure).into(); stream.write_all(&msg).await?; return Err(anyhow::anyhow!( "unsupported SOCKS protocol version or command" )); } }; Ok(()) }
#![recursion_limit = "256"] use wasm_bindgen::prelude::*; use yew::html; use yew::prelude::*; use yew::{InputData}; struct State { addend1: f64, addend2: f64, total: f64, } struct Adder { state: State, link: ComponentLink<Self>, } enum Msg { ChangeInputValue(String, String), Sum, } impl Component for Adder { type Message = Msg; type Properties = (); fn create(_: Self::Properties, link: ComponentLink<Self>) -> Self { Self { state: State { addend1: 0_f64, addend2: 0_f64, total: 0_f64, }, link } } fn update(&mut self, msg: Self::Message) -> ShouldRender { match msg { Msg::ChangeInputValue(input_name, value) => { if let Ok(next_value) = value.parse::<f64>() { if input_name == "addend1" { self.state.addend1 = next_value; } else { self.state.addend2 = next_value; } } true } Msg::Sum => { self.state.total = self.state.addend1 + self.state.addend2; true } } } fn change(&mut self, _: Self::Properties) -> ShouldRender { true } fn view(&self) -> Html { html! { <table> <tr> <td>{"Addend 1:"}</td> <td> <input type="number" style="text-align: right;" oninput=self.link.callback(|e: InputData| Msg::ChangeInputValue(String::from("addend1"), e.value)) /> </td> </tr> <tr> <td>{"Addend 2:"}</td> <td> <input type="number" style="text-align: right;" oninput=self.link.callback(|e: InputData| Msg::ChangeInputValue(String::from("addend2"), e.value)) /> </td> </tr> <tr> <td></td> <td align="center"> <button onclick=self.link.callback(|_| Msg::Sum) > {"Add"} </button> </td> </tr> <tr> <td>{"Total: "}</td> <td> <input type="number" style="text-align: right;" value=self.state.total /> </td> </tr> </table> } } } #[wasm_bindgen(start)] pub fn run_app() { App::<Adder>::new().mount_to_body(); }
// Problem 14 - Longest Collatz sequence // // The following iterative sequence is defined for the set of positive integers: // // n → n/2 (n is even) // n → 3n + 1 (n is odd) // // Using the rule above and starting with 13, we generate the following sequence: // // 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 // // It can be seen that this sequence (starting at 13 and finishing at 1) contains // 10 terms. Although it has not been proved yet (Collatz Problem), it is thought // that all starting numbers finish at 1. // // Which starting number, under one million, produces the longest chain? // // NOTE: Once the chain starts the terms are allowed to go above one million. fn main() { println!("{}", solution()); } fn solution() -> u64 { let mut maxlen = 1; let mut maxnum = 1; for n in 2..1000000 { let length = collatz_seq_length(n); if length > maxlen { maxlen = length; maxnum = n; } } maxnum } fn collatz_seq_length(n: u64) -> u64 { if n == 1 { 1 } else if n % 2 == 0 { 1 + collatz_seq_length(n/2) } else { 1 + collatz_seq_length(3*n + 1) } }
// This file is part of Substrate. // Copyright (C) 2017-2020 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //! An u32 trait with "values" as impl'd types. /// A u32 value, wrapped in a trait because we don't yet have const generics. pub trait Value { /// The actual value represented by the impl'ing type. const VALUE: u32; } /// Type representing the value 0 for the `Value` trait. pub struct _0; impl Value for _0 { const VALUE: u32 = 0; } /// Type representing the value 1 for the `Value` trait. pub struct _1; impl Value for _1 { const VALUE: u32 = 1; } /// Type representing the value 2 for the `Value` trait. pub struct _2; impl Value for _2 { const VALUE: u32 = 2; } /// Type representing the value 3 for the `Value` trait. pub struct _3; impl Value for _3 { const VALUE: u32 = 3; } /// Type representing the value 4 for the `Value` trait. pub struct _4; impl Value for _4 { const VALUE: u32 = 4; } /// Type representing the value 5 for the `Value` trait. pub struct _5; impl Value for _5 { const VALUE: u32 = 5; } /// Type representing the value 6 for the `Value` trait. pub struct _6; impl Value for _6 { const VALUE: u32 = 6; } /// Type representing the value 7 for the `Value` trait. pub struct _7; impl Value for _7 { const VALUE: u32 = 7; } /// Type representing the value 8 for the `Value` trait. pub struct _8; impl Value for _8 { const VALUE: u32 = 8; } /// Type representing the value 9 for the `Value` trait. pub struct _9; impl Value for _9 { const VALUE: u32 = 9; } /// Type representing the value 10 for the `Value` trait. pub struct _10; impl Value for _10 { const VALUE: u32 = 10; } /// Type representing the value 11 for the `Value` trait. pub struct _11; impl Value for _11 { const VALUE: u32 = 11; } /// Type representing the value 12 for the `Value` trait. pub struct _12; impl Value for _12 { const VALUE: u32 = 12; } /// Type representing the value 13 for the `Value` trait. pub struct _13; impl Value for _13 { const VALUE: u32 = 13; } /// Type representing the value 14 for the `Value` trait. pub struct _14; impl Value for _14 { const VALUE: u32 = 14; } /// Type representing the value 15 for the `Value` trait. pub struct _15; impl Value for _15 { const VALUE: u32 = 15; } /// Type representing the value 16 for the `Value` trait. pub struct _16; impl Value for _16 { const VALUE: u32 = 16; } /// Type representing the value 17 for the `Value` trait. pub struct _17; impl Value for _17 { const VALUE: u32 = 17; } /// Type representing the value 18 for the `Value` trait. pub struct _18; impl Value for _18 { const VALUE: u32 = 18; } /// Type representing the value 19 for the `Value` trait. pub struct _19; impl Value for _19 { const VALUE: u32 = 19; } /// Type representing the value 20 for the `Value` trait. pub struct _20; impl Value for _20 { const VALUE: u32 = 20; } /// Type representing the value 21 for the `Value` trait. pub struct _21; impl Value for _21 { const VALUE: u32 = 21; } /// Type representing the value 22 for the `Value` trait. pub struct _22; impl Value for _22 { const VALUE: u32 = 22; } /// Type representing the value 23 for the `Value` trait. pub struct _23; impl Value for _23 { const VALUE: u32 = 23; } /// Type representing the value 24 for the `Value` trait. pub struct _24; impl Value for _24 { const VALUE: u32 = 24; } /// Type representing the value 25 for the `Value` trait. pub struct _25; impl Value for _25 { const VALUE: u32 = 25; } /// Type representing the value 26 for the `Value` trait. pub struct _26; impl Value for _26 { const VALUE: u32 = 26; } /// Type representing the value 27 for the `Value` trait. pub struct _27; impl Value for _27 { const VALUE: u32 = 27; } /// Type representing the value 28 for the `Value` trait. pub struct _28; impl Value for _28 { const VALUE: u32 = 28; } /// Type representing the value 29 for the `Value` trait. pub struct _29; impl Value for _29 { const VALUE: u32 = 29; } /// Type representing the value 30 for the `Value` trait. pub struct _30; impl Value for _30 { const VALUE: u32 = 30; } /// Type representing the value 31 for the `Value` trait. pub struct _31; impl Value for _31 { const VALUE: u32 = 31; } /// Type representing the value 32 for the `Value` trait. pub struct _32; impl Value for _32 { const VALUE: u32 = 32; } /// Type representing the value 33 for the `Value` trait. pub struct _33; impl Value for _33 { const VALUE: u32 = 33; } /// Type representing the value 34 for the `Value` trait. pub struct _34; impl Value for _34 { const VALUE: u32 = 34; } /// Type representing the value 35 for the `Value` trait. pub struct _35; impl Value for _35 { const VALUE: u32 = 35; } /// Type representing the value 36 for the `Value` trait. pub struct _36; impl Value for _36 { const VALUE: u32 = 36; } /// Type representing the value 37 for the `Value` trait. pub struct _37; impl Value for _37 { const VALUE: u32 = 37; } /// Type representing the value 38 for the `Value` trait. pub struct _38; impl Value for _38 { const VALUE: u32 = 38; } /// Type representing the value 39 for the `Value` trait. pub struct _39; impl Value for _39 { const VALUE: u32 = 39; } /// Type representing the value 40 for the `Value` trait. pub struct _40; impl Value for _40 { const VALUE: u32 = 40; } /// Type representing the value 41 for the `Value` trait. pub struct _41; impl Value for _41 { const VALUE: u32 = 41; } /// Type representing the value 42 for the `Value` trait. pub struct _42; impl Value for _42 { const VALUE: u32 = 42; } /// Type representing the value 43 for the `Value` trait. pub struct _43; impl Value for _43 { const VALUE: u32 = 43; } /// Type representing the value 44 for the `Value` trait. pub struct _44; impl Value for _44 { const VALUE: u32 = 44; } /// Type representing the value 45 for the `Value` trait. pub struct _45; impl Value for _45 { const VALUE: u32 = 45; } /// Type representing the value 46 for the `Value` trait. pub struct _46; impl Value for _46 { const VALUE: u32 = 46; } /// Type representing the value 47 for the `Value` trait. pub struct _47; impl Value for _47 { const VALUE: u32 = 47; } /// Type representing the value 48 for the `Value` trait. pub struct _48; impl Value for _48 { const VALUE: u32 = 48; } /// Type representing the value 49 for the `Value` trait. pub struct _49; impl Value for _49 { const VALUE: u32 = 49; } /// Type representing the value 50 for the `Value` trait. pub struct _50; impl Value for _50 { const VALUE: u32 = 50; } /// Type representing the value 51 for the `Value` trait. pub struct _51; impl Value for _51 { const VALUE: u32 = 51; } /// Type representing the value 52 for the `Value` trait. pub struct _52; impl Value for _52 { const VALUE: u32 = 52; } /// Type representing the value 53 for the `Value` trait. pub struct _53; impl Value for _53 { const VALUE: u32 = 53; } /// Type representing the value 54 for the `Value` trait. pub struct _54; impl Value for _54 { const VALUE: u32 = 54; } /// Type representing the value 55 for the `Value` trait. pub struct _55; impl Value for _55 { const VALUE: u32 = 55; } /// Type representing the value 56 for the `Value` trait. pub struct _56; impl Value for _56 { const VALUE: u32 = 56; } /// Type representing the value 57 for the `Value` trait. pub struct _57; impl Value for _57 { const VALUE: u32 = 57; } /// Type representing the value 58 for the `Value` trait. pub struct _58; impl Value for _58 { const VALUE: u32 = 58; } /// Type representing the value 59 for the `Value` trait. pub struct _59; impl Value for _59 { const VALUE: u32 = 59; } /// Type representing the value 60 for the `Value` trait. pub struct _60; impl Value for _60 { const VALUE: u32 = 60; } /// Type representing the value 61 for the `Value` trait. pub struct _61; impl Value for _61 { const VALUE: u32 = 61; } /// Type representing the value 62 for the `Value` trait. pub struct _62; impl Value for _62 { const VALUE: u32 = 62; } /// Type representing the value 63 for the `Value` trait. pub struct _63; impl Value for _63 { const VALUE: u32 = 63; } /// Type representing the value 64 for the `Value` trait. pub struct _64; impl Value for _64 { const VALUE: u32 = 64; } /// Type representing the value 65 for the `Value` trait. pub struct _65; impl Value for _65 { const VALUE: u32 = 65; } /// Type representing the value 66 for the `Value` trait. pub struct _66; impl Value for _66 { const VALUE: u32 = 66; } /// Type representing the value 67 for the `Value` trait. pub struct _67; impl Value for _67 { const VALUE: u32 = 67; } /// Type representing the value 68 for the `Value` trait. pub struct _68; impl Value for _68 { const VALUE: u32 = 68; } /// Type representing the value 69 for the `Value` trait. pub struct _69; impl Value for _69 { const VALUE: u32 = 69; } /// Type representing the value 70 for the `Value` trait. pub struct _70; impl Value for _70 { const VALUE: u32 = 70; } /// Type representing the value 71 for the `Value` trait. pub struct _71; impl Value for _71 { const VALUE: u32 = 71; } /// Type representing the value 72 for the `Value` trait. pub struct _72; impl Value for _72 { const VALUE: u32 = 72; } /// Type representing the value 73 for the `Value` trait. pub struct _73; impl Value for _73 { const VALUE: u32 = 73; } /// Type representing the value 74 for the `Value` trait. pub struct _74; impl Value for _74 { const VALUE: u32 = 74; } /// Type representing the value 75 for the `Value` trait. pub struct _75; impl Value for _75 { const VALUE: u32 = 75; } /// Type representing the value 76 for the `Value` trait. pub struct _76; impl Value for _76 { const VALUE: u32 = 76; } /// Type representing the value 77 for the `Value` trait. pub struct _77; impl Value for _77 { const VALUE: u32 = 77; } /// Type representing the value 78 for the `Value` trait. pub struct _78; impl Value for _78 { const VALUE: u32 = 78; } /// Type representing the value 79 for the `Value` trait. pub struct _79; impl Value for _79 { const VALUE: u32 = 79; } /// Type representing the value 80 for the `Value` trait. pub struct _80; impl Value for _80 { const VALUE: u32 = 80; } /// Type representing the value 81 for the `Value` trait. pub struct _81; impl Value for _81 { const VALUE: u32 = 81; } /// Type representing the value 82 for the `Value` trait. pub struct _82; impl Value for _82 { const VALUE: u32 = 82; } /// Type representing the value 83 for the `Value` trait. pub struct _83; impl Value for _83 { const VALUE: u32 = 83; } /// Type representing the value 84 for the `Value` trait. pub struct _84; impl Value for _84 { const VALUE: u32 = 84; } /// Type representing the value 85 for the `Value` trait. pub struct _85; impl Value for _85 { const VALUE: u32 = 85; } /// Type representing the value 86 for the `Value` trait. pub struct _86; impl Value for _86 { const VALUE: u32 = 86; } /// Type representing the value 87 for the `Value` trait. pub struct _87; impl Value for _87 { const VALUE: u32 = 87; } /// Type representing the value 88 for the `Value` trait. pub struct _88; impl Value for _88 { const VALUE: u32 = 88; } /// Type representing the value 89 for the `Value` trait. pub struct _89; impl Value for _89 { const VALUE: u32 = 89; } /// Type representing the value 90 for the `Value` trait. pub struct _90; impl Value for _90 { const VALUE: u32 = 90; } /// Type representing the value 91 for the `Value` trait. pub struct _91; impl Value for _91 { const VALUE: u32 = 91; } /// Type representing the value 92 for the `Value` trait. pub struct _92; impl Value for _92 { const VALUE: u32 = 92; } /// Type representing the value 93 for the `Value` trait. pub struct _93; impl Value for _93 { const VALUE: u32 = 93; } /// Type representing the value 94 for the `Value` trait. pub struct _94; impl Value for _94 { const VALUE: u32 = 94; } /// Type representing the value 95 for the `Value` trait. pub struct _95; impl Value for _95 { const VALUE: u32 = 95; } /// Type representing the value 96 for the `Value` trait. pub struct _96; impl Value for _96 { const VALUE: u32 = 96; } /// Type representing the value 97 for the `Value` trait. pub struct _97; impl Value for _97 { const VALUE: u32 = 97; } /// Type representing the value 98 for the `Value` trait. pub struct _98; impl Value for _98 { const VALUE: u32 = 98; } /// Type representing the value 99 for the `Value` trait. pub struct _99; impl Value for _99 { const VALUE: u32 = 99; } /// Type representing the value 100 for the `Value` trait. pub struct _100; impl Value for _100 { const VALUE: u32 = 100; } /// Type representing the value 112 for the `Value` trait. pub struct _112; impl Value for _112 { const VALUE: u32 = 112; } /// Type representing the value 128 for the `Value` trait. pub struct _128; impl Value for _128 { const VALUE: u32 = 128; } /// Type representing the value 160 for the `Value` trait. pub struct _160; impl Value for _160 { const VALUE: u32 = 160; } /// Type representing the value 192 for the `Value` trait. pub struct _192; impl Value for _192 { const VALUE: u32 = 192; } /// Type representing the value 224 for the `Value` trait. pub struct _224; impl Value for _224 { const VALUE: u32 = 224; } /// Type representing the value 256 for the `Value` trait. pub struct _256; impl Value for _256 { const VALUE: u32 = 256; } /// Type representing the value 384 for the `Value` trait. pub struct _384; impl Value for _384 { const VALUE: u32 = 384; } /// Type representing the value 512 for the `Value` trait. pub struct _512; impl Value for _512 { const VALUE: u32 = 512; }
use jsonrpc_core::{self, Params, Version}; use serde::ser::Serialize; use serde_json; use std::ops::Deref; use uuid::Uuid; pub mod agent; pub mod query_parameters; pub mod room; pub mod state; pub mod subscription; pub mod track; pub mod webrtc; #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Envelope { pub sub: EnvelopeSubject, pub msg: EnvelopeMessage, } #[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct EnvelopeSubject { pub account_id: Uuid, pub agent_id: Uuid, } #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct EnvelopeMessage(String); impl Deref for EnvelopeMessage { type Target = str; fn deref(&self) -> &str { &self.0 } } #[derive(Debug)] pub enum Notification { Event(EventKind), Method(Method), } impl From<Notification> for jsonrpc_core::Notification { fn from(notification: Notification) -> Self { match notification { Notification::Event(e) => e.into(), Notification::Method(m) => m.body, } } } #[derive(Debug, Serialize, Deserialize)] #[serde(tag = "type")] pub enum EventKind { #[serde(rename = "agent.join_room")] AgentJoin(agent::JoinEvent), #[serde(rename = "agent.leave_room")] AgentLeave(agent::LeaveEvent), #[serde(rename = "track.create")] TrackCreate(track::CreateEvent), #[serde(rename = "track.delete")] TrackDelete(track::DeleteEvent), #[serde(rename = "state.update")] StateUpdate(state::UpdateEvent), } impl From<EventKind> for Notification { fn from(kind: EventKind) -> Self { Notification::Event(kind) } } impl From<EventKind> for jsonrpc_core::Notification { fn from(event: EventKind) -> Self { let params = serde_json::to_value(event) .ok() .map(|value| Params::Array(vec![value])); jsonrpc_core::Notification { jsonrpc: Some(Version::V2), method: "event".to_string(), params, } } } #[derive(Debug, Serialize, Deserialize)] pub struct Event<T: Serialize> { #[serde(skip_serializing)] pub room_id: Uuid, payload: T, } impl<T: Serialize> Event<T> { pub fn new(room_id: Uuid, payload: T) -> Event<T> { Event { room_id, payload } } } #[derive(Debug)] pub struct Method { pub agent_id: Uuid, pub body: jsonrpc_core::Notification, } impl From<Method> for Notification { fn from(method: Method) -> Self { Notification::Method(method) } } #[cfg(test)] mod tests { use super::*; #[test] fn deserialize_envelope() { use serde_json; let json = r#"{ "sub": { "account_id": "31517b3d-5a14-4a14-a6c5-2ba63f7375d3", "agent_id": "85c36f15-5021-4ab8-91a8-0f972cdb6d3a" }, "msg": "ping" }"#; let envelope: Envelope = serde_json::from_str(json).unwrap(); let expected = Envelope { sub: EnvelopeSubject { account_id: Uuid::parse_str("31517b3d-5a14-4a14-a6c5-2ba63f7375d3").unwrap(), agent_id: Uuid::parse_str("85c36f15-5021-4ab8-91a8-0f972cdb6d3a").unwrap(), }, msg: EnvelopeMessage("ping".to_string()), }; assert_eq!(envelope, expected); } }
// TODO(jack) Set velocity and groove. mod midi; mod seq; use std::collections::HashMap; use std::default::Default; use std::io::{stdin, stdout}; use std::mem::swap; use std::ops::{Index, IndexMut}; use std::sync::atomic::{AtomicBool, Ordering}; use std::thread::spawn; use crossbeam::channel::{Receiver, Sender}; use crossbeam::select; use termion::cursor::HideCursor; use termion::event::{Event, Key}; use termion::input::{MouseTerminal, TermRead}; use termion::raw::IntoRawMode; use termion::screen::AlternateScreen; use tinyvec::ArrayVec; fn euclid(pulses: usize, steps: usize, rotate: usize) -> impl Iterator<Item = bool> { let mut acc = (steps - 1 + rotate * pulses) % steps; (0..steps).map(move |_| { acc += pulses; if acc >= steps { acc %= steps; true } else { false } }) } struct NotificationHandler { shutdown_tx: crossbeam::channel::Sender<()>, } impl jack::NotificationHandler for NotificationHandler { fn shutdown(&mut self, _status: jack::ClientStatus, _reason: &str) { self.shutdown_tx.send(()).unwrap(); } } struct ProcessHandler<'a> { midi_in_port: jack::Port<jack::MidiIn>, midi_out_port: jack::Port<jack::MidiOut>, held_incoming_midi_notes: HashMap<(Channel, Note), (f64, f64)>, held_outgoing_midi_notes: HashMap<(Channel, Note), i32>, midi_event_queue: Vec<(f64, midi::Event)>, clock: f64, seq: Vec<(f64, seq::Event)>, seq_rx: Receiver<Vec<(f64, seq::Event)>>, seq_event_tx: Sender<(f64, seq::Event)>, state_tx: Sender<f64>, flush: &'a AtomicBool, record: &'a AtomicBool, shutdown_tx: Sender<()>, } impl<'a> jack::ProcessHandler for ProcessHandler<'a> { fn process( &mut self, client: &jack::Client, process_scope: &jack::ProcessScope, ) -> jack::Control { let Self { midi_in_port, midi_out_port, held_incoming_midi_notes, held_outgoing_midi_notes, midi_event_queue, clock, seq, seq_rx, seq_event_tx, state_tx, flush, record, shutdown_tx, } = self; if let Some(new_seq) = seq_rx.try_iter().last() { *seq = new_seq; } let mut writer = midi_out_port.writer(process_scope); if flush.load(Ordering::Relaxed) { for (&(channel, note), count) in held_outgoing_midi_notes { for _ in 0..*count { writer .write(&jack::RawMidi { time: 0, bytes: midi::Event::NoteOff { channel, note }.to_bytes().as_slice(), }) .unwrap(); *count = 0; } } shutdown_tx.send(()).unwrap(); return jack::Control::Continue; // Quit causes problems. } let bpm = 75.0; let beats = 4.0; let dt = bpm / 60.0 / beats * client.buffer_size() as f64 / client.sample_rate() as f64; for jack::RawMidi { time: sample, bytes, } in midi_in_port.iter(process_scope) { if let Some(event) = midi::Event::from_bytes(bytes) { let time = sample as f64 / client.buffer_size() as f64 * dt; midi_event_queue.push((time, event)); if record.load(Ordering::Relaxed) { let time = *clock + time; match event { midi::Event::NoteOff { channel, note } => { if let Some((start, velocity)) = held_incoming_midi_notes.remove(&(channel, note)) { seq_event_tx .send(( start, seq::Event::Note { channel, note, velocity, length: (time - start).rem_euclid(1.0), }, )) .unwrap(); } } midi::Event::NoteOn { channel, note, velocity, } => { held_incoming_midi_notes .insert((channel, note), (time, (velocity as f64 - 1.0) / 126.0)); } midi::Event::ControlChange { channel, controller, value, } => { seq_event_tx .send(( time, seq::Event::ControlChange { channel, controller, value, }, )) .unwrap(); } } } } } // Schedule MIDI events from the sequence. fn schedule(midi_event_queue: &mut Vec<(f64, midi::Event)>, t: f64, event: seq::Event) { match event { seq::Event::Note { channel, note, velocity, length, } => { midi_event_queue.push(( t, midi::Event::NoteOn { channel, note, velocity: 1 + (126.0 * velocity) as u8, }, )); midi_event_queue.push((t + length, midi::Event::NoteOff { channel, note })); } seq::Event::ControlChange { channel, controller, value, } => { midi_event_queue.push(( t, midi::Event::ControlChange { channel, controller, value, }, )); } } } let t1 = *clock; let t2 = *clock + dt; *clock = if t2 < 1.0 { for &mut (time, event) in seq { if t1 <= time && time < t2 { schedule(midi_event_queue, time - t1, event); } } t2 } else { let t2 = t2 % 1.0; for &mut (time, event) in seq { let t = match time { t if t1 <= t => t - t1, t if t < t2 => t + 1.0 - t1, _ => continue, }; schedule(midi_event_queue, t, event); } t2 }; state_tx.send(*clock).unwrap(); midi_event_queue.sort_unstable_by(|a, b| b.partial_cmp(a).unwrap()); while let Some((time, event)) = midi_event_queue.pop() { let sample = (time / dt * client.buffer_size() as f64) as u32; if sample >= client.buffer_size() { midi_event_queue.push((time, event)); break; } writer .write(&jack::RawMidi { time: sample, bytes: event.to_bytes().as_slice(), }) .unwrap(); match event { midi::Event::NoteOff { channel, note } => { *held_outgoing_midi_notes.entry((channel, note)).or_insert(0) -= 1; } midi::Event::NoteOn { channel, note, .. } => { *held_outgoing_midi_notes.entry((channel, note)).or_insert(0) += 1; } _ => (), } } for (time, _) in midi_event_queue { *time -= dt; } jack::Control::Continue } } static FLUSH: AtomicBool = AtomicBool::new(false); static RECORD: AtomicBool = AtomicBool::new(true); #[derive(Copy, Clone, Debug, Default)] struct Step { velocity: f64, length: f64, delay: f64, } const MAX_STEPS: usize = 32; type Track = ArrayVec<[Option<Step>; MAX_STEPS]>; #[derive(Copy, Clone)] struct Tracks([Option<Track>; 16 * 128]); impl Index<Channel> for Tracks { type Output = [Option<Track>]; fn index(&self, channel: Channel) -> &Self::Output { &self.0[channel as usize * 128..channel as usize * 128 + 128] } } impl IndexMut<Channel> for Tracks { fn index_mut(&mut self, channel: Channel) -> &mut Self::Output { &mut self.0[channel as usize * 128..channel as usize * 128 + 128] } } impl Tracks { fn iter(&self) -> impl Iterator<Item = (Channel, Note, &Track)> { self.0.iter().enumerate().filter_map(|(i, steps)| { steps .as_ref() .map(|steps| ((i / 128) as u8, (i % 128) as u8, steps)) }) } fn transpose(&mut self, degrees: i32) { /* let Tracks(tracks) = self; *tracks = tracks .iter() .map(|(&channel, notes)| { ( channel, notes .iter() .map(|(&note, &steps)| { let intervals = [2, 2, 1, 2, 2, 2, 1]; let octave = note / 12; let degree = intervals .iter() .enumerate() .take_while({ let mut acc = 0; move |&(_, &x)| { acc += x; acc <= note % 12 } }) .last() .map_or(0, |(i, _)| i + 1); let constrained_note: i32 = ((octave * 7) as i32 + degree as i32 + degrees).clamp(0, 62); // I did some back-of-the-napkin math. let octave = constrained_note / 7; let degree = constrained_note % 7; let new_note = 12 * octave + intervals.iter().take(degree as usize).sum::<u8>() as i32; (new_note as u8, steps) }) .collect(), ) }) .collect(); */ } fn build_seq(&self) -> Vec<(f64, seq::Event)> { let mut seq: Vec<_> = self .iter() .flat_map(|(channel, note, steps)| { steps.iter().enumerate().filter_map(move |(i, step)| { step.map(|step| (channel, note, i as f64 / steps.len() as f64, step)) }) }) .map( |( channel, note, t, Step { velocity, length, delay, }, )| { ( t + delay, seq::Event::Note { channel, note, length, velocity, }, ) }, ) .collect(); seq.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()); seq } } // TODO(jack) Focus mode is either step, note, or channel. // Operations should then apply to every step in the focus. type Channel = u8; type Note = u8; #[derive(Debug, Copy, Clone)] enum Focus { Channel(Channel), Note { channel: Channel, note: Note, }, Step { channel: Channel, note: Note, step: usize, }, } struct Ui { record: bool, clock: u16, focus: Focus, tracks: Box<Tracks>, undo: Vec<Tracks>, redo: Vec<Tracks>, seq_tx: Sender<Vec<(f64, seq::Event)>>, } impl Ui { fn push_to_undo_stack(&mut self) { // TODO(jack) Action enum to log messages of what's being done / undone? self.undo .extend_from_slice(std::slice::from_ref(&self.tracks)); self.redo.clear(); } // TODO(jack) Get slice of focused steps. fn move_left(&mut self) { match &mut self.focus { Focus::Step { channel, note, step, } => { if let Some(steps) = self.tracks[*channel][*note as usize] { *step = step.checked_sub(1).unwrap_or(0); self.print_tracks(); } } _ => (), }; } fn move_right(&mut self) { match &mut self.focus { Focus::Step { channel, note, step, } => { if let Some(steps) = self.tracks[*channel][*note as usize] { *step = (*step + 1).min(steps.len() - 1); self.print_tracks(); } } _ => (), }; self.print_tracks(); } fn move_down(&mut self) { match &mut self.focus { Focus::Channel(channel) => { if let Some((c, _, _)) = self.tracks.iter().filter(|(c, _, _)| c < channel).last() { *channel = c; } } Focus::Note { channel, note } | Focus::Step { channel, note, .. } => { if let Some((c, n, _)) = self .tracks .iter() .filter(|(c, n, _)| (c, n) < (channel, note)) .last() { *channel = c; *note = n; } } }; self.print_tracks(); } fn move_up(&mut self) { match &mut self.focus { Focus::Channel(channel) => { if let Some((c, _, _)) = self.tracks.iter().filter(|(c, _, _)| c > channel).next() { *channel = c; } } Focus::Note { channel, note } | Focus::Step { channel, note, .. } => { if let Some((c, n, _)) = self .tracks .iter() .filter(|(c, n, _)| (c, n) > (channel, note)) .next() { *channel = c; *note = n; } } }; self.print_tracks(); } fn step(&mut self, event: Event) -> bool { match event { Event::Key(Key::Ctrl('c')) => return false, Event::Key(Key::Backspace) => { self.push_to_undo_stack(); match self.focus { Focus::Channel(channel) => { for steps in &mut self.tracks[channel] { *steps = None; } } Focus::Note { channel, note } | Focus::Step { channel, note, .. } => { self.tracks[channel][note as usize] = None; } } self.move_down(); self.seq_tx.send(self.tracks.build_seq()).unwrap(); self.print_tracks(); } Event::Key(Key::Char('q')) => { self.push_to_undo_stack(); // TODO(jack) This code is clearly very redundant. How can I refactor? // If I had a flat array to work with, I could use slices / slice iterators.. match self.focus { Focus::Channel(channel) => { for notes in &mut self.tracks[channel] { for steps in notes { for step in steps { if let Some(step) = step { step.delay = 0.0; } } } } } Focus::Note { channel, note } => { if let Some(steps) = &mut self.tracks[channel][note as usize] { for step in steps { if let Some(step) = step { step.delay = 0.0; } } } } Focus::Step { channel, note, step, } => { if let Some(steps) = &mut self.tracks[channel][note as usize] { if let Some(step) = steps.get_mut(step) { if let Some(step) = step { step.delay = 0.0; } } } } } self.seq_tx.send(self.tracks.build_seq()).unwrap(); } Event::Key(Key::Ctrl('l')) => { print!("{}", termion::clear::All); self.print_header(); self.print_tracks(); self.print_clock(); } Event::Key(Key::Char('<')) => { self.push_to_undo_stack(); self.tracks.transpose(-1); self.seq_tx.send(self.tracks.build_seq()).unwrap(); self.print_tracks(); } Event::Key(Key::Char('>')) => { self.push_to_undo_stack(); self.tracks.transpose(1); self.seq_tx.send(self.tracks.build_seq()).unwrap(); self.print_tracks(); } Event::Key(Key::Char('g')) => { self.push_to_undo_stack(); /* match self.focus { Focus::Channel(channel) => { for notes in &mut self.tracks[channel] { for steps in notes { for step in steps { if let Some(step) = step { step.delay = 0.0; } } } } } Focus::Note { channel, note } => { for notes in self.tracks.0.get_mut(&channel) { for steps in notes.get_mut(&note) { for step in steps { if let Some(step) = step { step.delay = 0.0; } } } } } Focus::Step { channel, note, step, } => { for notes in self.tracks.0.get_mut(&channel) { for steps in notes.get_mut(&note) { for step in steps.get_mut(step) { if let Some(step) = step { step.delay = 0.0; } } } } } } self.seq_tx.send(self.tracks.build_seq()).unwrap(); self.print_tracks(); */ } Event::Key(Key::Char('r')) => { self.record = !self.record; RECORD.store(self.record, Ordering::Relaxed); self.print_header(); } Event::Key(Key::Char('c')) => { self.focus = match self.focus { Focus::Channel(channel) | Focus::Note { channel, .. } | Focus::Step { channel, .. } => Focus::Channel(channel), }; self.print_header(); self.print_tracks(); } Event::Key(Key::Char('n')) => { self.focus = match self.focus { Focus::Channel(channel) => Focus::Note { channel, note: self.tracks[channel] .iter() .enumerate() .filter(|(note, notes)| notes.is_some()) .map(|(note, _)| note as u8) .next() .unwrap_or(0), }, Focus::Note { channel, note } | Focus::Step { channel, note, .. } => { Focus::Note { channel, note } } }; self.print_header(); self.print_tracks(); } Event::Key(Key::Char('s')) => { self.focus = match self.focus { Focus::Channel(channel) => Focus::Step { channel, note: self.tracks[channel] .iter() .enumerate() .filter(|(note, notes)| notes.is_some()) .map(|(note, _)| note as u8) .next() .unwrap_or(0), step: 0, }, Focus::Note { channel, note } => Focus::Step { channel, note, step: 0, }, step => step, }; self.print_header(); self.print_tracks(); } Event::Key(Key::Char('h')) => self.move_left(), Event::Key(Key::Char('l')) => self.move_right(), Event::Key(Key::Char('k')) => self.move_down(), Event::Key(Key::Char('j')) => self.move_up(), // Undo / redo is a little tricky because our state is very big and can blow the stack. Event::Key(Key::Char('u')) => { if let Some(undo) = self.undo.last_mut() { self.redo .extend_from_slice(std::slice::from_ref(&self.tracks)); swap(undo, self.tracks.as_mut()); self.undo.pop(); self.seq_tx.send(self.tracks.build_seq()).unwrap(); print!("{}", termion::clear::All); self.print_header(); self.print_tracks(); self.print_clock(); } } Event::Key(Key::Ctrl('r')) => { if let Some(redo) = self.redo.last_mut() { self.undo .extend_from_slice(std::slice::from_ref(&self.tracks)); swap(redo, &mut self.tracks); self.redo.pop(); self.seq_tx.send(self.tracks.build_seq()).unwrap(); print!("{}", termion::clear::All); self.print_header(); self.print_tracks(); self.print_clock(); } } _ => (), }; true } fn print_header(&self) { print!( "{}{}", termion::cursor::Goto(1, 1), termion::clear::CurrentLine ); print!( "{}{}[{}]{}{}", termion::color::Bg(termion::color::Blue), termion::color::Fg(termion::color::Black), match self.focus { Focus::Channel { .. } => "focus channel", Focus::Note { .. } => "focus note", Focus::Step { .. } => "focus step", }, termion::color::Bg(termion::color::Reset), termion::color::Fg(termion::color::Reset), ); if self.record { print!( "{}{}[record]{}{}\r\n", termion::color::Bg(termion::color::Red), termion::color::Fg(termion::color::Black), termion::color::Bg(termion::color::Reset), termion::color::Fg(termion::color::Reset), ); } } fn print_tracks(&self) { print!("{}", termion::cursor::Goto(1, 2)); let mut last_channel = None; for (channel, note, steps) in self.tracks.iter() { if last_channel != Some(channel) { last_channel = Some(channel); let highlight = match self.focus { Focus::Channel(c) if c == channel => true, _ => false, }; if highlight { print!( "{}{}c{:02}{}{} ", termion::color::Bg(termion::color::Blue), termion::color::Fg(termion::color::Black), channel, termion::color::Bg(termion::color::Reset), termion::color::Fg(termion::color::Reset), ); } else { print!("c{:02} ", channel); } } else { print!(" "); } let highlight = match self.focus { Focus::Note { channel: c, note: n, } if (c, n) == (channel, note) => true, _ => false, }; if highlight { print!( "{}{}n{:03}{}{} |", termion::color::Bg(termion::color::Blue), termion::color::Fg(termion::color::Black), note, termion::color::Bg(termion::color::Reset), termion::color::Fg(termion::color::Reset), ); } else { print!("n{:03} |", note); } for (i, (spaces, step)) in euclid(steps.len(), MAX_STEPS, 0) .filter_map({ let mut acc = 1; move |pulse| { if pulse { let spaces = acc; acc = 0; Some(spaces) } else { acc += 1; None } } }) .zip(steps) .enumerate() { let highlight = match self.focus { Focus::Step { channel: c, note: n, step: j, } if (c, n, j) == (channel, note, i) => true, _ => false, }; if highlight { print!( "{}{}", termion::color::Bg(termion::color::Blue), termion::color::Fg(termion::color::Black), ); } for _ in 0..spaces { print!(" "); } let ch = if step.is_some() { "." } else { " " }; print!("{}", ch,); if highlight { print!( "{}{}", termion::color::Bg(termion::color::Reset), termion::color::Fg(termion::color::Reset), ); } } print!("|\r\n"); } // Print step information to the right. let x = 12 + MAX_STEPS as u16; let y = 2; match self.focus { Focus::Step { channel, note, step, } => { if let Some(step) = self.tracks[channel][note as usize] .and_then(|steps| steps.get(step).copied()) .flatten() { print!( "{}v={}{}l={}{}d={}", termion::cursor::Goto(x, y), step.velocity, termion::cursor::Goto(x, y + 1), step.length, termion::cursor::Goto(x, y + 2), step.delay, ); } else { print!( "{}{}{}{}{}{}", termion::cursor::Goto(x, y), termion::clear::UntilNewline, termion::cursor::Goto(x, y + 1), termion::clear::UntilNewline, termion::cursor::Goto(x, y + 2), termion::clear::UntilNewline, ); } } _ => (), }; } fn print_clock(&self) { let row = 2 + self .tracks .0 .iter() .map(|steps| if steps.is_some() { 1 } else { 0 }) .sum::<usize>() as u16; print!( "{}{}^\r\n", termion::cursor::Goto(10 + self.clock, row), termion::clear::CurrentLine, ); } } fn main() { let (client, _) = jack::Client::new( "cord", jack::ClientOptions::NO_START_SERVER | jack::ClientOptions::USE_EXACT_NAME, ) .unwrap(); let midi_in_port = client.register_port("in", jack::MidiIn::default()).unwrap(); let midi_out_port = client .register_port("out", jack::MidiOut::default()) .unwrap(); let (shutdown_tx, shutdown_rx) = crossbeam::channel::bounded(2); let (seq_tx, seq_rx) = crossbeam::channel::bounded(0); let (seq_event_tx, seq_event_rx) = crossbeam::channel::bounded(256); let (state_tx, state_rx) = crossbeam::channel::bounded(1024); let async_client = client .activate_async( NotificationHandler { shutdown_tx: shutdown_tx.clone(), }, ProcessHandler { midi_in_port, midi_out_port, held_incoming_midi_notes: HashMap::with_capacity(16 * 128), held_outgoing_midi_notes: HashMap::with_capacity(16 * 128), midi_event_queue: Vec::with_capacity(64), clock: 0.0, seq: Vec::new(), seq_rx, seq_event_tx, state_tx, flush: &FLUSH, record: &RECORD, shutdown_tx, }, ) .unwrap(); for (source_port, destination_port) in &[ ("jack-keyboard:midi_out", "cord:in"), ("cord:out", "csound6-midi_in:port"), ] { async_client .as_client() .connect_ports_by_name(source_port, destination_port) .unwrap(); } let stdin = stdin(); let _stdout = { let stdout = stdout().into_raw_mode().unwrap(); let stdout = AlternateScreen::from(stdout); let stdout = MouseTerminal::from(stdout); HideCursor::from(stdout) }; let (event_tx, event_rx) = crossbeam::channel::bounded(0); spawn(move || { for event in stdin.events() { let event = event.unwrap(); if event_tx.send(event).is_err() { return; } } }); let mut ui = Ui { record: RECORD.load(Ordering::Relaxed), clock: 0, focus: Focus::Step { channel: 0, note: 0, step: 0, }, tracks: Box::new(Tracks([None; 128 * 16])), undo: Vec::new(), redo: Vec::new(), seq_tx, }; ui.print_header(); loop { select! { recv(shutdown_rx) -> _ => return, recv(seq_event_rx) -> result => { let (time, event) = result.unwrap(); match event { seq::Event::Note {channel, note, velocity, length} => { ui.push_to_undo_stack(); let mut steps = if let Some(steps) = ui.tracks[channel][note as usize] { steps } else { (0..16).map(|_| None).collect() }; let step = (time * steps.len() as f64) as usize; let delay = time % (1.0 / steps.len() as f64); steps[step] = Some(Step{velocity, length, delay}); ui.tracks[channel][note as usize] = Some(steps); ui.seq_tx.send(ui.tracks.build_seq()).unwrap(); }, _ => continue, } ui.print_tracks(); }, recv(event_rx) -> result => { let event = result.unwrap(); if !ui.step(event) { break; } }, recv(state_rx) -> result => { let clock = result.unwrap(); let step = (clock * 32 as f64) as u16; if ui.clock != step { ui.clock = step; ui.print_clock(); } } } } FLUSH.store(true, Ordering::Relaxed); shutdown_rx.recv().unwrap(); }
/// Representa un resultado que devolvemos en forma Resultado + evaluaciones del fitness consumidas /// en el proceso pub struct FitnessEvaluationResult<T>{ result: T, iterations_consumed: u32, } impl<T> FitnessEvaluationResult<T>{ pub fn new(result: T, iterations_consumed: u32) -> Self{ return Self{result, iterations_consumed} } pub fn get_result(&self) -> &T{ return &self.result; } pub fn get_iterations_consumed(&self) -> u32{ return self.iterations_consumed; } pub fn get_mut_result(&mut self) -> &mut T{ return &mut self.result; } pub fn get_mut_iterations_consumed(&mut self) -> u32{ return self.iterations_consumed; } }
//! Hypergraph data structure and utilities use num::bigint::BigUint; use num::Zero; use rayon::prelude::*; /// A list of relations describing a hypergraph. /// Indices are considered nodes. /// Unlike a graph, in which edges have only two extremities, hypergraphs have hyperedges /// which can connect any number of vertices. pub struct DirectedHyperGraph(Vec<Vec<BigUint>>); /// A normal directed graph. This is used when outputting to JSON, so that Sigma.js can render it /// (Sigma.js's data model does not accomodate hyperedges, so we instead convert them to edges for /// visualization) pub struct DirectedGraph(Vec<(BigUint, BigUint)>); impl DirectedHyperGraph { /// Creates the simplest ternary hypergraph, one with a single relation. pub fn ternary_self_loop() -> Self { let relations = vec![vec![Zero::zero(), Zero::zero(), Zero::zero()]]; DirectedHyperGraph(relations) } /// Adds a relation of any number of vertices. pub fn add_relation(&mut self, rel: Vec<BigUint>) { self.0.push(rel); } /// Converts any n-ary relations to normal edges pub fn unroll_to_graph(self) -> DirectedGraph { let mut bin_rels: Vec<(BigUint, BigUint)> = Vec::new(); for rel in self.0.iter() { let mut new_rels: Vec<(BigUint, BigUint)> = Vec::new(); let mut rel_iter = rel.iter().peekable(); while let Some(vertex) = rel_iter.next() { if let Some(vertex_1) = rel_iter.peek() { new_rels.push((vertex.clone(), (*vertex_1).clone())); } } bin_rels.append(&mut new_rels); } DirectedGraph(bin_rels) } } impl DirectedGraph { pub fn num_edges(&self) -> usize { self.0.len() } pub fn edges(&self) -> &Vec<(BigUint, BigUint)> { &self.0 } } impl Default for DirectedHyperGraph { fn default() -> Self { DirectedHyperGraph(Vec::new()) } } #[cfg(test)] mod test { use super::*; #[test] fn smoke_unroll() { let hg = DirectedHyperGraph::ternary_self_loop(); let unrolled = hg.unroll_to_graph(); assert_eq!(2, unrolled.num_edges()); let edges = unrolled.edges(); assert_eq!(edges[0], (Zero::zero(), Zero::zero())); assert_eq!(edges[1], (Zero::zero(), Zero::zero())); } }
pub use {artist::*, comment::*, feed::*, general::*, post::*, song::*, user::*}; pub(crate) use websocket::*; mod artist; mod comment; mod feed; mod general; mod post; mod song; mod user; mod websocket;
use super::{parse, parse_rule, Rule, Token}; use std::collections::HashMap; #[test] fn test_parser_integer() { assert_eq!(parse_rule(Rule::token, "10"), Token::Integer(10)); } #[test] fn test_parser_symbol() { assert_eq!( parse_rule(Rule::token, "foobar"), Token::Symbol(Box::new(String::from("foobar"))) ); assert_eq!( parse_rule(Rule::token, "foobar-dash"), Token::Symbol(Box::new(String::from("foobar-dash"))) ); } #[test] fn test_parser_bangsymbol() { assert_eq!( parse_rule(Rule::token, "foobar!"), Token::BangSymbol(Box::new(String::from("foobar"))) ); } #[test] fn test_parser_none() { assert_eq!(parse_rule(Rule::token, "None"), Token::None); } #[test] fn test_parser_list() { assert_eq!( parse_rule(Rule::token, "[ 1 10 ]"), Token::List(vec![Token::Integer(1), Token::Integer(10)]) ); } #[test] fn test_parser_empty_map() { assert_eq!( parse_rule(Rule::token, "{}"), Token::Map(Box::new(HashMap::new())) ); } #[test] fn test_parser_string() { assert_eq!( parse_rule(Rule::token, "\"foo\""), Token::String(Box::new(String::from("foo"))) ); } #[test] fn test_parser_string_expression() { assert_eq!( parse_rule(Rule::token, "(print-string \"foo\")"), Token::Expression(vec![ Token::Symbol(Box::new(String::from("print-string"))), Token::String(Box::new(String::from("foo"))) ]) ); } #[test] fn test_parser_expression_no_parens() { assert_eq!( parse_rule(Rule::expression_no_parens, "print foo"), Token::Expression(vec![ Token::Symbol(Box::new(String::from("print"))), Token::Symbol(Box::new(String::from("foo"))) ]) ); } #[test] fn test_parser_multiple_expression() { assert_eq!( parse("print foo\nprint bar"), Token::List(vec![ Token::Expression(vec![ Token::Symbol(Box::new(String::from("print"))), Token::Symbol(Box::new(String::from("foo"))) ]), Token::Expression(vec![ Token::Symbol(Box::new(String::from("print"))), Token::Symbol(Box::new(String::from("bar"))) ]), ]) ); } #[test] fn test_parser_list_in_expression() { assert_eq!( parse("print [foo print]"), Token::List(vec![Token::Expression(vec![ Token::Symbol(Box::new(String::from("print"))), Token::List(vec![ Token::Symbol(Box::new(String::from("foo"))), Token::Symbol(Box::new(String::from("print"))), ]) ]),]) ); } #[test] fn test_parser_indented_list() { assert_eq!( parse("print\n\tprint\nbar"), Token::List(vec![ Token::Expression(vec![ Token::Symbol(Box::new(String::from("print"))), Token::List(vec![Token::Expression(vec![Token::Symbol(Box::new( String::from("print") )),]),]), ]), Token::Expression(vec![Token::Symbol(Box::new(String::from("bar"))),]), ]), ); } #[test] fn test_parser_map() { let mut m = HashMap::new(); m.insert( Token::Boolean(true).to_hashable().unwrap(), Token::Integer(1), ); m.insert( Token::Boolean(false).to_hashable().unwrap(), Token::Integer(1), ); assert_eq!( parse("{true: 1, false: 1,}"), Token::List(vec![Token::Expression(vec![Token::Map(Box::new(m))]),]), ); } #[test] fn test_parser_multiline_map() { let mut m = HashMap::new(); m.insert( Token::Boolean(true).to_hashable().unwrap(), Token::Integer(1), ); m.insert( Token::Boolean(false).to_hashable().unwrap(), Token::Integer(2), ); assert_eq!( parse( "{ \ttrue: 1, \tfalse: 2, }" ), Token::List(vec![Token::Expression(vec![Token::Map(Box::new(m))]),]), ); }
/// STerm: a wrapper around nitty-gritty terminal details. use crossterm::execute; use tui::backend::CrosstermBackend; use tui::Terminal; type CTBackend = CrosstermBackend<std::io::Stdout>; // wrapper around tui and crossterm stuff pub struct STerm { terminal: Terminal<CTBackend>, } impl Default for STerm { fn default() -> Self { let stdout = std::io::stdout(); let backend = CrosstermBackend::new(stdout); let terminal = tui::Terminal::new(backend).expect("couldn't make tui::Terminal"); init_terminal(); STerm { terminal } } } impl STerm { // proxying the only tui::Terminal method needed. // LEARN: why doesn't this work? (error about sized types, etc) // pub fn draw(&mut self, f: FnOnce(&mut tui::Frame<CTBackend>)) -> std::io::Result<()> { pub fn draw<F>(&mut self, f: F) -> std::io::Result<()> where F: FnOnce(&mut tui::Frame<CTBackend>), { // LEARN: nicer way to throw away the Ok value? self.terminal.draw(f).map(|_| ()) } } impl Drop for STerm { fn drop(&mut self) { restore_terminal(); } } // Note: zenith also does cursor::Hide and Clear in init, and Cursor::MoveTo, // Clear, cursor::Show in restore, but those don't seem to be necessary with the // alternative screen? fn init_terminal() { log::debug!("initializing STerm"); let mut sout = std::io::stdout(); // using an alternative screen prevents blank gap where the UI was rendering execute!(sout, crossterm::terminal::EnterAlternateScreen) .expect("Unable to enter alternate screen"); // needed to process key events as they come crossterm::terminal::enable_raw_mode().expect("Unable to enter raw mode."); } fn restore_terminal() { log::debug!("restoring STerm"); let mut sout = std::io::stdout(); execute!(sout, crossterm::terminal::LeaveAlternateScreen) .expect("Unable to leave alternate screen."); // fixes terminal offset weirdness crossterm::terminal::disable_raw_mode().expect("Unable to disable raw mode"); }
use core::ptr; const NDMA_BASE: u32 = 0x10002000u32; #[derive(Clone, Copy)] #[allow(non_camel_case_types)] #[allow(dead_code)] enum Reg { GLOBAL_CNT = 0x00, SRC_ADDR = 0x04, DST_ADDR = 0x08, TRANSFER_CNT = 0x0C, WRITE_CNT = 0x10, BLOCK_CNT = 0x14, FILL_DATA = 0x18, CNT = 0x1C } bf!(RegGlobalCnt[u32] { global_enable: 0:0, cycle_sel: 16:19, use_round_robin: 31:31 }); bf!(RegCnt[u32] { dst_update_method: 10:11, dst_reload: 12:12, src_update_method: 13:14, src_reload: 15:15, blk_xfer_size: 16:19, startup_mode: 24:27, mode_immediate: 28:28, mode_repeating: 29:29, irq_enabled: 30:30, busy: 31:31 }); #[inline(never)] fn read_reg<T: Copy>(reg: Reg, channel: u32) -> T { unsafe { ptr::read_volatile((NDMA_BASE + channel*0x1C + reg as u32) as *const T) } } #[inline(never)] fn write_reg<T: Copy>(reg: Reg, val: T, channel: u32) { unsafe { ptr::write_volatile((NDMA_BASE + channel*0x1C + reg as u32) as *mut T, val); } } pub enum NdmaSrc { FillData(u32), FixedAddr(*const u32), LinearBuf(*const u32, usize), } pub enum NdmaDst { FixedAddr(*mut u32), LinearBuf(*mut u32, usize) } impl NdmaSrc { fn max_xfer_words(&self) -> Option<usize> { match *self { NdmaSrc::FillData(_) | NdmaSrc::FixedAddr(_) => None, NdmaSrc::LinearBuf(_, len) => Some(len), } } fn src_type_index(&self) -> u32 { match *self { NdmaSrc::FillData(_) => 3, NdmaSrc::FixedAddr(_) => 2, NdmaSrc::LinearBuf(_, _) => 0 // Increasing } } } impl NdmaDst { fn max_xfer_words(&self) -> Option<usize> { match *self { NdmaDst::FixedAddr(_) => None, NdmaDst::LinearBuf(_, len) => Some(len), } } fn dst_type_index(&self) -> u32 { match *self { NdmaDst::FixedAddr(_) => 2, NdmaDst::LinearBuf(_, _) => 0 // Increasing } } } fn max_xfer_words(src: &NdmaSrc, dst: &NdmaDst, limit: Option<usize>) -> usize { let vals = [src.max_xfer_words(), dst.max_xfer_words(), limit]; let mut it = vals.iter().filter_map(|x| *x); let size = it.next() .expect("Cannot NDMA with inconsistent buffer sizes!"); if !it.all(|item| item == size) { panic!("Cannot NDMA with no defined transfer size!"); } size } pub fn mem_transfer(src: NdmaSrc, dst: NdmaDst) { // Ensure global settings let channel = 1; let mut global_cnt = RegGlobalCnt::new(0); global_cnt.global_enable.set(1); write_reg(Reg::GLOBAL_CNT, global_cnt, 0); let mut cnt = RegCnt::new(0); write_reg(Reg::CNT, cnt, channel); while { cnt = read_reg(Reg::CNT, channel); cnt.busy.get() == 1 } { } cnt.val = 0; match src { NdmaSrc::FillData(data) => { write_reg(Reg::FILL_DATA, data, channel); cnt.src_update_method.set(3); // Fill } NdmaSrc::LinearBuf(ptr, _) | NdmaSrc::FixedAddr(ptr) => { if (ptr as u32) & 0b11 != 0 { panic!("Tried to NDMA from a non-word-aligned address!"); } write_reg(Reg::SRC_ADDR, ptr as u32, channel); } } match dst { NdmaDst::LinearBuf(ptr, _) | NdmaDst::FixedAddr(ptr) => { if (ptr as u32) & 0b11 != 0 { panic!("Tried to NDMA to a non-word-aligned address!"); } write_reg(Reg::DST_ADDR, ptr as u32, channel); } } let xfer_size = max_xfer_words(&src, &dst, None); write_reg(Reg::WRITE_CNT, xfer_size as u32, channel); cnt.src_update_method.set(src.src_type_index()); cnt.dst_update_method.set(dst.dst_type_index()); cnt.mode_immediate.set(1); cnt.busy.set(1); // Start write_reg(Reg::CNT, cnt, channel); while { cnt = read_reg(Reg::CNT, channel); cnt.busy.get() == 1 } { } }
mod content; mod size; mod style; mod templates; pub use size::Size; pub use style::Style; use super::{icons::Icon, Color}; use content::{BadgeContentSize, ContentSize, SvgPath, TextWidth}; use core::{f32, fmt}; use std::fmt::Debug; use templates::{classic_template, flat_template}; #[derive(Debug)] pub struct BadgeTypeInit; #[derive(Debug)] pub struct BadgeTypeData<'a>(&'a [f32]); #[derive(Debug)] pub struct BadgeTypeText<'a>(&'a str); pub trait BadgeType<'a> { fn content(&self) -> BadgeContentType; } #[derive(Debug)] pub enum BadgeContentType<'a> { None, Text(&'a str), Data(&'a [f32]), } impl BadgeContentType<'_> { #[inline] fn is_some(&self) -> bool { !matches!(self, BadgeContentType::None) } #[inline] fn content_size(&self, height: usize, padding: usize, font_size: f32) -> ContentSize { match self { BadgeContentType::Data(d) => d.content_size(height, height * 5, padding, 0), BadgeContentType::Text(c) => { c.content_size(height, c.text_width(font_size), padding, 0) } _ => ContentSize::default(), } } } impl BadgeType<'_> for BadgeTypeInit { #[inline] fn content(&self) -> BadgeContentType { BadgeContentType::None } } impl<'a> BadgeType<'a> for BadgeTypeData<'a> { #[inline] fn content(&self) -> BadgeContentType { BadgeContentType::Data(self.0) } } impl<'a> BadgeType<'a> for BadgeTypeText<'a> { #[inline] fn content(&self) -> BadgeContentType { BadgeContentType::Text(self.0) } } #[derive(Debug)] pub struct Badge<'a, S: BadgeType<'a>> { subject: Option<&'a str>, color: Color, style: Style, icon: Option<Icon<'a>>, icon_color: Color, size: Size, content: S, } impl<'a> Badge<'a, BadgeTypeInit> { pub fn new() -> Self { Badge { subject: None, color: Color::blue(), style: Style::Classic, icon: None, icon_color: Color::white(), size: Size::Small, content: BadgeTypeInit, } } pub fn subject(&mut self, subject: &'a str) -> &mut Self { self.subject = Some(subject); self } pub fn color(&mut self, color: Color) -> &mut Self { self.color = color; self } pub fn icon(&mut self, icon: Icon<'a>) -> &mut Self { self.icon = Some(icon); self } pub fn size(&mut self, size: Size) -> &mut Self { self.size = size; self } pub fn style(&mut self, style: Style) -> &mut Self { self.style = style; self } pub fn icon_color(&mut self, c: Color) -> &mut Self { if let Some(_) = &self.icon { self.icon_color = c; } self } pub fn text(self, text: &'a str) -> Badge<'a, BadgeTypeText<'a>> { Badge { subject: self.subject, color: self.color, style: self.style, icon: self.icon, icon_color: self.icon_color, size: self.size, content: BadgeTypeText(text), } } pub fn data(self, data: &'a [f32]) -> Badge<'a, BadgeTypeData<'a>> { Badge { subject: self.subject, color: self.color, style: self.style, icon: self.icon, icon_color: self.icon_color, size: self.size, content: BadgeTypeData(data), } } } impl<'a, T: BadgeType<'a>> Badge<'a, T> { #[inline] fn height(&self) -> usize { match self.size { Size::Small => 20, Size::Medium => 30, Size::Large => 40, } } #[inline] fn font_size(&self) -> f32 { self.height() as f32 * SVG_FONT_MULTIPLIER } #[inline] fn icon_size(&self) -> (usize, usize) { if self.icon.is_none() { return (0, 0); } match self.size { Size::Large => (30, 10), Size::Medium => (20, 8), Size::Small => (15, 5), } } #[inline] fn subject_size(&self, padding: usize) -> ContentSize { let height = self.height(); let font_size = self.font_size(); let (icon_width, x_offset) = self.icon_size(); match self.subject { Some(s) => s.content_size( height, s.text_width(font_size), padding, x_offset + icon_width, ), None if self.icon.is_some() => ContentSize { rw: icon_width + x_offset * 2, x: x_offset, y: height, }, _ => ContentSize::default(), } } #[inline] fn rx(&self) -> usize { match self.size { Size::Medium => 6, Size::Large => 9, _ => 3, } } } const SVG_FONT_MULTIPLIER: f32 = 0.65; impl<'a, T: BadgeType<'a>> Badge<'a, T> { #[inline] fn render(&self) -> String { let height = self.height(); let font_size = self.font_size(); let padding = height / 2; let (icon_width, x_offset) = self.icon_size(); let subject_size = self.subject_size(padding); let content = self.content.content(); let content_size = content.content_size(height, padding, font_size); let width = subject_size.rw + content_size.rw; let rx = self.rx(); let icon = self.icon.as_ref().map(|i| (i, &self.icon_color)); let markup = match self.style { Style::Classic => classic_template( width, height, font_size, x_offset, rx, icon, icon_width, &self.color, content, content_size, self.subject, subject_size, ), Style::Flat => flat_template( width, height, font_size, x_offset, icon, icon_width, &self.color, content, content_size, self.subject, subject_size, ), }; markup.into_string() } } impl<'a, T: BadgeType<'a>> fmt::Display for Badge<'a, T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.render()) } } #[cfg(test)] mod tests { use super::{style::Style, Badge, Color, Size}; use crate::Icon; use scraper::{Html, Selector}; use std::convert::TryFrom; #[test] fn default_badge_has_classic_style() { let mut badge = Badge::new(); badge.subject("just text"); let badge_svg = badge.to_string(); let doc = Html::parse_fragment(&badge_svg); assert_eq!(badge.style, Style::Classic, "style not Classic"); let lg_selector = Selector::parse("linearGradient").unwrap(); assert!(doc.select(&lg_selector).next().is_some()); } #[test] fn default_badge_has_20px_height() { let mut badge = Badge::new(); badge.subject("just text"); let badge_svg = badge.to_string(); let doc = Html::parse_fragment(&badge_svg); let selector = Selector::parse("svg").unwrap(); let svg = doc.select(&selector).next().unwrap(); assert_eq!(svg.value().attr("height"), Some("20")); } #[test] fn default_badge_only_has_subject() { let mut badge = Badge::new(); badge.subject("just subject"); let badge_svg = badge.to_string(); let doc = Html::parse_fragment(&badge_svg); let text_sel = Selector::parse("g#text > text").unwrap(); let text_els = doc.select(&text_sel); assert_eq!(text_els.count(), 1); let text = doc.select(&text_sel).next().unwrap(); assert_eq!( text.text().collect::<String>(), String::from("just subject") ); } #[test] fn default_badge_has_333_as_background_color() { let mut badge = Badge::new(); badge.subject("just text"); badge.color(Color::blue()); let def_color: Color = Color::blue(); let badge_svg = badge.to_string(); let doc = Html::parse_fragment(&badge_svg); let rect_sel = Selector::parse("g#bg > rect#subject").unwrap(); let rect = doc.select(&rect_sel).next().unwrap(); assert_eq!(rect.value().attr("fill").unwrap(), def_color.as_ref()); } #[test] fn badge_with_text() { let mut badge = Badge::new(); badge.subject("with subject"); let doc = Html::parse_fragment(&badge.text("badge text").to_string()); let subject_sel = Selector::parse("g#text > text:last-child").unwrap(); let subject = doc.select(&subject_sel).next().unwrap(); assert_eq!( subject.text().collect::<String>(), String::from("badge text") ); } #[test] #[cfg(feature = "static_icons")] fn badge_with_icon() { let mut badge = Badge::new(); badge .subject("with icon") .icon(Icon::try_from("git").unwrap()); let icon = &badge.icon; assert!(icon.is_some()); let doc = Html::parse_fragment(&badge.to_string()); let icon_sel = Selector::parse("symbol").unwrap(); let icon_symbol = doc.select(&icon_sel).next().unwrap(); assert_eq!(icon_symbol.value().attr("id"), Some("git")); } #[test] #[cfg(feature = "static_icons")] fn badge_with_icon_only() { let mut badge = Badge::new(); badge.icon(Icon::try_from("git").unwrap()); let icon = &badge.icon; assert!(icon.is_some()); let doc = Html::parse_fragment(&badge.to_string()); let icon_sel = Selector::parse("symbol").unwrap(); let icon_symbol = doc.select(&icon_sel).next().unwrap(); assert_eq!(icon_symbol.value().attr("id"), Some("git")); } #[test] fn badge_has_medium_icon() { let mut badge = Badge::new(); badge.subject("with icon").size(Size::Medium); let doc = Html::parse_fragment(&badge.to_string()); let svg_sel = Selector::parse("svg").unwrap(); let svg = doc.select(&svg_sel).next().unwrap(); assert_eq!(svg.value().attr("height"), Some("30")); } #[test] fn badge_has_large_icon() { let mut badge = Badge::new(); badge.subject("with icon").size(Size::Large); let doc = Html::parse_fragment(&badge.to_string()); let svg_sel = Selector::parse("svg").unwrap(); let svg = doc.select(&svg_sel).next().unwrap(); assert_eq!(svg.value().attr("height"), Some("40")); } #[test] fn badge_with_data() { let mut badge = Badge::new(); badge.subject("Some data"); let badge = badge.data(&[1., 2., 3., 4., 5.]); let doc = Html::parse_fragment(&badge.to_string()); println!("{:?}", &badge.to_string()); let line_sel = Selector::parse("path").unwrap(); let svg = doc.select(&line_sel).next().unwrap(); assert!(svg.value().attr("d").is_some()); } }
#[doc = "Reader of register CTL3"] pub type R = crate::R<u32, super::CTL3>; #[doc = "Writer for register CTL3"] pub type W = crate::W<u32, super::CTL3>; #[doc = "Register CTL3 `reset()`'s with value 0"] impl crate::ResetValue for super::CTL3 { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `MSBF`"] pub type MSBF_R = crate::R<bool, bool>; #[doc = "Write proxy for field `MSBF`"] pub struct MSBF_W<'a> { w: &'a mut W, } impl<'a> MSBF_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `DINV`"] pub type DINV_R = crate::R<bool, bool>; #[doc = "Write proxy for field `DINV`"] pub struct DINV_W<'a> { w: &'a mut W, } impl<'a> DINV_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `TINV`"] pub type TINV_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TINV`"] pub struct TINV_W<'a> { w: &'a mut W, } impl<'a> TINV_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `RINV`"] pub type RINV_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RINV`"] pub struct RINV_W<'a> { w: &'a mut W, } impl<'a> RINV_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } #[doc = "Reader of field `EBIE`"] pub type EBIE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `EBIE`"] pub struct EBIE_W<'a> { w: &'a mut W, } impl<'a> EBIE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } #[doc = "Reader of field `RTIE`"] pub type RTIE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RTIE`"] pub struct RTIE_W<'a> { w: &'a mut W, } impl<'a> RTIE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } #[doc = "Reader of field `SCRTNUM`"] pub type SCRTNUM_R = crate::R<u8, u8>; #[doc = "Write proxy for field `SCRTNUM`"] pub struct SCRTNUM_W<'a> { w: &'a mut W, } impl<'a> SCRTNUM_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x07 << 1)) | (((value as u32) & 0x07) << 1); self.w } } #[doc = "Reader of field `RTEN`"] pub type RTEN_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RTEN`"] pub struct RTEN_W<'a> { w: &'a mut W, } impl<'a> RTEN_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { #[doc = "Bit 11 - Most significant bit first"] #[inline(always)] pub fn msbf(&self) -> MSBF_R { MSBF_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Data bit level inversion"] #[inline(always)] pub fn dinv(&self) -> DINV_R { DINV_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - TX pin level inversion"] #[inline(always)] pub fn tinv(&self) -> TINV_R { TINV_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - RX pin level inversion"] #[inline(always)] pub fn rinv(&self) -> RINV_R { RINV_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 5 - Interrupt enable bit of end of block event"] #[inline(always)] pub fn ebie(&self) -> EBIE_R { EBIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Interrupt enable bit of receive timeout event"] #[inline(always)] pub fn rtie(&self) -> RTIE_R { RTIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bits 1:3 - Smartcard auto-retry number"] #[inline(always)] pub fn scrtnum(&self) -> SCRTNUM_R { SCRTNUM_R::new(((self.bits >> 1) & 0x07) as u8) } #[doc = "Bit 0 - Receiver timeout enable"] #[inline(always)] pub fn rten(&self) -> RTEN_R { RTEN_R::new((self.bits & 0x01) != 0) } } impl W { #[doc = "Bit 11 - Most significant bit first"] #[inline(always)] pub fn msbf(&mut self) -> MSBF_W { MSBF_W { w: self } } #[doc = "Bit 10 - Data bit level inversion"] #[inline(always)] pub fn dinv(&mut self) -> DINV_W { DINV_W { w: self } } #[doc = "Bit 9 - TX pin level inversion"] #[inline(always)] pub fn tinv(&mut self) -> TINV_W { TINV_W { w: self } } #[doc = "Bit 8 - RX pin level inversion"] #[inline(always)] pub fn rinv(&mut self) -> RINV_W { RINV_W { w: self } } #[doc = "Bit 5 - Interrupt enable bit of end of block event"] #[inline(always)] pub fn ebie(&mut self) -> EBIE_W { EBIE_W { w: self } } #[doc = "Bit 4 - Interrupt enable bit of receive timeout event"] #[inline(always)] pub fn rtie(&mut self) -> RTIE_W { RTIE_W { w: self } } #[doc = "Bits 1:3 - Smartcard auto-retry number"] #[inline(always)] pub fn scrtnum(&mut self) -> SCRTNUM_W { SCRTNUM_W { w: self } } #[doc = "Bit 0 - Receiver timeout enable"] #[inline(always)] pub fn rten(&mut self) -> RTEN_W { RTEN_W { w: self } } }
use clap::{App, Arg}; use std::io::Write; use std::path::{Path, PathBuf}; use anyhow::{bail, Context, Result}; mod build; mod constants; fn main() -> Result<()> { let version = format!( "{}.{}.{}{}", env!("CARGO_PKG_VERSION_MAJOR"), env!("CARGO_PKG_VERSION_MINOR"), env!("CARGO_PKG_VERSION_PATCH"), option_env!("CARGO_PKG_VERSION_PRE").unwrap_or("") ); let matches = App::new("ontio-wasm-build") .about("does awesome things") .version(version.as_str()) .arg( Arg::with_name("input") .index(1) .required(true) .help("Wasm file generated by rustc compiler"), ) .arg(Arg::with_name("output").index(2).required(false).help("Output wasm/wast file name")) .arg( Arg::with_name("keepcustom") .long("keep-custom") .help("Keep custom section in output wasm file"), ) .get_matches(); let input = matches.value_of("input").expect("required arg can not be None"); if !Path::new(input).exists() { bail!("file does not exist: {}", input); } let (save_str, output) = match matches.value_of("output") { Some(output) => (None, output.to_string()), None => { let mut path = PathBuf::from(input); let mut file_stem = path.file_stem().unwrap().to_os_string(); file_stem.push("_optimized.wasm"); path.pop(); path.push(file_stem); let wasm = path.to_str().unwrap().to_string(); let str_file = wasm.clone() + ".str"; (Some(str_file), wasm) } }; let keep_custom = matches.is_present("keepcustom"); let module = parity_wasm::deserialize_file(input).context("could not deserialize input wasm file")?; let module = build::build(module, !keep_custom)?; let buf = parity_wasm::serialize(module)?; if buf.len() > constants::MAX_WASM_SIZE { bail!("finial wasm file size exceed 512KB"); } if let Some(str_file) = save_str { let mut io = ::std::fs::File::create(str_file)?; io.write_all(hex::encode(&buf).as_bytes())?; } let buf: Vec<u8> = match Path::new(&output).extension() { Some(ext) if ext == "wat" || ext == "wast" => { let wat = wasmprinter::print_bytes(&buf)?; wat.into_bytes() } Some(ext) if ext == "str" => hex::encode(&buf).as_bytes().to_vec(), _ => buf, }; let mut io = ::std::fs::File::create(output)?; io.write_all(&buf)?; return Ok(()); } #[cfg(test)] mod test;
//! The repository is a file system based structure of data files. Any changes to program data get //! persisted here. The updater pulls in the latest changes whenever required. use config::Config; use std::fs::Path; pub struct Repository { config: Config, repo: Path } impl Repository { fn new(config: Config) -> Repository { return Repository { config: config, repo: Path::new(env::home_dir()) .join(".spheres") } } /// Saves a record to the repository, triggering a watcher update. pub fn write(&self) { } }
use amethyst::ecs::{Entities, Join, ReadStorage, System}; use crate::components::Init; #[derive(Default)] pub struct InitSystem; impl<'s> System<'s> for InitSystem { type SystemData = ( ReadStorage<'s, Init>, Entities<'s> ); fn run(&mut self, (init, entities): Self::SystemData) { for (_, entity) in (&init, &entities).join() { entities.delete(entity).unwrap(); } } }
#[doc = "Register `CR2` reader"] pub type R = crate::R<CR2_SPEC>; #[doc = "Register `CR2` writer"] pub type W = crate::W<CR2_SPEC>; #[doc = "Field `ADDM7` reader - 7-bit Address Detection/4-bit Address Detection"] pub type ADDM7_R = crate::BitReader; #[doc = "Field `ADDM7` writer - 7-bit Address Detection/4-bit Address Detection"] pub type ADDM7_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `STOP` reader - STOP bits"] pub type STOP_R = crate::FieldReader; #[doc = "Field `STOP` writer - STOP bits"] pub type STOP_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 2, O>; #[doc = "Field `SWAP` reader - Swap TX/RX pins"] pub type SWAP_R = crate::BitReader; #[doc = "Field `SWAP` writer - Swap TX/RX pins"] pub type SWAP_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `RXINV` reader - RX pin active level inversion"] pub type RXINV_R = crate::BitReader; #[doc = "Field `RXINV` writer - RX pin active level inversion"] pub type RXINV_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `TXINV` reader - TX pin active level inversion"] pub type TXINV_R = crate::BitReader; #[doc = "Field `TXINV` writer - TX pin active level inversion"] pub type TXINV_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `TAINV` reader - Binary data inversion"] pub type TAINV_R = crate::BitReader; #[doc = "Field `TAINV` writer - Binary data inversion"] pub type TAINV_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `MSBFIRST` reader - Most significant bit first"] pub type MSBFIRST_R = crate::BitReader; #[doc = "Field `MSBFIRST` writer - Most significant bit first"] pub type MSBFIRST_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `ADD0_3` reader - Address of the USART node"] pub type ADD0_3_R = crate::FieldReader; #[doc = "Field `ADD0_3` writer - Address of the USART node"] pub type ADD0_3_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 4, O>; #[doc = "Field `ADD4_7` reader - Address of the USART node"] pub type ADD4_7_R = crate::FieldReader; #[doc = "Field `ADD4_7` writer - Address of the USART node"] pub type ADD4_7_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 4, O>; impl R { #[doc = "Bit 4 - 7-bit Address Detection/4-bit Address Detection"] #[inline(always)] pub fn addm7(&self) -> ADDM7_R { ADDM7_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bits 12:13 - STOP bits"] #[inline(always)] pub fn stop(&self) -> STOP_R { STOP_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bit 15 - Swap TX/RX pins"] #[inline(always)] pub fn swap(&self) -> SWAP_R { SWAP_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16 - RX pin active level inversion"] #[inline(always)] pub fn rxinv(&self) -> RXINV_R { RXINV_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17 - TX pin active level inversion"] #[inline(always)] pub fn txinv(&self) -> TXINV_R { TXINV_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bit 18 - Binary data inversion"] #[inline(always)] pub fn tainv(&self) -> TAINV_R { TAINV_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19 - Most significant bit first"] #[inline(always)] pub fn msbfirst(&self) -> MSBFIRST_R { MSBFIRST_R::new(((self.bits >> 19) & 1) != 0) } #[doc = "Bits 24:27 - Address of the USART node"] #[inline(always)] pub fn add0_3(&self) -> ADD0_3_R { ADD0_3_R::new(((self.bits >> 24) & 0x0f) as u8) } #[doc = "Bits 28:31 - Address of the USART node"] #[inline(always)] pub fn add4_7(&self) -> ADD4_7_R { ADD4_7_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { #[doc = "Bit 4 - 7-bit Address Detection/4-bit Address Detection"] #[inline(always)] #[must_use] pub fn addm7(&mut self) -> ADDM7_W<CR2_SPEC, 4> { ADDM7_W::new(self) } #[doc = "Bits 12:13 - STOP bits"] #[inline(always)] #[must_use] pub fn stop(&mut self) -> STOP_W<CR2_SPEC, 12> { STOP_W::new(self) } #[doc = "Bit 15 - Swap TX/RX pins"] #[inline(always)] #[must_use] pub fn swap(&mut self) -> SWAP_W<CR2_SPEC, 15> { SWAP_W::new(self) } #[doc = "Bit 16 - RX pin active level inversion"] #[inline(always)] #[must_use] pub fn rxinv(&mut self) -> RXINV_W<CR2_SPEC, 16> { RXINV_W::new(self) } #[doc = "Bit 17 - TX pin active level inversion"] #[inline(always)] #[must_use] pub fn txinv(&mut self) -> TXINV_W<CR2_SPEC, 17> { TXINV_W::new(self) } #[doc = "Bit 18 - Binary data inversion"] #[inline(always)] #[must_use] pub fn tainv(&mut self) -> TAINV_W<CR2_SPEC, 18> { TAINV_W::new(self) } #[doc = "Bit 19 - Most significant bit first"] #[inline(always)] #[must_use] pub fn msbfirst(&mut self) -> MSBFIRST_W<CR2_SPEC, 19> { MSBFIRST_W::new(self) } #[doc = "Bits 24:27 - Address of the USART node"] #[inline(always)] #[must_use] pub fn add0_3(&mut self) -> ADD0_3_W<CR2_SPEC, 24> { ADD0_3_W::new(self) } #[doc = "Bits 28:31 - Address of the USART node"] #[inline(always)] #[must_use] pub fn add4_7(&mut self) -> ADD4_7_W<CR2_SPEC, 28> { ADD4_7_W::new(self) } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } } #[doc = "Control register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cr2::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cr2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct CR2_SPEC; impl crate::RegisterSpec for CR2_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`cr2::R`](R) reader structure"] impl crate::Readable for CR2_SPEC {} #[doc = "`write(|w| ..)` method takes [`cr2::W`](W) writer structure"] impl crate::Writable for CR2_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets CR2 to value 0"] impl crate::Resettable for CR2_SPEC { const RESET_VALUE: Self::Ux = 0; }
use std::vec::Vec; static ZERO_PAGE: Page = Page { data: [0; 4096], ref_count: 0, ppn: 0 }; static mut MEM: Memory = Memory { free_list: Vec::new(), used_list: Vec::new(), zero_page: &ZERO_PAGE }; #[derive(Copy, Clone)] pub struct Page { data: [u8; 4096], ref_count: usize, ppn: u32, } impl Page { pub(crate) fn new(ppn: u32) -> Self { Self { data: [0; 4096], ref_count: 0, ppn: ppn } } pub fn read<T>(&self, index: usize) -> &[u8] { if self.ppn == 0 { return &[0]; } let size = std::mem::size_of::<T>(); let s = index - index % size; let e = s + size; &self.data[s..e] } pub fn write<T>(&mut self, index: usize, data: &[u8]) { let size = std::mem::size_of::<T>(); let s = index - index % size; let e = s + size; let mut i = 0; for idx in s..e { if i < data.len() { self.data[idx] = data[i]; i += 1; } } } pub fn ppn(&self) -> u32 { self.ppn } fn zero(&mut self) { self.write::<[u8; 4096]>(0, &[0; 4096]); } pub fn ref_count(&self) -> usize { self.ref_count } pub fn increment_refs(&mut self) { self.ref_count += 1 } pub fn decrement_refs(&mut self) { self.ref_count -= 1 } pub fn copy(&mut self, other: &Page) { self.write::<[u8; 4096]>(0, &other.data); } } struct Memory { free_list: Vec<Page>, used_list: Vec<Page>, zero_page: &'static Page, } impl Memory { fn new() -> Self { let mut v: Vec<Page> = Vec::new(); for ppn in 1..32 { v.push(Page::new(32 - ppn)); } Self { free_list: v, used_list: Vec::new(), zero_page: &ZERO_PAGE, } } fn pop_free(&mut self) -> Option<Page> { self.free_list.pop().map(|mut page| { page.zero(); page }) } fn push_free(&mut self, page: Page) { self.free_list.push(page); } fn push_used(&mut self, page: Page) { self.used_list.push(page); } fn remove_used(&mut self, page: &Page) -> Option<Page> { let mut idx = self.used_list.len(); for i in 0..self.used_list.len() { if self.used_list[i].ppn == page.ppn { idx = i; } } if idx != self.used_list.len() { return Some(self.used_list.remove(idx)); } return None; } fn used_peek(&mut self) -> Option<&mut Page> { let idx = self.used_list.len() - 1; self.used_list.get_mut(idx) } fn get_zero_ref(&self) -> &Page { self.zero_page } } pub fn kinit() { unsafe { MEM = Memory::new() } } pub fn kalloc() -> Option<&'static mut Page> { unsafe { match MEM.pop_free() { Some(mut page) => { page.increment_refs(); MEM.push_used(page); MEM.used_peek() }, None => None } } } pub fn kfree(page: &Page) { if page.ppn == 0 { return; } unsafe { MEM.push_free(MEM.remove_used(page).unwrap()); } } pub fn zero_page() -> &'static Page { let zero: &Page; zero = unsafe { MEM.get_zero_ref() }; zero }
#[doc = "Register `OPTCR` reader"] pub type R = crate::R<OPTCR_SPEC>; #[doc = "Register `OPTCR` writer"] pub type W = crate::W<OPTCR_SPEC>; #[doc = "Field `OPTLOCK` reader - Option lock"] pub type OPTLOCK_R = crate::BitReader; #[doc = "Field `OPTLOCK` writer - Option lock"] pub type OPTLOCK_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `OPTSTRT` reader - Option start"] pub type OPTSTRT_R = crate::BitReader; #[doc = "Field `OPTSTRT` writer - Option start"] pub type OPTSTRT_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `BOR_LEV` reader - BOR reset Level"] pub type BOR_LEV_R = crate::FieldReader; #[doc = "Field `BOR_LEV` writer - BOR reset Level"] pub type BOR_LEV_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 2, O>; #[doc = "Field `WWDG_SW` reader - User option bytes"] pub type WWDG_SW_R = crate::BitReader; #[doc = "Field `WWDG_SW` writer - User option bytes"] pub type WWDG_SW_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `IWDG_SW` reader - User option bytes"] pub type IWDG_SW_R = crate::BitReader; #[doc = "Field `IWDG_SW` writer - User option bytes"] pub type IWDG_SW_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `nRST_STOP` reader - User option bytes"] pub type N_RST_STOP_R = crate::BitReader; #[doc = "Field `nRST_STOP` writer - User option bytes"] pub type N_RST_STOP_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `nRST_STDBY` reader - User option bytes"] pub type N_RST_STDBY_R = crate::BitReader; #[doc = "Field `nRST_STDBY` writer - User option bytes"] pub type N_RST_STDBY_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `RDP` reader - Read protect"] pub type RDP_R = crate::FieldReader; #[doc = "Field `RDP` writer - Read protect"] pub type RDP_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 8, O>; #[doc = "Field `nWRP` reader - Not write protect"] pub type N_WRP_R = crate::FieldReader; #[doc = "Field `nWRP` writer - Not write protect"] pub type N_WRP_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 8, O>; #[doc = "Field `IWDG_STDBY` reader - Independent watchdog counter freeze in standby mode"] pub type IWDG_STDBY_R = crate::BitReader; #[doc = "Field `IWDG_STDBY` writer - Independent watchdog counter freeze in standby mode"] pub type IWDG_STDBY_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; #[doc = "Field `IWDG_STOP` reader - Independent watchdog counter freeze in Stop mode"] pub type IWDG_STOP_R = crate::BitReader; #[doc = "Field `IWDG_STOP` writer - Independent watchdog counter freeze in Stop mode"] pub type IWDG_STOP_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>; impl R { #[doc = "Bit 0 - Option lock"] #[inline(always)] pub fn optlock(&self) -> OPTLOCK_R { OPTLOCK_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - Option start"] #[inline(always)] pub fn optstrt(&self) -> OPTSTRT_R { OPTSTRT_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 2:3 - BOR reset Level"] #[inline(always)] pub fn bor_lev(&self) -> BOR_LEV_R { BOR_LEV_R::new(((self.bits >> 2) & 3) as u8) } #[doc = "Bit 4 - User option bytes"] #[inline(always)] pub fn wwdg_sw(&self) -> WWDG_SW_R { WWDG_SW_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - User option bytes"] #[inline(always)] pub fn iwdg_sw(&self) -> IWDG_SW_R { IWDG_SW_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - User option bytes"] #[inline(always)] pub fn n_rst_stop(&self) -> N_RST_STOP_R { N_RST_STOP_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 7 - User option bytes"] #[inline(always)] pub fn n_rst_stdby(&self) -> N_RST_STDBY_R { N_RST_STDBY_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bits 8:15 - Read protect"] #[inline(always)] pub fn rdp(&self) -> RDP_R { RDP_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23 - Not write protect"] #[inline(always)] pub fn n_wrp(&self) -> N_WRP_R { N_WRP_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bit 30 - Independent watchdog counter freeze in standby mode"] #[inline(always)] pub fn iwdg_stdby(&self) -> IWDG_STDBY_R { IWDG_STDBY_R::new(((self.bits >> 30) & 1) != 0) } #[doc = "Bit 31 - Independent watchdog counter freeze in Stop mode"] #[inline(always)] pub fn iwdg_stop(&self) -> IWDG_STOP_R { IWDG_STOP_R::new(((self.bits >> 31) & 1) != 0) } } impl W { #[doc = "Bit 0 - Option lock"] #[inline(always)] #[must_use] pub fn optlock(&mut self) -> OPTLOCK_W<OPTCR_SPEC, 0> { OPTLOCK_W::new(self) } #[doc = "Bit 1 - Option start"] #[inline(always)] #[must_use] pub fn optstrt(&mut self) -> OPTSTRT_W<OPTCR_SPEC, 1> { OPTSTRT_W::new(self) } #[doc = "Bits 2:3 - BOR reset Level"] #[inline(always)] #[must_use] pub fn bor_lev(&mut self) -> BOR_LEV_W<OPTCR_SPEC, 2> { BOR_LEV_W::new(self) } #[doc = "Bit 4 - User option bytes"] #[inline(always)] #[must_use] pub fn wwdg_sw(&mut self) -> WWDG_SW_W<OPTCR_SPEC, 4> { WWDG_SW_W::new(self) } #[doc = "Bit 5 - User option bytes"] #[inline(always)] #[must_use] pub fn iwdg_sw(&mut self) -> IWDG_SW_W<OPTCR_SPEC, 5> { IWDG_SW_W::new(self) } #[doc = "Bit 6 - User option bytes"] #[inline(always)] #[must_use] pub fn n_rst_stop(&mut self) -> N_RST_STOP_W<OPTCR_SPEC, 6> { N_RST_STOP_W::new(self) } #[doc = "Bit 7 - User option bytes"] #[inline(always)] #[must_use] pub fn n_rst_stdby(&mut self) -> N_RST_STDBY_W<OPTCR_SPEC, 7> { N_RST_STDBY_W::new(self) } #[doc = "Bits 8:15 - Read protect"] #[inline(always)] #[must_use] pub fn rdp(&mut self) -> RDP_W<OPTCR_SPEC, 8> { RDP_W::new(self) } #[doc = "Bits 16:23 - Not write protect"] #[inline(always)] #[must_use] pub fn n_wrp(&mut self) -> N_WRP_W<OPTCR_SPEC, 16> { N_WRP_W::new(self) } #[doc = "Bit 30 - Independent watchdog counter freeze in standby mode"] #[inline(always)] #[must_use] pub fn iwdg_stdby(&mut self) -> IWDG_STDBY_W<OPTCR_SPEC, 30> { IWDG_STDBY_W::new(self) } #[doc = "Bit 31 - Independent watchdog counter freeze in Stop mode"] #[inline(always)] #[must_use] pub fn iwdg_stop(&mut self) -> IWDG_STOP_W<OPTCR_SPEC, 31> { IWDG_STOP_W::new(self) } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } } #[doc = "Flash option control register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`optcr::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`optcr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] pub struct OPTCR_SPEC; impl crate::RegisterSpec for OPTCR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [`optcr::R`](R) reader structure"] impl crate::Readable for OPTCR_SPEC {} #[doc = "`write(|w| ..)` method takes [`optcr::W`](W) writer structure"] impl crate::Writable for OPTCR_SPEC { const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets OPTCR to value 0xc0ff_aafd"] impl crate::Resettable for OPTCR_SPEC { const RESET_VALUE: Self::Ux = 0xc0ff_aafd; }
use std::io::prelude::*; use std::fs::File; use std::error::Error; use std::cmp; use std::iter::repeat; fn main() { let mut buffer = String::new(); read_file("input.txt", &mut buffer); // Find size of grid let mut x_min: i32 = 0; let mut y_min: i32 = 0; let mut x_current: i32 = 0; let mut x_max: i32 = 0; let mut y_max: i32 = 0; let mut y_current: i32 = 0; for c in buffer.chars() { match c { '>' => { x_current += 1; x_max = cmp::max(x_current, x_max); } '<' => { x_current -= 1; x_min = cmp::min(x_current, x_min); } '^' => { y_current += 1; y_max = cmp::max(y_current, y_max); } 'v' => { y_current -= 1; y_min = cmp::min(y_current, y_min); } _ => { } } } let width = (x_min.abs() + x_max) as usize; let height = (y_min.abs() + y_max) as usize; let mut x: usize = x_min.abs() as usize; let mut y: usize = y_min.abs() as usize; // Create vector array of right size let mut state: Vec<u32> = repeat(0u32).take(height * width).collect(); // Set initial location to active state[y * height + x] = 1; // Loop path and increment value in array for c in buffer.chars() { match c { '>' => { x += 1; } '<' => { x -= 1; } '^' => { y += 1; } 'v' => { y -= 1; } _ => { } } state[y * height + x] += 1; } // Find number of active elements let mut counter = 0; for i in 0..state.len() { if state[i] > 0 { counter += 1; } } // Print result println!("{}", counter); } fn read_file(filename: &str, buffer: &mut String) { // Open file let mut file = match File::open(filename) { // The `description` method of `io::Error` returns a string that // describes the error Err(why) => panic!("couldn't open {}: {}", filename, Error::description(&why)), Ok(file) => file, }; // Read content match file.read_to_string(buffer) { // The `description` method of `io::Error` returns a string that // describes the error Err(why) => panic!("couldn't read {}: {}", filename, Error::description(&why)), Ok(file) => file, }; }
use repr::{Lit, LitPack}; /// Types that are able to generate single literals and literal packs. /// /// # Note /// /// Used by `GateEncoder` implementors. pub trait LitGen { /// Generate and return a new single literal. /// /// # Note /// /// Generate a literal pack if you need multiple related literals since /// this is more efficient. fn new_lit(&self) -> Lit; /// Generate and return a new literal pack for the given amount of literals. /// /// # Note /// /// A literal pack of size `N` is more efficient to use than generating /// `N` single literals and also have a very efficient memory representation /// since their IDs are guaranteed to be continuous. /// /// All literals represented by the returned literal pack are in positive polarity. fn new_lit_pack(&self, size: usize) -> LitPack; } /// Types that allow to encode assertions at bit level. pub trait AssertEncoder { /// Assert the given literal. fn assert_lit<L>(&self, lit: L) where L: Into<Lit>; } /// Encodes gate structures at the bit level. /// /// # Note /// /// - This is used as the backend of the bit blasting routines /// and allows to transform SMT code to bit-level code. /// /// - Implementors might transform the given gates into different /// boolean formula forms such as CNF or AIG. /// /// - This interface allows for semi high-level and efficient /// modular bit blasting. /// /// # Gate Structure /// /// A gate structure is a boolean functional that always has /// exactly one output at the end that is equivalent to the /// result of the encoded boolean functional and thus its /// representant. /// /// The output can be used to nest gates within each other. pub trait RawGateEncoder { /// Encode an AND gate with the given output and literals. /// /// # Panics /// /// If `lits` yields less than 2 literals. fn and_gate<I>(&self, output: Lit, lits: I) where I: IntoIterator<Item = Lit>; /// Encode an OR gate with the given output and literals. /// /// # Panics /// /// If `lits` yields less than 2 literals. fn or_gate<I>(&self, output: Lit, lits: I) where I: IntoIterator<Item = Lit>; /// Encode an XOR gate with the given output and literals: `lhs ^ rhs` fn xor_gate(&self, output: Lit, lhs: Lit, rhs: Lit); /// Encode an IMPLIES gate with the given output and literals: `lhs => rhs` fn implies_gate(&self, output: Lit, lhs: Lit, rhs: Lit); /// Encode an IFF (if-and-only-if) gate with the given output and literals: `lhs <=> rhs` fn iff_gate(&self, output: Lit, lhs: Lit, rhs: Lit); } /// Represents the output literal of a gate. /// /// # Note /// /// This exists to make explicit gate outputs more visible in callees. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub struct Output(pub Lit); impl From<Output> for Lit { fn from(output: Output) -> Lit { output.0 } } /// Wraps a literal generator and a raw gate encoder to provide /// a convenient interface to the raw gate encoder. pub struct GateEncoder<G, E> where G: LitGen, E: RawGateEncoder, { /// The literal generator. lit_gen: G, /// The gate encoder. enc: E, } impl<G, E> GateEncoder<G, E> where G: LitGen, E: RawGateEncoder, { /// Create a new gate encoder. pub fn new(lit_gen: G, enc: E) -> Self { Self { lit_gen, enc } } /// Generate and return a new single literal. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::new_lit`](struct.RawGateEncoder.html#method.new_lit). pub fn new_lit(&self) -> Lit { self.lit_gen.new_lit() } /// Generate and return a literal pack. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::new_lit_pack`](struct.RawGateEncoder.html#method.new_lit_pack). pub fn new_lit_pack(&self, size: usize) -> LitPack { self.lit_gen.new_lit_pack(size) } /// Define an AND gate with the given literals and the given output. /// /// # Panics /// /// If `lits` yields less than 2 literals. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::and_gate`](struct.RawGateEncoder.html#method.and_gate). pub fn and_with_output<I, L>(&self, lits: I, output: Output) where I: IntoIterator<Item = L>, L: Into<Lit>, { self.enc.and_gate(output.into(), lits.into_iter().map(Into::into)) } /// Define an AND gate with an implicit output. /// The generated output is returned to allow for nesting of gates. /// /// # Panics /// /// If `lits` yields less than 2 literals. pub fn and<I, L>(&self, lits: I) -> Lit where I: IntoIterator<Item = L>, L: Into<Lit>, { let output = Output(self.lit_gen.new_lit()); self.and_with_output(lits, output); Lit::from(output) } /// Define an OR gate with the given literals and the given output. /// /// # Panics /// /// If `lits` yields less than 2 literals. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::or_gate`](struct.RawGateEncoder.html#method.or_gate). pub fn or_with_output<I, L>(&self, lits: I, output: Output) where I: IntoIterator<Item = L>, L: Into<Lit>, { self.enc.or_gate(output.into(), lits.into_iter().map(Into::into)) } /// Define an OR gate with an implicit output. /// The generated output is returned to allow for nesting of gates. /// /// # Panics /// /// If `lits` yields less than 2 literals. pub fn or<I, L>(&self, lits: I) -> Lit where I: IntoIterator<Item = L>, L: Into<Lit>, { let output = Output(self.lit_gen.new_lit()); self.or_with_output(lits, output); Lit::from(output) } /// Define an XOR gate with the given literals and the given output. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::xor_gate`](struct.RawGateEncoder.html#method.xor_gate). pub fn xor_with_output<L1, L2>(&self, lhs: L1, rhs: L2, output: Output) where L1: Into<Lit>, L2: Into<Lit>, { self.enc.xor_gate(output.into(), lhs.into(), rhs.into()) } /// Define an XOR gate with an implicit output. /// The generated output is returned to allow for nesting of gates. pub fn xor<L1, L2>(&self, lhs: L1, rhs: L2) -> Lit where L1: Into<Lit>, L2: Into<Lit>, { let output = Output(self.lit_gen.new_lit()); self.xor_with_output(lhs, rhs, output); Lit::from(output) } /// Define an IMPLIES gate with the given literals and the given output. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::implies_gate`](struct.RawGateEncoder.html#method.implies_gate). pub fn implies_with_output<L1, L2>(&self, lhs: L1, rhs: L2, output: Output) where L1: Into<Lit>, L2: Into<Lit>, { self.enc.implies_gate(output.into(), lhs.into(), rhs.into()) } /// Define an IMPLIES gate with an implicit output. /// The generated output is returned to allow for nesting of gates. pub fn implies<L1, L2>(&self, lhs: L1, rhs: L2) -> Lit where L1: Into<Lit>, L2: Into<Lit>, { let output = Output(self.lit_gen.new_lit()); self.implies_with_output(lhs, rhs, output); Lit::from(output) } /// Define an IFF (If-And-Only-If) gate with the given literals and the given output. /// /// # Note /// /// For more information look at /// [`RawGateEncoder::iff_gate`](struct.RawGateEncoder.html#method.iff_gate). pub fn iff_with_output<L1, L2>(&self, lhs: L1, rhs: L2, output: Output) where L1: Into<Lit>, L2: Into<Lit>, { self.enc.iff_gate(output.into(), lhs.into(), rhs.into()) } /// Define an IFF (If-And-Only-Iff) gate with an implicit output. /// The generated output is returned to allow for nesting of gates. pub fn iff<L1, L2>(&self, lhs: L1, rhs: L2) -> Lit where L1: Into<Lit>, L2: Into<Lit>, { let output = Output(self.lit_gen.new_lit()); self.iff_with_output(lhs, rhs, output); Lit::from(output) } }
#![allow(unreachable_patterns, unused_parens, unused_mut)] // action_4 is unused... #![allow(dead_code)] use std::rc::Rc; use std::boxed::FnBox; use either::Either::*; use data::position::{Located, Pos}; use data::node::NodeInfo; use data::ident::Ident; use parser::tokens::*; use parser::lexer::{lex, parse_error}; use parser::{ParseError, PState, CDeclrR}; use syntax::ops::*; use syntax::ast::*; use syntax::constants::*; type Error = ParseError; type State = PState; type Token = CToken; const EOF_TOK: Token = CToken::CTokEof; macro_rules! with_pos { ($parser:expr, $infonode:expr, $closure:expr) => {{ let pos1 = $infonode.pos(); let (pos2, len) = $parser.saved_token().pos_len(); Ok($closure(NodeInfo::new(pos1, pos2, len, $parser.new_name()))) }}; } macro_rules! unwrap_let { ($pat:pat = $expr:expr; $($tt:tt)+) => { if let $pat = $expr { $($tt)+ } else { unreachable!() } } } // Parser produced by modified Happy Version 1.19.6 pub enum HappyAbsSyn { Terminal(CToken), ErrorToken(isize), NT7(Box<CTranslUnit>), NT8(Vec<CExtDecl>), NT9(Box<CExtDecl>), NT10(Box<CFunDef>), NT11(Box<CDeclr>), NT12(Box<CStat>), NT15(()), NT17(Vec<CBlockItem>), NT18(Box<CBlockItem>), NT21(Vec<Ident>), NT26(Box<CAsmStmt>), NT27(Option<Box<CTypeQual>>), NT28(Vec<CAsmOperand>), NT30(Box<CAsmOperand>), NT31(Vec<CStrLit>), NT32(Box<CDecl>), NT33(Vec<CDecl>), NT35(Box<(Option<Box<CStrLit>>, Vec<CAttr>)>), NT37(Vec<CDeclSpec>), NT39(Box<CDeclSpec>), NT41(Box<CStorageSpec>), NT42(Box<CFunSpec>), NT43(Box<CAlignSpec>), NT45(Box<CTypeSpec>), NT53(Box<CStructUnion>), NT54(Located<CStructTag>), NT59((Option<Box<CDeclr>>, Option<Box<CExpr>>)), NT61(Box<CEnum>), NT62(Vec<(Ident, Option<Box<CExpr>>)>), NT63((Ident, Option<Box<CExpr>>)), NT64(Box<CTypeQual>), NT65(Vec<CTypeQual>), NT66(Box<CDeclrR>), NT67(Option<Box<CStrLit>>), NT82((Vec<CDecl>, bool)), NT88(Box<FnBox(Box<CDeclrR>) -> Box<CDeclrR>>), NT93(Box<CInit>), NT94(Option<Box<CInit>>), NT95(CInitList), NT96(Vec<CDesignator>), NT98(Box<CDesignator>), NT100(Box<CExpr>), NT101(Vec<(Option<Box<CDecl>>, Box<CExpr>)>), NT102((Option<Box<CDecl>>, Box<CExpr>)), NT105(Vec<CExpr>), NT107(Located<CUnaryOp>), NT121(Located<CAssignOp>), NT124(Option<Box<CExpr>>), NT127(Box<CConst>), NT128(Box<CStrLit>), NT129(Vec<CString>), NT130(ClangCVersion), NT131(Ident), NT132(Vec<CAttr>), NT136(Option<Box<CAttr>>), } fn action_0(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 7 => happy_goto(p, action_146, j), 8 => happy_goto(p, action_5, j), _ => happy_reduce_5(p, j) } } fn action_1(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 187 => happy_shift(p, action_115, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_145, j), 9 => happy_goto(p, action_77, j), 10 => happy_goto(p, action_78, j), 11 => happy_goto(p, action_79, j), 32 => happy_goto(p, action_80, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_83, j), 38 => happy_goto(p, action_84, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_89, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_101, j), 75 => happy_goto(p, action_102, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_106, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_110, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_2(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_51, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_3(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_23, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_4(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 8 => happy_goto(p, action_5, j), _ => happy_fail(p, j) } } fn action_5(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 180 => happy_shift(p, action_337, j), 185 => happy_shift(p, action_114, j), 187 => happy_shift(p, action_115, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_145, j), 249 => happy_reduce_4(p, j), 9 => happy_goto(p, action_336, j), 10 => happy_goto(p, action_78, j), 11 => happy_goto(p, action_79, j), 32 => happy_goto(p, action_80, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_83, j), 38 => happy_goto(p, action_84, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_89, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_101, j), 75 => happy_goto(p, action_102, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_106, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_110, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_6(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_378(p, j) } } fn action_7(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_330, j), 140 => happy_shift(p, action_331, j), 142 => happy_shift(p, action_332, j), 143 => happy_shift(p, action_333, j), 146 => happy_shift(p, action_334, j), 147 => happy_shift(p, action_335, j), _ => happy_reduce_390(p, j) } } fn action_8(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_319, j), 169 => happy_shift(p, action_320, j), 170 => happy_shift(p, action_321, j), 171 => happy_shift(p, action_322, j), 172 => happy_shift(p, action_323, j), 173 => happy_shift(p, action_324, j), 174 => happy_shift(p, action_325, j), 175 => happy_shift(p, action_326, j), 176 => happy_shift(p, action_327, j), 177 => happy_shift(p, action_328, j), 178 => happy_shift(p, action_329, j), 121 => happy_goto(p, action_318, j), _ => happy_reduce_408(p, j) } } fn action_9(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_317, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_10(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_410(p, j) } } fn action_11(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 150 => happy_shift(p, action_314, j), 151 => happy_shift(p, action_315, j), 152 => happy_shift(p, action_316, j), _ => happy_reduce_414(p, j) } } fn action_12(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 148 => happy_shift(p, action_312, j), 149 => happy_shift(p, action_313, j), _ => happy_reduce_417(p, j) } } fn action_13(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 154 => happy_shift(p, action_310, j), 155 => happy_shift(p, action_311, j), _ => happy_reduce_420(p, j) } } fn action_14(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 156 => happy_shift(p, action_306, j), 157 => happy_shift(p, action_307, j), 158 => happy_shift(p, action_308, j), 159 => happy_shift(p, action_309, j), _ => happy_reduce_425(p, j) } } fn action_15(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 160 => happy_shift(p, action_304, j), 161 => happy_shift(p, action_305, j), _ => happy_reduce_428(p, j) } } fn action_16(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 153 => happy_shift(p, action_303, j), _ => happy_reduce_430(p, j) } } fn action_17(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 162 => happy_shift(p, action_302, j), _ => happy_reduce_432(p, j) } } fn action_18(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 163 => happy_shift(p, action_301, j), _ => happy_reduce_434(p, j) } } fn action_19(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 164 => happy_shift(p, action_300, j), _ => happy_reduce_436(p, j) } } fn action_20(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 165 => happy_shift(p, action_298, j), 166 => happy_shift(p, action_299, j), _ => happy_reduce_438(p, j) } } fn action_21(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_441(p, j) } } fn action_22(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_297, j), _ => happy_reduce_454(p, j) } } fn action_23(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 249 => Ok(Cont::Accept(j)), _ => happy_fail(p, j) } } fn action_24(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_362(p, j) } } fn action_25(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_363(p, j) } } fn action_26(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 14 => happy_goto(p, action_288, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_294, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_295, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_27(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_407(p, j) } } fn action_28(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_406(p, j) } } fn action_29(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_287, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_30(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_286, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_31(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_404(p, j) } } fn action_32(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_405(p, j) } } fn action_33(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_403(p, j) } } fn action_34(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_402(p, j) } } fn action_35(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_285, j), _ => happy_fail(p, j) } } fn action_36(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_284, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_283, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_37(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_282, j), _ => happy_fail(p, j) } } fn action_38(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_281, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_280, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_39(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_464(p, j) } } fn action_40(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_463(p, j) } } fn action_41(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_465(p, j) } } fn action_42(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_279, j), 129 => happy_goto(p, action_278, j), _ => happy_reduce_466(p, j) } } fn action_43(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_361(p, j) } } fn action_44(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_277, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_45(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_276, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_46(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_274, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_47(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_273, j), _ => happy_fail(p, j) } } fn action_48(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_272, j), _ => happy_fail(p, j) } } fn action_49(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_271, j), _ => happy_fail(p, j) } } fn action_50(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_270, j), _ => happy_fail(p, j) } } fn action_51(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 249 => Ok(Cont::Accept(j)), _ => happy_fail(p, j) } } fn action_52(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_27(p, j) } } fn action_53(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_28(p, j) } } fn action_54(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_29(p, j) } } fn action_55(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_30(p, j) } } fn action_56(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_31(p, j) } } fn action_57(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_32(p, j) } } fn action_58(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_33(p, j) } } fn action_59(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_269, j), _ => happy_fail(p, j) } } fn action_60(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_268, j), _ => happy_fail(p, j) } } fn action_61(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_56(p, j) } } fn action_62(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 15 => happy_goto(p, action_267, j), _ => happy_reduce_40(p, j) } } fn action_63(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 27 => happy_goto(p, action_265, j), 64 => happy_goto(p, action_266, j), _ => happy_reduce_74(p, j) } } fn action_64(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_264, j), _ => happy_fail(p, j) } } fn action_65(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_263, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_66(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_260, j), _ => happy_fail(p, j) } } fn action_67(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_259, j), _ => happy_fail(p, j) } } fn action_68(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_258, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_69(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_257, j), _ => happy_fail(p, j) } } fn action_70(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 150 => happy_shift(p, action_255, j), 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_254, j), _ => happy_fail(p, j) } } fn action_71(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_253, j), _ => happy_fail(p, j) } } fn action_72(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_252, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_73(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_250, j), _ => happy_fail(p, j) } } fn action_74(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_249, j), _ => happy_fail(p, j) } } fn action_75(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_reduce_471(p, j), _ => happy_reduce_361(p, j) } } fn action_76(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_472(p, j) } } fn action_77(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 249 => Ok(Cont::Accept(j)), _ => happy_fail(p, j) } } fn action_78(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_8(p, j) } } fn action_79(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_248, j), _ => happy_fail(p, j) } } fn action_80(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_9(p, j) } } fn action_81(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_246, j), 180 => happy_shift(p, action_247, j), _ => happy_fail(p, j) } } fn action_82(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_244, j), 180 => happy_shift(p, action_245, j), _ => happy_fail(p, j) } } fn action_83(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_229, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 11 => happy_goto(p, action_241, j), 66 => happy_goto(p, action_242, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_227, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_243, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), _ => happy_fail(p, j) } } fn action_84(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_239, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_240, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_232, j), 39 => happy_goto(p, action_233, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 45 => happy_goto(p, action_234, j), 52 => happy_goto(p, action_235, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_203, j), 75 => happy_goto(p, action_236, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_237, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 134 => happy_goto(p, action_238, j), _ => happy_fail(p, j) } } fn action_85(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_104(p, j) } } fn action_86(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_114(p, j) } } fn action_87(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_115(p, j) } } fn action_88(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_116(p, j) } } fn action_89(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_229, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 11 => happy_goto(p, action_219, j), 66 => happy_goto(p, action_220, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_227, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_228, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), _ => happy_fail(p, j) } } fn action_90(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_148(p, j) } } fn action_91(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_216, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 45 => happy_goto(p, action_217, j), 64 => happy_goto(p, action_203, j), 134 => happy_goto(p, action_218, j), _ => happy_reduce_101(p, j) } } fn action_92(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 41 => happy_goto(p, action_212, j), 45 => happy_goto(p, action_213, j), 64 => happy_goto(p, action_214, j), 134 => happy_goto(p, action_215, j), _ => happy_reduce_127(p, j) } } fn action_93(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_211, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 208 => happy_shift(p, action_125, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_209, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 64 => happy_goto(p, action_203, j), 134 => happy_goto(p, action_210, j), _ => happy_reduce_102(p, j) } } fn action_94(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_208, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 41 => happy_goto(p, action_205, j), 64 => happy_goto(p, action_206, j), 134 => happy_goto(p, action_207, j), _ => happy_reduce_128(p, j) } } fn action_95(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 208 => happy_shift(p, action_125, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_199, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 64 => happy_goto(p, action_203, j), 134 => happy_goto(p, action_204, j), _ => happy_reduce_103(p, j) } } fn action_96(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 41 => happy_goto(p, action_196, j), 64 => happy_goto(p, action_197, j), 134 => happy_goto(p, action_198, j), _ => happy_reduce_129(p, j) } } fn action_97(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_159(p, j) } } fn action_98(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_185(p, j) } } fn action_99(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_195, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_100(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_186(p, j) } } fn action_101(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_193, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_185, j), 40 => happy_goto(p, action_186, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_190, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_191, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_192, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_102(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_26(p, j) } } fn action_103(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_261(p, j) } } fn action_104(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_263(p, j) } } fn action_105(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_183, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_180, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_262(p, j) } } fn action_106(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_179, j), _ => happy_reduce_90(p, j) } } fn action_107(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_276(p, j) } } fn action_108(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_277(p, j) } } fn action_109(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 64 => happy_goto(p, action_172, j), _ => happy_fail(p, j) } } fn action_110(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_163, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 75 => happy_goto(p, action_167, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_168, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_111(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_475(p, j) } } fn action_112(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_160, j), 80 => happy_goto(p, action_161, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_162, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_113(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_155, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 80 => happy_goto(p, action_157, j), 81 => happy_goto(p, action_108, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_158, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_114(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_154, j), _ => happy_fail(p, j) } } fn action_115(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_153, j), _ => happy_fail(p, j) } } fn action_116(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_120(p, j) } } fn action_117(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_139(p, j) } } fn action_118(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_131(p, j) } } fn action_119(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_140(p, j) } } fn action_120(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_136(p, j) } } fn action_121(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_151, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_122(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_118(p, j) } } fn action_123(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_135(p, j) } } fn action_124(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_142(p, j) } } fn action_125(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_123(p, j) } } fn action_126(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_133(p, j) } } fn action_127(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_141(p, j) } } fn action_128(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_134(p, j) } } fn action_129(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_124(p, j) } } fn action_130(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_121(p, j) } } fn action_131(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_132(p, j) } } fn action_132(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_137(p, j) } } fn action_133(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_119(p, j) } } fn action_134(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_150, j), _ => happy_fail(p, j) } } fn action_135(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_190(p, j) } } fn action_136(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_117(p, j) } } fn action_137(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_149, j), _ => happy_fail(p, j) } } fn action_138(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_122(p, j) } } fn action_139(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_191(p, j) } } fn action_140(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_138(p, j) } } fn action_141(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_130(p, j) } } fn action_142(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_273(p, j) } } fn action_143(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_171(p, j) } } fn action_144(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_148, j), _ => happy_fail(p, j) } } fn action_145(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 187 => happy_shift(p, action_115, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_145, j), 9 => happy_goto(p, action_147, j), 10 => happy_goto(p, action_78, j), 11 => happy_goto(p, action_79, j), 32 => happy_goto(p, action_80, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_83, j), 38 => happy_goto(p, action_84, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_89, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_101, j), 75 => happy_goto(p, action_102, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_106, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_110, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_146(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 249 => Ok(Cont::Accept(j)), _ => happy_fail(p, j) } } fn action_147(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_10(p, j) } } fn action_148(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_497, j), _ => happy_fail(p, j) } } fn action_149(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_495, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_496, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_150(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_494, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_151(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_493, j), 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_492, j), _ => happy_fail(p, j) } } fn action_152(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_153(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_491, j), _ => happy_fail(p, j) } } fn action_154(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_489, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_490, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_155(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 80 => happy_goto(p, action_487, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_488, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_156(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_264(p, j) } } fn action_157(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_278(p, j) } } fn action_158(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 75 => happy_goto(p, action_484, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_159(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_483, j), _ => happy_fail(p, j) } } fn action_160(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_183, j), 139 => happy_shift(p, action_482, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_180, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_161(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_481, j), _ => happy_fail(p, j) } } fn action_162(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 76 => happy_goto(p, action_477, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_478, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_163(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_476, j), _ => happy_fail(p, j) } } fn action_164(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_105(p, j) } } fn action_165(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_149(p, j) } } fn action_166(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_160(p, j) } } fn action_167(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_reduce_26(p, j), 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_475, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_168(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_474, j), _ => happy_reduce_90(p, j) } } fn action_169(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_476(p, j) } } fn action_170(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_473, j), _ => happy_fail(p, j) } } fn action_171(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_177(p, j) } } fn action_172(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_228(p, j) } } fn action_173(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_227(p, j) } } fn action_174(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_222(p, j) } } fn action_175(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_225(p, j) } } fn action_176(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_226(p, j) } } fn action_177(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_224(p, j) } } fn action_178(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_223(p, j) } } fn action_179(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_466, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_180(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_268(p, j) } } fn action_181(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_shift(p, action_184, j), 90 => happy_goto(p, action_465, j), _ => happy_reduce_312(p, j) } } fn action_182(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_314(p, j) } } fn action_183(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 238 => happy_shift(p, action_464, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 82 => happy_goto(p, action_459, j), 83 => happy_goto(p, action_460, j), 84 => happy_goto(p, action_461, j), 85 => happy_goto(p, action_462, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_463, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_283(p, j) } } fn action_184(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_451, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 186 => happy_reduce_473(p, j), 193 => happy_reduce_473(p, j), 205 => happy_shift(p, action_37, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 217 => happy_reduce_473(p, j), 221 => happy_shift(p, action_38, j), 222 => happy_shift(p, action_452, j), 232 => happy_reduce_473(p, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 65 => happy_goto(p, action_447, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_448, j), 125 => happy_goto(p, action_449, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_450, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_460(p, j) } } fn action_185(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_446, j), _ => happy_fail(p, j) } } fn action_186(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_106(p, j) } } fn action_187(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_150(p, j) } } fn action_188(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_161(p, j) } } fn action_189(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_229(p, j) } } fn action_190(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_reduce_26(p, j), 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_445, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_191(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_444, j), _ => happy_reduce_90(p, j) } } fn action_192(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_112, j), 150 => happy_shift(p, action_113, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_442, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_435, j), 40 => happy_goto(p, action_436, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 75 => happy_goto(p, action_440, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 79 => happy_goto(p, action_441, j), 80 => happy_goto(p, action_107, j), 81 => happy_goto(p, action_108, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_193(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_434, j), _ => happy_fail(p, j) } } fn action_194(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_174(p, j) } } fn action_195(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_433, j), 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_432, j), _ => happy_fail(p, j) } } fn action_196(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_165(p, j) } } fn action_197(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_183(p, j) } } fn action_198(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_184(p, j) } } fn action_199(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_169(p, j) } } fn action_200(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_110(p, j) } } fn action_201(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_112(p, j) } } fn action_202(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_113(p, j) } } fn action_203(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_111(p, j) } } fn action_204(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_170(p, j) } } fn action_205(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_156(p, j) } } fn action_206(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_163(p, j) } } fn action_207(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_164(p, j) } } fn action_208(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_86(p, j) } } fn action_209(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_157(p, j) } } fn action_210(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_158(p, j) } } fn action_211(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_85(p, j) } } fn action_212(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_144(p, j) } } fn action_213(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_153(p, j) } } fn action_214(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_152(p, j) } } fn action_215(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_154(p, j) } } fn action_216(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_145(p, j) } } fn action_217(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_146(p, j) } } fn action_218(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_147(p, j) } } fn action_219(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_431, j), _ => happy_fail(p, j) } } fn action_220(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_430, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_221(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_232(p, j) } } fn action_222(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_236(p, j) } } fn action_223(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_239(p, j) } } fn action_224(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_240(p, j) } } fn action_225(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_235(p, j) } } fn action_226(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_249(p, j) } } fn action_227(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_reduce_26(p, j), _ => happy_reduce_231(p, j) } } fn action_228(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_429, j), _ => happy_reduce_90(p, j) } } fn action_229(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_427, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_425, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_160, j), 80 => happy_goto(p, action_161, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_230(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_422, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_418, j), 69 => happy_goto(p, action_419, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_420, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 80 => happy_goto(p, action_157, j), 81 => happy_goto(p, action_108, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_421, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_231(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_416, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_237(p, j) } } fn action_232(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_415, j), _ => happy_fail(p, j) } } fn action_233(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_108(p, j) } } fn action_234(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_143(p, j) } } fn action_235(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_155(p, j) } } fn action_236(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_reduce_26(p, j), 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_414, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_237(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_413, j), _ => happy_reduce_90(p, j) } } fn action_238(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_109(p, j) } } fn action_239(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_412, j), _ => happy_fail(p, j) } } fn action_240(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_166(p, j) } } fn action_241(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_411, j), _ => happy_fail(p, j) } } fn action_242(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_408, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_243(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_407, j), _ => happy_reduce_90(p, j) } } fn action_244(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_406, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_245(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_87(p, j) } } fn action_246(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_405, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_247(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_88(p, j) } } fn action_248(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_12(p, j) } } fn action_249(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_404, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_250(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_403, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_251(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_459(p, j) } } fn action_252(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_402, j), _ => happy_fail(p, j) } } fn action_253(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_401, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_254(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_400, j), _ => happy_fail(p, j) } } fn action_255(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_399, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_256(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_471(p, j) } } fn action_257(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 185 => happy_reduce_40(p, j), 186 => happy_reduce_40(p, j), 188 => happy_reduce_40(p, j), 190 => happy_reduce_40(p, j), 192 => happy_reduce_40(p, j), 193 => happy_reduce_40(p, j), 195 => happy_reduce_40(p, j), 198 => happy_reduce_40(p, j), 200 => happy_reduce_40(p, j), 201 => happy_reduce_40(p, j), 202 => happy_reduce_40(p, j), 203 => happy_reduce_40(p, j), 205 => happy_shift(p, action_37, j), 208 => happy_reduce_40(p, j), 209 => happy_reduce_40(p, j), 210 => happy_reduce_40(p, j), 211 => happy_reduce_40(p, j), 213 => happy_reduce_40(p, j), 214 => happy_reduce_40(p, j), 215 => happy_reduce_40(p, j), 216 => happy_reduce_40(p, j), 217 => happy_reduce_40(p, j), 219 => happy_reduce_40(p, j), 220 => happy_reduce_40(p, j), 221 => happy_shift(p, action_38, j), 222 => happy_reduce_40(p, j), 223 => happy_reduce_40(p, j), 224 => happy_reduce_40(p, j), 226 => happy_reduce_40(p, j), 227 => happy_reduce_40(p, j), 228 => happy_reduce_40(p, j), 229 => happy_reduce_40(p, j), 230 => happy_reduce_40(p, j), 231 => happy_reduce_40(p, j), 232 => happy_reduce_40(p, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_reduce_40(p, j), 240 => happy_reduce_40(p, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 15 => happy_goto(p, action_397, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_398, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_258(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 233 => happy_shift(p, action_396, j), _ => happy_fail(p, j) } } fn action_259(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_395, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_260(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_67(p, j) } } fn action_261(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_408(p, j) } } fn action_262(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_462(p, j) } } fn action_263(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_393, j), 183 => happy_shift(p, action_394, j), _ => happy_fail(p, j) } } fn action_264(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_68(p, j) } } fn action_265(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_392, j), _ => happy_fail(p, j) } } fn action_266(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_75(p, j) } } fn action_267(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 212 => happy_shift(p, action_391, j), 17 => happy_goto(p, action_389, j), 21 => happy_goto(p, action_390, j), _ => happy_reduce_42(p, j) } } fn action_268(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_388, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_269(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_57(p, j) } } fn action_270(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_387, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_271(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_386, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_272(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_385, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_273(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_384, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_274(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_400(p, j) } } fn action_275(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 14 => happy_goto(p, action_288, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_383, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_295, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_276(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_399(p, j) } } fn action_277(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_393(p, j) } } fn action_278(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_382, j), _ => happy_reduce_467(p, j) } } fn action_279(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_468(p, j) } } fn action_280(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_395(p, j) } } fn action_281(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 14 => happy_goto(p, action_288, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_381, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_295, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_282(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_380, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_283(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_397(p, j) } } fn action_284(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 14 => happy_goto(p, action_288, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_379, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_295, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_285(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_401(p, j) } } fn action_286(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_392(p, j) } } fn action_287(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_391(p, j) } } fn action_288(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_378, j), _ => happy_fail(p, j) } } fn action_289(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 87 => happy_goto(p, action_377, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), _ => happy_reduce_305(p, j) } } fn action_290(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_213, j), 64 => happy_goto(p, action_214, j), 134 => happy_goto(p, action_215, j), _ => happy_reduce_127(p, j) } } fn action_291(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_206, j), 134 => happy_goto(p, action_207, j), _ => happy_reduce_128(p, j) } } fn action_292(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_197, j), 134 => happy_goto(p, action_198, j), _ => happy_reduce_129(p, j) } } fn action_293(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 186 => happy_shift(p, action_173, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_193, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 87 => happy_goto(p, action_369, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 133 => happy_goto(p, action_373, j), 134 => happy_goto(p, action_374, j), _ => happy_fail(p, j) } } fn action_294(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_368, j), _ => happy_fail(p, j) } } fn action_295(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_367, j), _ => happy_fail(p, j) } } fn action_296(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_170, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_297(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_365, j), 123 => happy_goto(p, action_366, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_298(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_364, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_299(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 167 => happy_shift(p, action_363, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_362, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_300(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_361, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_301(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_360, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_302(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_359, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_303(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_358, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_304(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_357, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_305(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_356, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_306(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_355, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_307(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_354, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_308(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_353, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_309(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_352, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_310(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_351, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_311(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_350, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_312(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_349, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_313(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_348, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_314(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_347, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_315(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_346, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_316(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_345, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_317(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_394(p, j) } } fn action_318(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_344, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_319(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_443(p, j) } } fn action_320(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_447(p, j) } } fn action_321(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_448(p, j) } } fn action_322(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_444(p, j) } } fn action_323(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_445(p, j) } } fn action_324(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_446(p, j) } } fn action_325(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_451(p, j) } } fn action_326(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_452(p, j) } } fn action_327(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_453(p, j) } } fn action_328(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_449(p, j) } } fn action_329(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_450(p, j) } } fn action_330(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 139 => happy_shift(p, action_343, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 105 => happy_goto(p, action_341, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_342, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_331(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_340, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_332(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_339, j), _ => happy_fail(p, j) } } fn action_333(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_338, j), _ => happy_fail(p, j) } } fn action_334(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_384(p, j) } } fn action_335(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_385(p, j) } } fn action_336(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_7(p, j) } } fn action_337(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_6(p, j) } } fn action_338(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_382(p, j) } } fn action_339(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_383(p, j) } } fn action_340(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_645, j), _ => happy_fail(p, j) } } fn action_341(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_643, j), 179 => happy_shift(p, action_644, j), _ => happy_fail(p, j) } } fn action_342(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_388(p, j) } } fn action_343(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_380(p, j) } } fn action_344(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_442(p, j) } } fn action_345(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_413(p, j) } } fn action_346(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_412(p, j) } } fn action_347(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_411(p, j) } } fn action_348(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 150 => happy_shift(p, action_314, j), 151 => happy_shift(p, action_315, j), 152 => happy_shift(p, action_316, j), _ => happy_reduce_416(p, j) } } fn action_349(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 150 => happy_shift(p, action_314, j), 151 => happy_shift(p, action_315, j), 152 => happy_shift(p, action_316, j), _ => happy_reduce_415(p, j) } } fn action_350(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 148 => happy_shift(p, action_312, j), 149 => happy_shift(p, action_313, j), _ => happy_reduce_419(p, j) } } fn action_351(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 148 => happy_shift(p, action_312, j), 149 => happy_shift(p, action_313, j), _ => happy_reduce_418(p, j) } } fn action_352(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 154 => happy_shift(p, action_310, j), 155 => happy_shift(p, action_311, j), _ => happy_reduce_424(p, j) } } fn action_353(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 154 => happy_shift(p, action_310, j), 155 => happy_shift(p, action_311, j), _ => happy_reduce_422(p, j) } } fn action_354(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 154 => happy_shift(p, action_310, j), 155 => happy_shift(p, action_311, j), _ => happy_reduce_423(p, j) } } fn action_355(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 154 => happy_shift(p, action_310, j), 155 => happy_shift(p, action_311, j), _ => happy_reduce_421(p, j) } } fn action_356(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 156 => happy_shift(p, action_306, j), 157 => happy_shift(p, action_307, j), 158 => happy_shift(p, action_308, j), 159 => happy_shift(p, action_309, j), _ => happy_reduce_427(p, j) } } fn action_357(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 156 => happy_shift(p, action_306, j), 157 => happy_shift(p, action_307, j), 158 => happy_shift(p, action_308, j), 159 => happy_shift(p, action_309, j), _ => happy_reduce_426(p, j) } } fn action_358(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 160 => happy_shift(p, action_304, j), 161 => happy_shift(p, action_305, j), _ => happy_reduce_429(p, j) } } fn action_359(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 153 => happy_shift(p, action_303, j), _ => happy_reduce_431(p, j) } } fn action_360(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 162 => happy_shift(p, action_302, j), _ => happy_reduce_433(p, j) } } fn action_361(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 163 => happy_shift(p, action_301, j), _ => happy_reduce_435(p, j) } } fn action_362(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_642, j), _ => happy_fail(p, j) } } fn action_363(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_641, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_364(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 164 => happy_shift(p, action_300, j), _ => happy_reduce_437(p, j) } } fn action_365(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_456(p, j) } } fn action_366(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_640, j), _ => happy_reduce_455(p, j) } } fn action_367(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_364(p, j) } } fn action_368(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_639, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_638, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_369(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_308(p, j) } } fn action_370(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_311(p, j) } } fn action_371(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_309(p, j) } } fn action_372(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_637, j), _ => happy_reduce_310(p, j) } } fn action_373(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_442, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_374(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_reduce_475(p, j), 190 => happy_reduce_475(p, j), 192 => happy_reduce_475(p, j), 193 => happy_reduce_475(p, j), 195 => happy_reduce_475(p, j), 198 => happy_reduce_475(p, j), 200 => happy_reduce_475(p, j), 202 => happy_reduce_475(p, j), 203 => happy_reduce_475(p, j), 209 => happy_reduce_475(p, j), 210 => happy_reduce_475(p, j), 211 => happy_reduce_475(p, j), 214 => happy_reduce_475(p, j), 215 => happy_reduce_475(p, j), 217 => happy_reduce_475(p, j), 219 => happy_reduce_475(p, j), 220 => happy_reduce_475(p, j), 224 => happy_reduce_475(p, j), 227 => happy_reduce_475(p, j), 229 => happy_reduce_475(p, j), 230 => happy_reduce_475(p, j), 231 => happy_reduce_475(p, j), 232 => happy_reduce_475(p, j), 239 => happy_reduce_475(p, j), 240 => happy_reduce_475(p, j), _ => happy_reduce_307(p, j) } } fn action_375(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 82 => happy_goto(p, action_459, j), 83 => happy_goto(p, action_460, j), 84 => happy_goto(p, action_461, j), 88 => happy_goto(p, action_633, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_634, j), 92 => happy_goto(p, action_635, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_636, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_283(p, j) } } fn action_376(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 186 => happy_reduce_473(p, j), 193 => happy_reduce_473(p, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 217 => happy_reduce_473(p, j), 232 => happy_reduce_473(p, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_630, j), 87 => happy_goto(p, action_631, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_632, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_327(p, j) } } fn action_377(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_306(p, j) } } fn action_378(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_366(p, j) } } fn action_379(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_629, j), _ => happy_fail(p, j) } } fn action_380(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_628, j), _ => happy_fail(p, j) } } fn action_381(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_627, j), _ => happy_fail(p, j) } } fn action_382(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_469(p, j) } } fn action_383(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_626, j), _ => happy_fail(p, j) } } fn action_384(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_625, j), _ => happy_fail(p, j) } } fn action_385(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_624, j), _ => happy_fail(p, j) } } fn action_386(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_623, j), _ => happy_fail(p, j) } } fn action_387(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_622, j), _ => happy_fail(p, j) } } fn action_388(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_621, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_389(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 187 => happy_shift(p, action_63, j), 188 => happy_shift(p, action_116, j), 189 => happy_shift(p, action_64, j), 190 => happy_shift(p, action_117, j), 191 => happy_shift(p, action_65, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 194 => happy_shift(p, action_66, j), 195 => happy_shift(p, action_119, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 218 => happy_shift(p, action_72, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 225 => happy_shift(p, action_73, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_619, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_620, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_609, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 16 => happy_goto(p, action_610, j), 18 => happy_goto(p, action_611, j), 19 => happy_goto(p, action_612, j), 20 => happy_goto(p, action_613, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 32 => happy_goto(p, action_614, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_615, j), 38 => happy_goto(p, action_616, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_617, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_618, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_41(p, j) } } fn action_390(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 212 => happy_shift(p, action_608, j), 17 => happy_goto(p, action_607, j), _ => happy_reduce_42(p, j) } } fn action_391(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_464, j), 85 => happy_goto(p, action_606, j), _ => happy_fail(p, j) } } fn action_392(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_605, j), _ => happy_fail(p, j) } } fn action_393(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_604, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_394(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_603, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_395(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_36(p, j) } } fn action_396(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_602, j), _ => happy_fail(p, j) } } fn action_397(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 32 => happy_goto(p, action_601, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_398(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_600, j), _ => happy_fail(p, j) } } fn action_399(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_599, j), _ => happy_fail(p, j) } } fn action_400(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_65(p, j) } } fn action_401(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_598, j), _ => happy_fail(p, j) } } fn action_402(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_69(p, j) } } fn action_403(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_597, j), _ => happy_fail(p, j) } } fn action_404(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_596, j), _ => happy_fail(p, j) } } fn action_405(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 238 => happy_shift(p, action_142, j), 75 => happy_goto(p, action_595, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_406(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 66 => happy_goto(p, action_594, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_527, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_407(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_593, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_408(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_592, j), _ => happy_reduce_345(p, j) } } fn action_409(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_591, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_410(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_590, j), _ => happy_fail(p, j) } } fn action_411(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_14(p, j) } } fn action_412(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_588, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_589, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_413(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_587, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_414(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_586, j), _ => happy_reduce_345(p, j) } } fn action_415(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_16(p, j) } } fn action_416(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_238(p, j) } } fn action_417(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 82 => happy_goto(p, action_459, j), 83 => happy_goto(p, action_460, j), 84 => happy_goto(p, action_461, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_463, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_283(p, j) } } fn action_418(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_585, j), 150 => happy_shift(p, action_230, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 69 => happy_goto(p, action_582, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_583, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_105, j), 80 => happy_goto(p, action_487, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_584, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_419(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_241(p, j) } } fn action_420(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_253(p, j) } } fn action_421(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 69 => happy_goto(p, action_581, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_484, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_422(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_427, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_580, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_160, j), 80 => happy_goto(p, action_161, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_423(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_579, j), _ => happy_fail(p, j) } } fn action_424(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_578, j), _ => happy_fail(p, j) } } fn action_425(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_577, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_426(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_574, j), 71 => happy_goto(p, action_224, j), 76 => happy_goto(p, action_477, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_478, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_427(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_427, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_573, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_160, j), 80 => happy_goto(p, action_161, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_428(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_259(p, j) } } fn action_429(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_572, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_430(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_571, j), _ => happy_reduce_345(p, j) } } fn action_431(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_15(p, j) } } fn action_432(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_570, j), _ => happy_reduce_189(p, j) } } fn action_433(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 55 => happy_goto(p, action_569, j), _ => happy_reduce_192(p, j) } } fn action_434(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_567, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_568, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_435(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_566, j), _ => happy_fail(p, j) } } fn action_436(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_107(p, j) } } fn action_437(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_151(p, j) } } fn action_438(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_162(p, j) } } fn action_439(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_230(p, j) } } fn action_440(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_reduce_26(p, j), 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_565, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_441(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 33 => happy_goto(p, action_564, j), _ => happy_reduce_90(p, j) } } fn action_442(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_563, j), _ => happy_fail(p, j) } } fn action_443(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_180(p, j) } } fn action_444(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_562, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_445(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_561, j), _ => happy_reduce_345(p, j) } } fn action_446(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_17(p, j) } } fn action_447(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_560, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 205 => happy_shift(p, action_37, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 221 => happy_shift(p, action_38, j), 222 => happy_reduce_473(p, j), 232 => happy_shift(p, action_178, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 64 => happy_goto(p, action_189, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_448, j), 125 => happy_goto(p, action_557, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_558, j), 133 => happy_goto(p, action_559, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_460(p, j) } } fn action_448(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_461(p, j) } } fn action_449(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_556, j), _ => happy_fail(p, j) } } fn action_450(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_555, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 186 => happy_reduce_474(p, j), 193 => happy_reduce_474(p, j), 205 => happy_shift(p, action_37, j), 214 => happy_reduce_474(p, j), 215 => happy_reduce_474(p, j), 217 => happy_reduce_474(p, j), 221 => happy_shift(p, action_38, j), 232 => happy_reduce_474(p, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_448, j), 125 => happy_goto(p, action_554, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_460(p, j) } } fn action_451(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_reduce_473(p, j), 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_553, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_403(p, j) } } fn action_452(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_551, j), 132 => happy_goto(p, action_552, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_453(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 69 => happy_goto(p, action_548, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_549, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_550, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), _ => happy_reduce_288(p, j) } } fn action_454(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_239, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_240, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_233, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 45 => happy_goto(p, action_234, j), 52 => happy_goto(p, action_235, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_203, j), 75 => happy_goto(p, action_546, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_547, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 134 => happy_goto(p, action_238, j), _ => happy_reduce_292(p, j) } } fn action_455(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 69 => happy_goto(p, action_541, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_542, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_543, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), _ => happy_reduce_295(p, j) } } fn action_456(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 208 => happy_shift(p, action_125, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_209, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 64 => happy_goto(p, action_203, j), 134 => happy_goto(p, action_210, j), _ => happy_reduce_102(p, j) } } fn action_457(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 193 => happy_shift(p, action_174, j), 201 => happy_shift(p, action_122, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 222 => happy_shift(p, action_133, j), 226 => happy_shift(p, action_136, j), 228 => happy_shift(p, action_138, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 41 => happy_goto(p, action_205, j), 64 => happy_goto(p, action_206, j), 134 => happy_goto(p, action_207, j), _ => happy_reduce_128(p, j) } } fn action_458(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_193, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_186, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_535, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_536, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 133 => happy_goto(p, action_537, j), 134 => happy_goto(p, action_538, j), _ => happy_reduce_299(p, j) } } fn action_459(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_534, j), _ => happy_fail(p, j) } } fn action_460(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_533, j), _ => happy_reduce_284(p, j) } } fn action_461(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_286(p, j) } } fn action_462(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_531, j), 179 => happy_shift(p, action_532, j), _ => happy_fail(p, j) } } fn action_463(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_464(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_303(p, j) } } fn action_465(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_315(p, j) } } fn action_466(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_19(p, j) } } fn action_467(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_91(p, j) } } fn action_468(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 66 => happy_goto(p, action_242, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_527, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_469(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_239, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_240, j), 240 => happy_shift(p, action_144, j), 39 => happy_goto(p, action_233, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 45 => happy_goto(p, action_234, j), 52 => happy_goto(p, action_235, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_203, j), 75 => happy_goto(p, action_530, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_238, j), _ => happy_fail(p, j) } } fn action_470(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 66 => happy_goto(p, action_220, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_527, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_471(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_193, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_186, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_525, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 133 => happy_goto(p, action_526, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_472(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 75 => happy_goto(p, action_524, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_473(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_522, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_523, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_474(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_521, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_475(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_519, j), _ => happy_reduce_345(p, j) } } fn action_476(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_13(p, j) } } fn action_477(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_518, j), _ => happy_fail(p, j) } } fn action_478(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_517, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_180, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_479(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_162, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_480(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_515, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_158, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_481(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_514, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_281(p, j) } } fn action_482(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_274(p, j) } } fn action_483(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_513, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_269(p, j) } } fn action_484(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_265(p, j) } } fn action_485(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_180, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_262(p, j) } } fn action_486(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_266(p, j) } } fn action_487(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_279(p, j) } } fn action_488(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 75 => happy_goto(p, action_512, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_489(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_511, j), _ => happy_fail(p, j) } } fn action_490(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_510, j), _ => happy_fail(p, j) } } fn action_491(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_509, j), _ => happy_fail(p, j) } } fn action_492(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_508, j), _ => happy_reduce_215(p, j) } } fn action_493(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 62 => happy_goto(p, action_505, j), 63 => happy_goto(p, action_506, j), 131 => happy_goto(p, action_507, j), _ => happy_fail(p, j) } } fn action_494(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_504, j), _ => happy_fail(p, j) } } fn action_495(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_503, j), _ => happy_fail(p, j) } } fn action_496(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_502, j), _ => happy_fail(p, j) } } fn action_497(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 193 => happy_shift(p, action_500, j), 238 => happy_shift(p, action_501, j), 135 => happy_goto(p, action_498, j), 136 => happy_goto(p, action_499, j), _ => happy_reduce_480(p, j) } } fn action_498(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_771, j), 179 => happy_shift(p, action_772, j), _ => happy_fail(p, j) } } fn action_499(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_478(p, j) } } fn action_500(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_482(p, j) } } fn action_501(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_770, j), _ => happy_reduce_481(p, j) } } fn action_502(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_172(p, j) } } fn action_503(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_173(p, j) } } fn action_504(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_769, j), _ => happy_fail(p, j) } } fn action_505(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_767, j), 182 => happy_shift(p, action_768, j), _ => happy_fail(p, j) } } fn action_506(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_216(p, j) } } fn action_507(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_766, j), 240 => happy_shift(p, action_144, j), 133 => happy_goto(p, action_765, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_218(p, j) } } fn action_508(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 62 => happy_goto(p, action_764, j), 63 => happy_goto(p, action_506, j), 131 => happy_goto(p, action_507, j), _ => happy_fail(p, j) } } fn action_509(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_763, j), _ => happy_fail(p, j) } } fn action_510(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_126(p, j) } } fn action_511(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_125(p, j) } } fn action_512(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_267(p, j) } } fn action_513(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_270(p, j) } } fn action_514(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_282(p, j) } } fn action_515(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 133 => happy_goto(p, action_488, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_516(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_482, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_180, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_517(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_275(p, j) } } fn action_518(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_762, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_271(p, j) } } fn action_519(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_95(p, j) } } fn action_520(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_761, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_521(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_20(p, j) } } fn action_522(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_760, j), _ => happy_fail(p, j) } } fn action_523(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_759, j), _ => happy_fail(p, j) } } fn action_524(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_475, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_525(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_445, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_526(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_442, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_436, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 75 => happy_goto(p, action_758, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_527(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_231(p, j) } } fn action_528(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_757, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_425, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_529(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_756, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_755, j), 69 => happy_goto(p, action_419, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_420, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_421, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_530(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_414, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_531(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_280(p, j) } } fn action_532(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_754, j), _ => happy_fail(p, j) } } fn action_533(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 183 => happy_shift(p, action_753, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 84 => happy_goto(p, action_752, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_463, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_534(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_313(p, j) } } fn action_535(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_751, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_536(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_301(p, j) } } fn action_537(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_442, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_436, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_538(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 185 => happy_reduce_475(p, j), 186 => happy_reduce_475(p, j), 188 => happy_reduce_475(p, j), 190 => happy_reduce_475(p, j), 192 => happy_reduce_475(p, j), 193 => happy_reduce_475(p, j), 195 => happy_reduce_475(p, j), 198 => happy_reduce_475(p, j), 200 => happy_reduce_475(p, j), 201 => happy_reduce_475(p, j), 202 => happy_reduce_475(p, j), 203 => happy_reduce_475(p, j), 208 => happy_reduce_475(p, j), 209 => happy_reduce_475(p, j), 210 => happy_reduce_475(p, j), 211 => happy_reduce_475(p, j), 213 => happy_reduce_475(p, j), 214 => happy_reduce_475(p, j), 215 => happy_reduce_475(p, j), 216 => happy_reduce_475(p, j), 217 => happy_reduce_475(p, j), 219 => happy_reduce_475(p, j), 220 => happy_reduce_475(p, j), 222 => happy_reduce_475(p, j), 224 => happy_reduce_475(p, j), 226 => happy_reduce_475(p, j), 227 => happy_reduce_475(p, j), 228 => happy_reduce_475(p, j), 229 => happy_reduce_475(p, j), 230 => happy_reduce_475(p, j), 231 => happy_reduce_475(p, j), 232 => happy_reduce_475(p, j), 239 => happy_reduce_475(p, j), 240 => happy_reduce_475(p, j), _ => happy_reduce_300(p, j) } } fn action_539(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 82 => happy_goto(p, action_459, j), 83 => happy_goto(p, action_460, j), 84 => happy_goto(p, action_461, j), 88 => happy_goto(p, action_633, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_634, j), 92 => happy_goto(p, action_635, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_750, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_283(p, j) } } fn action_540(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 186 => happy_reduce_473(p, j), 193 => happy_reduce_473(p, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 217 => happy_reduce_473(p, j), 232 => happy_reduce_473(p, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_748, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_631, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_749, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_327(p, j) } } fn action_541(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_747, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_542(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_746, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_543(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_296(p, j) } } fn action_544(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 37 => happy_goto(p, action_453, j), 38 => happy_goto(p, action_454, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_455, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_456, j), 49 => happy_goto(p, action_457, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_458, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 82 => happy_goto(p, action_459, j), 83 => happy_goto(p, action_460, j), 84 => happy_goto(p, action_461, j), 88 => happy_goto(p, action_633, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_634, j), 92 => happy_goto(p, action_635, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_745, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_283(p, j) } } fn action_545(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 186 => happy_reduce_473(p, j), 193 => happy_reduce_473(p, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 217 => happy_reduce_473(p, j), 232 => happy_reduce_473(p, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_743, j), 69 => happy_goto(p, action_419, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_631, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_744, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_327(p, j) } } fn action_546(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_742, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_547(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_293(p, j) } } fn action_548(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_741, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_549(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_740, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_550(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_289(p, j) } } fn action_551(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 132 => happy_goto(p, action_739, j), 133 => happy_goto(p, action_669, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_552(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 205 => happy_shift(p, action_37, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 221 => happy_shift(p, action_38, j), 232 => happy_shift(p, action_178, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 64 => happy_goto(p, action_172, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_738, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_553(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_737, j), _ => happy_fail(p, j) } } fn action_554(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_736, j), _ => happy_fail(p, j) } } fn action_555(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_reduce_473(p, j), 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_735, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_403(p, j) } } fn action_556(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_316(p, j) } } fn action_557(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_734, j), _ => happy_fail(p, j) } } fn action_558(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 222 => happy_shift(p, action_733, j), _ => happy_fail(p, j) } } fn action_559(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_732, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 205 => happy_shift(p, action_37, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 221 => happy_shift(p, action_38, j), 222 => happy_reduce_474(p, j), 232 => happy_shift(p, action_178, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 64 => happy_goto(p, action_439, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_448, j), 125 => happy_goto(p, action_731, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_460(p, j) } } fn action_560(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_reduce_473(p, j), 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_730, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_403(p, j) } } fn action_561(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_93(p, j) } } fn action_562(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_24(p, j) } } fn action_563(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_728, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_729, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_564(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 14 => happy_goto(p, action_727, j), 32 => happy_goto(p, action_467, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_468, j), 38 => happy_goto(p, action_469, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_470, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_471, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_565(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_726, j), _ => happy_reduce_345(p, j) } } fn action_566(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_18(p, j) } } fn action_567(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_725, j), _ => happy_fail(p, j) } } fn action_568(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_724, j), _ => happy_fail(p, j) } } fn action_569(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_721, j), 182 => happy_shift(p, action_722, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_723, j), 44 => happy_goto(p, action_715, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 56 => happy_goto(p, action_716, j), 57 => happy_goto(p, action_717, j), 58 => happy_goto(p, action_718, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_719, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_720, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_570(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 55 => happy_goto(p, action_714, j), _ => happy_reduce_192(p, j) } } fn action_571(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_99(p, j) } } fn action_572(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_22(p, j) } } fn action_573(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_713, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_577, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_574(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_712, j), _ => happy_fail(p, j) } } fn action_575(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_576(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 65 => happy_goto(p, action_711, j), 69 => happy_goto(p, action_419, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_156, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_421, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_577(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_710, j), _ => happy_fail(p, j) } } fn action_578(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_709, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_256(p, j) } } fn action_579(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_708, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_245(p, j) } } fn action_580(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_707, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_577, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_581(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_242(p, j) } } fn action_582(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_243(p, j) } } fn action_583(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_254(p, j) } } fn action_584(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_706, j), 150 => happy_shift(p, action_529, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 69 => happy_goto(p, action_704, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_705, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_512, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_585(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_427, j), 150 => happy_shift(p, action_230, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_703, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_160, j), 80 => happy_goto(p, action_161, j), 81 => happy_goto(p, action_108, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_586(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_92(p, j) } } fn action_587(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_23(p, j) } } fn action_588(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_702, j), _ => happy_fail(p, j) } } fn action_589(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_701, j), _ => happy_fail(p, j) } } fn action_590(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_700, j), _ => happy_fail(p, j) } } fn action_591(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_97(p, j) } } fn action_592(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_98(p, j) } } fn action_593(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_21(p, j) } } fn action_594(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_699, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_595(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_698, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_596(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_697, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_597(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_696, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_598(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_695, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_599(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_66(p, j) } } fn action_600(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_694, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_601(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_693, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_602(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_692, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_603(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_691, j), _ => happy_fail(p, j) } } fn action_604(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_35(p, j) } } fn action_605(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_689, j), 167 => happy_shift(p, action_690, j), _ => happy_fail(p, j) } } fn action_606(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_532, j), 180 => happy_shift(p, action_688, j), _ => happy_fail(p, j) } } fn action_607(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 185 => happy_shift(p, action_114, j), 186 => happy_reduce_473(p, j), 187 => happy_shift(p, action_63, j), 188 => happy_shift(p, action_116, j), 189 => happy_shift(p, action_64, j), 190 => happy_shift(p, action_117, j), 191 => happy_shift(p, action_65, j), 192 => happy_shift(p, action_118, j), 193 => happy_reduce_473(p, j), 194 => happy_shift(p, action_66, j), 195 => happy_shift(p, action_119, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_reduce_473(p, j), 215 => happy_reduce_473(p, j), 216 => happy_shift(p, action_130, j), 217 => happy_reduce_473(p, j), 218 => happy_shift(p, action_72, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 225 => happy_shift(p, action_73, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_reduce_473(p, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_619, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_620, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_609, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 16 => happy_goto(p, action_687, j), 18 => happy_goto(p, action_611, j), 19 => happy_goto(p, action_612, j), 20 => happy_goto(p, action_613, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 32 => happy_goto(p, action_614, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_615, j), 38 => happy_goto(p, action_616, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_617, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_618, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_41(p, j) } } fn action_608(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_464, j), 85 => happy_goto(p, action_686, j), _ => happy_fail(p, j) } } fn action_609(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_44(p, j) } } fn action_610(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 182 => happy_shift(p, action_685, j), _ => happy_fail(p, j) } } fn action_611(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_43(p, j) } } fn action_612(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_45(p, j) } } fn action_613(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_47(p, j) } } fn action_614(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_46(p, j) } } fn action_615(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 11 => happy_goto(p, action_684, j), 66 => happy_goto(p, action_242, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_227, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_616(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_239, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_240, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_683, j), 39 => happy_goto(p, action_233, j), 41 => happy_goto(p, action_200, j), 42 => happy_goto(p, action_201, j), 43 => happy_goto(p, action_202, j), 45 => happy_goto(p, action_234, j), 52 => happy_goto(p, action_235, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_203, j), 75 => happy_goto(p, action_236, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_238, j), _ => happy_fail(p, j) } } fn action_617(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 11 => happy_goto(p, action_682, j), 66 => happy_goto(p, action_220, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_227, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_618(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_193, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_680, j), 40 => happy_goto(p, action_186, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_190, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 133 => happy_goto(p, action_681, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_619(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_reduce_472(p, j), _ => happy_reduce_171(p, j) } } fn action_620(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 205 => happy_shift(p, action_37, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 221 => happy_shift(p, action_38, j), 222 => happy_shift(p, action_133, j), 223 => happy_shift(p, action_134, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_137, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_620, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 19 => happy_goto(p, action_679, j), 20 => happy_goto(p, action_613, j), 32 => happy_goto(p, action_614, j), 34 => happy_goto(p, action_81, j), 36 => happy_goto(p, action_82, j), 37 => happy_goto(p, action_615, j), 38 => happy_goto(p, action_616, j), 40 => happy_goto(p, action_85, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 44 => happy_goto(p, action_617, j), 45 => happy_goto(p, action_90, j), 46 => happy_goto(p, action_91, j), 47 => happy_goto(p, action_92, j), 48 => happy_goto(p, action_93, j), 49 => happy_goto(p, action_94, j), 50 => happy_goto(p, action_95, j), 51 => happy_goto(p, action_96, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_618, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_277, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_472, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_621(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_34(p, j) } } fn action_622(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_678, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_623(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_677, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_624(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 103 => happy_goto(p, action_675, j), 131 => happy_goto(p, action_676, j), _ => happy_fail(p, j) } } fn action_625(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_674, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_626(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_639, j), _ => happy_fail(p, j) } } fn action_627(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_639, j), _ => happy_reduce_396(p, j) } } fn action_628(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 196 => happy_shift(p, action_673, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_670, j), 101 => happy_goto(p, action_671, j), 102 => happy_goto(p, action_672, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_629(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_639, j), _ => happy_reduce_398(p, j) } } fn action_630(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 87 => happy_goto(p, action_667, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_668, j), 133 => happy_goto(p, action_669, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_631(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_329(p, j) } } fn action_632(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 186 => happy_reduce_474(p, j), 193 => happy_reduce_474(p, j), 214 => happy_reduce_474(p, j), 215 => happy_reduce_474(p, j), 217 => happy_reduce_474(p, j), 232 => happy_reduce_474(p, j), 240 => happy_shift(p, action_144, j), 87 => happy_goto(p, action_666, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_331(p, j) } } fn action_633(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_665, j), _ => happy_fail(p, j) } } fn action_634(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_664, j), _ => happy_fail(p, j) } } fn action_635(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_663, j), 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_637, j), _ => happy_fail(p, j) } } fn action_636(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_375, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_376, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 88 => happy_goto(p, action_660, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_661, j), 92 => happy_goto(p, action_662, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_637(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_341(p, j) } } fn action_638(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_409(p, j) } } fn action_639(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 140 => happy_shift(p, action_657, j), 143 => happy_shift(p, action_658, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_649, j), 95 => happy_goto(p, action_650, j), 96 => happy_goto(p, action_651, j), 97 => happy_goto(p, action_652, j), 98 => happy_goto(p, action_653, j), 99 => happy_goto(p, action_654, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_656, j), _ => happy_reduce_347(p, j) } } fn action_640(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_648, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_641(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_440(p, j) } } fn action_642(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_647, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_643(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_381(p, j) } } fn action_644(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_646, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_645(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_379(p, j) } } fn action_646(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_389(p, j) } } fn action_647(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_439(p, j) } } fn action_648(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_457(p, j) } } fn action_649(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_348(p, j) } } fn action_650(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_859, j), 182 => happy_shift(p, action_860, j), _ => happy_fail(p, j) } } fn action_651(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_858, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_652(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_shift(p, action_657, j), 143 => happy_shift(p, action_658, j), 168 => happy_shift(p, action_857, j), 98 => happy_goto(p, action_855, j), 99 => happy_goto(p, action_856, j), _ => happy_fail(p, j) } } fn action_653(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_355(p, j) } } fn action_654(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_reduce_359(p, j), 143 => happy_reduce_359(p, j), 168 => happy_reduce_359(p, j), _ => happy_reduce_354(p, j) } } fn action_655(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_342(p, j) } } fn action_656(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_854, j), _ => happy_fail(p, j) } } fn action_657(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_853, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_658(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_852, j), _ => happy_fail(p, j) } } fn action_659(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 140 => happy_shift(p, action_657, j), 143 => happy_shift(p, action_658, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_649, j), 95 => happy_goto(p, action_851, j), 96 => happy_goto(p, action_651, j), 97 => happy_goto(p, action_652, j), 98 => happy_goto(p, action_653, j), 99 => happy_goto(p, action_654, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_656, j), _ => happy_reduce_347(p, j) } } fn action_660(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_850, j), _ => happy_fail(p, j) } } fn action_661(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_849, j), _ => happy_fail(p, j) } } fn action_662(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_848, j), 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_637, j), _ => happy_fail(p, j) } } fn action_663(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_334(p, j) } } fn action_664(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_847, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_333(p, j) } } fn action_665(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_335(p, j) } } fn action_666(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_332(p, j) } } fn action_667(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_330(p, j) } } fn action_668(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_328(p, j) } } fn action_669(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_670(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_846, j), _ => happy_fail(p, j) } } fn action_671(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_844, j), 179 => happy_shift(p, action_845, j), _ => happy_fail(p, j) } } fn action_672(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_372(p, j) } } fn action_673(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_843, j), _ => happy_fail(p, j) } } fn action_674(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_842, j), _ => happy_fail(p, j) } } fn action_675(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_839, j), 140 => happy_shift(p, action_840, j), 143 => happy_shift(p, action_841, j), _ => happy_fail(p, j) } } fn action_676(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_375(p, j) } } fn action_677(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_838, j), _ => happy_fail(p, j) } } fn action_678(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_837, j), _ => happy_fail(p, j) } } fn action_679(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_48(p, j) } } fn action_680(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_836, j), _ => happy_fail(p, j) } } fn action_681(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 185 => happy_shift(p, action_114, j), 186 => happy_shift(p, action_173, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 216 => happy_shift(p, action_130, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_442, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 11 => happy_goto(p, action_835, j), 40 => happy_goto(p, action_436, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 75 => happy_goto(p, action_440, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_682(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_834, j), _ => happy_fail(p, j) } } fn action_683(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_833, j), _ => happy_fail(p, j) } } fn action_684(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_832, j), _ => happy_fail(p, j) } } fn action_685(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_38(p, j) } } fn action_686(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_532, j), 180 => happy_shift(p, action_831, j), _ => happy_fail(p, j) } } fn action_687(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 182 => happy_shift(p, action_830, j), _ => happy_fail(p, j) } } fn action_688(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_54(p, j) } } fn action_689(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_829, j), _ => happy_fail(p, j) } } fn action_690(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_shift(p, action_828, j), 237 => happy_shift(p, action_42, j), 28 => happy_goto(p, action_824, j), 29 => happy_goto(p, action_825, j), 30 => happy_goto(p, action_826, j), 128 => happy_goto(p, action_827, j), _ => happy_reduce_76(p, j) } } fn action_691(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_823, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_692(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_822, j), _ => happy_fail(p, j) } } fn action_693(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_821, j), _ => happy_fail(p, j) } } fn action_694(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_820, j), _ => happy_fail(p, j) } } fn action_695(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 199 => happy_shift(p, action_819, j), _ => happy_reduce_58(p, j) } } fn action_696(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_60(p, j) } } fn action_697(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_61(p, j) } } fn action_698(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_818, j), _ => happy_reduce_345(p, j) } } fn action_699(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_520, j), 94 => happy_goto(p, action_817, j), _ => happy_reduce_345(p, j) } } fn action_700(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_816, j), _ => happy_fail(p, j) } } fn action_701(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_167(p, j) } } fn action_702(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_168(p, j) } } fn action_703(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_815, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_577, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_704(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_244(p, j) } } fn action_705(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_255(p, j) } } fn action_706(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_757, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_814, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_707(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_250(p, j) } } fn action_708(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_246(p, j) } } fn action_709(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_258(p, j) } } fn action_710(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_257(p, j) } } fn action_711(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 69 => happy_goto(p, action_582, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 133 => happy_goto(p, action_813, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_712(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_812, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_247(p, j) } } fn action_713(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_260(p, j) } } fn action_714(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_721, j), 182 => happy_shift(p, action_811, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_723, j), 44 => happy_goto(p, action_715, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 56 => happy_goto(p, action_716, j), 57 => happy_goto(p, action_717, j), 58 => happy_goto(p, action_718, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_719, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_720, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_715(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 167 => happy_shift(p, action_810, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 59 => happy_goto(p, action_808, j), 66 => happy_goto(p, action_809, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_527, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_reduce_203(p, j) } } fn action_716(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_194(p, j) } } fn action_717(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_806, j), 180 => happy_shift(p, action_807, j), _ => happy_fail(p, j) } } fn action_718(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_804, j), 180 => happy_shift(p, action_805, j), _ => happy_fail(p, j) } } fn action_719(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_193, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 239 => happy_shift(p, action_194, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_187, j), 52 => happy_goto(p, action_188, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_189, j), 132 => happy_goto(p, action_802, j), 133 => happy_goto(p, action_803, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_720(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 167 => happy_shift(p, action_801, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_170, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 60 => happy_goto(p, action_799, j), 61 => happy_goto(p, action_100, j), 75 => happy_goto(p, action_800, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_721(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_193(p, j) } } fn action_722(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_188(p, j) } } fn action_723(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 241 => happy_shift(p, action_723, j), 44 => happy_goto(p, action_715, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 56 => happy_goto(p, action_798, j), 57 => happy_goto(p, action_717, j), 58 => happy_goto(p, action_718, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_719, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_720, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_724(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_175(p, j) } } fn action_725(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_176(p, j) } } fn action_726(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_94(p, j) } } fn action_727(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_25(p, j) } } fn action_728(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_797, j), _ => happy_fail(p, j) } } fn action_729(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_796, j), _ => happy_fail(p, j) } } fn action_730(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_795, j), _ => happy_fail(p, j) } } fn action_731(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_794, j), _ => happy_fail(p, j) } } fn action_732(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_reduce_473(p, j), 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_793, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_403(p, j) } } fn action_733(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_792, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_734(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_318(p, j) } } fn action_735(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_791, j), _ => happy_fail(p, j) } } fn action_736(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_317(p, j) } } fn action_737(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_323(p, j) } } fn action_738(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_790, j), _ => happy_fail(p, j) } } fn action_739(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_789, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_740(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_290(p, j) } } fn action_741(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_291(p, j) } } fn action_742(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_294(p, j) } } fn action_743(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 69 => happy_goto(p, action_582, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_667, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_668, j), 133 => happy_goto(p, action_788, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_744(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 186 => happy_reduce_474(p, j), 193 => happy_reduce_474(p, j), 214 => happy_reduce_474(p, j), 215 => happy_reduce_474(p, j), 217 => happy_reduce_474(p, j), 232 => happy_reduce_474(p, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 69 => happy_goto(p, action_581, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_484, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_666, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_331(p, j) } } fn action_745(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_544, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_545, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 70 => happy_goto(p, action_574, j), 71 => happy_goto(p, action_224, j), 76 => happy_goto(p, action_477, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_478, j), 88 => happy_goto(p, action_660, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_661, j), 92 => happy_goto(p, action_662, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_746(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_297(p, j) } } fn action_747(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_298(p, j) } } fn action_748(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_667, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 132 => happy_goto(p, action_668, j), 133 => happy_goto(p, action_787, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_749(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 186 => happy_reduce_474(p, j), 193 => happy_reduce_474(p, j), 214 => happy_reduce_474(p, j), 215 => happy_reduce_474(p, j), 217 => happy_reduce_474(p, j), 232 => happy_reduce_474(p, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 75 => happy_goto(p, action_484, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 87 => happy_goto(p, action_666, j), 88 => happy_goto(p, action_370, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_371, j), 92 => happy_goto(p, action_372, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_331(p, j) } } fn action_750(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_539, j), 140 => happy_shift(p, action_184, j), 150 => happy_shift(p, action_540, j), 185 => happy_shift(p, action_114, j), 188 => happy_shift(p, action_116, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 201 => happy_shift(p, action_122, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 208 => happy_shift(p, action_125, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 213 => happy_shift(p, action_129, j), 216 => happy_shift(p, action_130, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 222 => happy_shift(p, action_133, j), 224 => happy_shift(p, action_135, j), 226 => happy_shift(p, action_136, j), 227 => happy_shift(p, action_170, j), 228 => happy_shift(p, action_138, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_171, j), 240 => happy_shift(p, action_144, j), 40 => happy_goto(p, action_164, j), 41 => happy_goto(p, action_86, j), 42 => happy_goto(p, action_87, j), 43 => happy_goto(p, action_88, j), 45 => happy_goto(p, action_165, j), 52 => happy_goto(p, action_166, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 76 => happy_goto(p, action_477, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_478, j), 88 => happy_goto(p, action_660, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), 91 => happy_goto(p, action_661, j), 92 => happy_goto(p, action_662, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_751(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_302(p, j) } } fn action_752(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_287(p, j) } } fn action_753(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_285(p, j) } } fn action_754(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_304(p, j) } } fn action_755(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_786, j), 150 => happy_shift(p, action_529, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_189, j), 69 => happy_goto(p, action_582, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_583, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_486, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 133 => happy_goto(p, action_584, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_756(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_757, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_580, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_757(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_757, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_573, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_758(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 187 => happy_shift(p, action_410, j), 35 => happy_goto(p, action_565, j), 67 => happy_goto(p, action_409, j), _ => happy_reduce_233(p, j) } } fn action_759(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_178(p, j) } } fn action_760(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_179(p, j) } } fn action_761(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_346(p, j) } } fn action_762(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_272(p, j) } } fn action_763(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_11(p, j) } } fn action_764(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_784, j), 182 => happy_shift(p, action_785, j), _ => happy_fail(p, j) } } fn action_765(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_783, j), 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_219(p, j) } } fn action_766(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_782, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_767(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 182 => happy_shift(p, action_781, j), 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 63 => happy_goto(p, action_780, j), 131 => happy_goto(p, action_507, j), _ => happy_fail(p, j) } } fn action_768(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_211(p, j) } } fn action_769(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_779, j), _ => happy_fail(p, j) } } fn action_770(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 139 => happy_shift(p, action_778, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_775, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_776, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 137 => happy_goto(p, action_777, j), _ => happy_fail(p, j) } } fn action_771(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_774, j), _ => happy_fail(p, j) } } fn action_772(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 193 => happy_shift(p, action_500, j), 238 => happy_shift(p, action_501, j), 136 => happy_goto(p, action_773, j), _ => happy_reduce_480(p, j) } } fn action_773(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_479(p, j) } } fn action_774(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_477(p, j) } } fn action_775(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_319, j), 169 => happy_shift(p, action_320, j), 170 => happy_shift(p, action_321, j), 171 => happy_shift(p, action_322, j), 172 => happy_shift(p, action_323, j), 173 => happy_shift(p, action_324, j), 174 => happy_shift(p, action_325, j), 175 => happy_shift(p, action_326, j), 176 => happy_shift(p, action_327, j), 177 => happy_shift(p, action_328, j), 178 => happy_shift(p, action_329, j), 121 => happy_goto(p, action_903, j), _ => happy_reduce_408(p, j) } } fn action_776(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_485(p, j) } } fn action_777(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_901, j), 179 => happy_shift(p, action_902, j), _ => happy_fail(p, j) } } fn action_778(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_484(p, j) } } fn action_779(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_900, j), _ => happy_fail(p, j) } } fn action_780(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_217(p, j) } } fn action_781(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_212(p, j) } } fn action_782(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_221(p, j) } } fn action_783(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_899, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_784(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 182 => happy_shift(p, action_898, j), 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 63 => happy_goto(p, action_780, j), 131 => happy_goto(p, action_507, j), _ => happy_fail(p, j) } } fn action_785(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_213(p, j) } } fn action_786(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_757, j), 150 => happy_shift(p, action_529, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_428, j), 240 => happy_shift(p, action_144, j), 70 => happy_goto(p, action_423, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_424, j), 73 => happy_goto(p, action_226, j), 74 => happy_goto(p, action_703, j), 76 => happy_goto(p, action_159, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_516, j), 133 => happy_goto(p, action_426, j), 134 => happy_goto(p, action_111, j), _ => happy_fail(p, j) } } fn action_787(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 75 => happy_goto(p, action_512, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_788(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 69 => happy_goto(p, action_704, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_512, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_789(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_897, j), _ => happy_fail(p, j) } } fn action_790(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_320(p, j) } } fn action_791(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_324(p, j) } } fn action_792(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_896, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_793(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_895, j), _ => happy_fail(p, j) } } fn action_794(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_319(p, j) } } fn action_795(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_325(p, j) } } fn action_796(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_181(p, j) } } fn action_797(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_182(p, j) } } fn action_798(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_197(p, j) } } fn action_799(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_894, j), _ => happy_reduce_199(p, j) } } fn action_800(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_893, j), _ => happy_reduce_207(p, j) } } fn action_801(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_892, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_802(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 167 => happy_shift(p, action_801, j), 238 => happy_shift(p, action_142, j), 60 => happy_goto(p, action_891, j), 75 => happy_goto(p, action_800, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_803(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 186 => happy_shift(p, action_173, j), 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 193 => happy_shift(p, action_174, j), 195 => happy_shift(p, action_119, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_442, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 232 => happy_shift(p, action_178, j), 239 => happy_shift(p, action_443, j), 240 => happy_shift(p, action_144, j), 45 => happy_goto(p, action_437, j), 52 => happy_goto(p, action_438, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 64 => happy_goto(p, action_439, j), 134 => happy_goto(p, action_169, j), _ => happy_reduce_474(p, j) } } fn action_804(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_890, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_805(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_195(p, j) } } fn action_806(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_889, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_807(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_196(p, j) } } fn action_808(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_888, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_809(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 167 => happy_shift(p, action_887, j), _ => happy_reduce_204(p, j) } } fn action_810(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_886, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_811(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_187(p, j) } } fn action_812(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_248(p, j) } } fn action_813(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_575, j), 150 => happy_shift(p, action_576, j), 186 => happy_shift(p, action_173, j), 193 => happy_shift(p, action_174, j), 214 => happy_shift(p, action_175, j), 215 => happy_shift(p, action_176, j), 217 => happy_shift(p, action_177, j), 232 => happy_shift(p, action_178, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 240 => happy_shift(p, action_144, j), 64 => happy_goto(p, action_439, j), 69 => happy_goto(p, action_704, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 75 => happy_goto(p, action_512, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), 134 => happy_goto(p, action_169, j), _ => happy_fail(p, j) } } fn action_814(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 139 => happy_shift(p, action_885, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_577, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_fail(p, j) } } fn action_815(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_251(p, j) } } fn action_816(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_234(p, j) } } fn action_817(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_100(p, j) } } fn action_818(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_96(p, j) } } fn action_819(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_884, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_820(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_883, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_821(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_251, j), 124 => happy_goto(p, action_882, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_reduce_458(p, j) } } fn action_822(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_881, j), _ => happy_fail(p, j) } } fn action_823(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_37(p, j) } } fn action_824(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_879, j), 167 => happy_shift(p, action_880, j), _ => happy_fail(p, j) } } fn action_825(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_878, j), _ => happy_reduce_77(p, j) } } fn action_826(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_78(p, j) } } fn action_827(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_877, j), _ => happy_fail(p, j) } } fn action_828(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_875, j), 239 => happy_shift(p, action_876, j), _ => happy_fail(p, j) } } fn action_829(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_70(p, j) } } fn action_830(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_39(p, j) } } fn action_831(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_55(p, j) } } fn action_832(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_49(p, j) } } fn action_833(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_51(p, j) } } fn action_834(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_50(p, j) } } fn action_835(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 181 => happy_shift(p, action_62, j), 14 => happy_goto(p, action_874, j), _ => happy_fail(p, j) } } fn action_836(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_52(p, j) } } fn action_837(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_370(p, j) } } fn action_838(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_369(p, j) } } fn action_839(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_368(p, j) } } fn action_840(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_873, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_841(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 238 => happy_shift(p, action_256, j), 239 => happy_shift(p, action_76, j), 131 => happy_goto(p, action_872, j), _ => happy_fail(p, j) } } fn action_842(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_367(p, j) } } fn action_843(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_871, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_844(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_365(p, j) } } fn action_845(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 190 => happy_shift(p, action_117, j), 192 => happy_shift(p, action_118, j), 195 => happy_shift(p, action_119, j), 196 => happy_shift(p, action_673, j), 198 => happy_shift(p, action_120, j), 200 => happy_shift(p, action_121, j), 202 => happy_shift(p, action_123, j), 203 => happy_shift(p, action_124, j), 209 => happy_shift(p, action_126, j), 210 => happy_shift(p, action_127, j), 211 => happy_shift(p, action_128, j), 219 => happy_shift(p, action_131, j), 220 => happy_shift(p, action_132, j), 224 => happy_shift(p, action_135, j), 227 => happy_shift(p, action_137, j), 229 => happy_shift(p, action_139, j), 230 => happy_shift(p, action_140, j), 231 => happy_shift(p, action_141, j), 239 => happy_shift(p, action_143, j), 240 => happy_shift(p, action_144, j), 44 => happy_goto(p, action_289, j), 45 => happy_goto(p, action_90, j), 47 => happy_goto(p, action_290, j), 49 => happy_goto(p, action_291, j), 51 => happy_goto(p, action_292, j), 52 => happy_goto(p, action_97, j), 53 => happy_goto(p, action_98, j), 54 => happy_goto(p, action_99, j), 61 => happy_goto(p, action_100, j), 65 => happy_goto(p, action_293, j), 86 => happy_goto(p, action_670, j), 102 => happy_goto(p, action_870, j), 132 => happy_goto(p, action_109, j), 133 => happy_goto(p, action_296, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_846(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_869, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_847(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_336(p, j) } } fn action_848(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_338(p, j) } } fn action_849(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_417, j), 140 => happy_shift(p, action_184, j), 88 => happy_goto(p, action_868, j), 89 => happy_goto(p, action_181, j), 90 => happy_goto(p, action_182, j), _ => happy_reduce_337(p, j) } } fn action_850(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_339(p, j) } } fn action_851(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 179 => happy_shift(p, action_866, j), 182 => happy_shift(p, action_867, j), _ => happy_fail(p, j) } } fn action_852(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_358(p, j) } } fn action_853(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_864, j), 183 => happy_shift(p, action_865, j), _ => happy_fail(p, j) } } fn action_854(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_353(p, j) } } fn action_855(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_356(p, j) } } fn action_856(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_359(p, j) } } fn action_857(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_352(p, j) } } fn action_858(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_349(p, j) } } fn action_859(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 140 => happy_shift(p, action_657, j), 143 => happy_shift(p, action_658, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 182 => happy_shift(p, action_863, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_861, j), 96 => happy_goto(p, action_862, j), 97 => happy_goto(p, action_652, j), 98 => happy_goto(p, action_653, j), 99 => happy_goto(p, action_654, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_656, j), _ => happy_fail(p, j) } } fn action_860(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_386(p, j) } } fn action_861(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_350(p, j) } } fn action_862(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_925, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_863(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_387(p, j) } } fn action_864(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_357(p, j) } } fn action_865(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_924, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_866(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 140 => happy_shift(p, action_657, j), 143 => happy_shift(p, action_658, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 181 => happy_shift(p, action_659, j), 182 => happy_shift(p, action_923, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 93 => happy_goto(p, action_861, j), 96 => happy_goto(p, action_862, j), 97 => happy_goto(p, action_652, j), 98 => happy_goto(p, action_653, j), 99 => happy_goto(p, action_654, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_655, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_656, j), _ => happy_fail(p, j) } } fn action_867(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_343(p, j) } } fn action_868(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_340(p, j) } } fn action_869(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_373(p, j) } } fn action_870(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_371(p, j) } } fn action_871(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_374(p, j) } } fn action_872(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_376(p, j) } } fn action_873(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_922, j), _ => happy_fail(p, j) } } fn action_874(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_53(p, j) } } fn action_875(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_921, j), _ => happy_fail(p, j) } } fn action_876(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_920, j), _ => happy_fail(p, j) } } fn action_877(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_919, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_878(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_shift(p, action_828, j), 237 => happy_shift(p, action_42, j), 30 => happy_goto(p, action_918, j), 128 => happy_goto(p, action_827, j), _ => happy_fail(p, j) } } fn action_879(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_917, j), _ => happy_fail(p, j) } } fn action_880(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 140 => happy_shift(p, action_828, j), 237 => happy_shift(p, action_42, j), 28 => happy_goto(p, action_916, j), 29 => happy_goto(p, action_825, j), 30 => happy_goto(p, action_826, j), 128 => happy_goto(p, action_827, j), _ => happy_reduce_76(p, j) } } fn action_881(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_62(p, j) } } fn action_882(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_915, j), _ => happy_fail(p, j) } } fn action_883(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_914, j), _ => happy_fail(p, j) } } fn action_884(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_59(p, j) } } fn action_885(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_252(p, j) } } fn action_886(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_205(p, j) } } fn action_887(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_913, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_888(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_201(p, j) } } fn action_889(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_479, j), 150 => happy_shift(p, action_480, j), 167 => happy_shift(p, action_801, j), 238 => happy_shift(p, action_142, j), 60 => happy_goto(p, action_912, j), 75 => happy_goto(p, action_800, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_890(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_528, j), 150 => happy_shift(p, action_529, j), 167 => happy_shift(p, action_810, j), 238 => happy_shift(p, action_142, j), 239 => happy_shift(p, action_231, j), 59 => happy_goto(p, action_911, j), 66 => happy_goto(p, action_809, j), 68 => happy_goto(p, action_221, j), 69 => happy_goto(p, action_222, j), 70 => happy_goto(p, action_223, j), 71 => happy_goto(p, action_224, j), 72 => happy_goto(p, action_225, j), 73 => happy_goto(p, action_226, j), 75 => happy_goto(p, action_527, j), 76 => happy_goto(p, action_103, j), 77 => happy_goto(p, action_104, j), 78 => happy_goto(p, action_485, j), _ => happy_fail(p, j) } } fn action_891(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_894, j), _ => happy_reduce_198(p, j) } } fn action_892(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_208(p, j) } } fn action_893(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_261, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_910, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_894(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_210(p, j) } } fn action_895(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_326(p, j) } } fn action_896(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_909, j), _ => happy_fail(p, j) } } fn action_897(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_321(p, j) } } fn action_898(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_214(p, j) } } fn action_899(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_220(p, j) } } fn action_900(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_89(p, j) } } fn action_901(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_483(p, j) } } fn action_902(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_907, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_262, j), 126 => happy_goto(p, action_908, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_903(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 248 => happy_shift(p, action_906, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_904, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 130 => happy_goto(p, action_905, j), _ => happy_fail(p, j) } } fn action_904(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_487(p, j) } } fn action_905(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_486(p, j) } } fn action_906(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_470(p, j) } } fn action_907(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 168 => happy_shift(p, action_319, j), 169 => happy_shift(p, action_320, j), 170 => happy_shift(p, action_321, j), 171 => happy_shift(p, action_322, j), 172 => happy_shift(p, action_323, j), 173 => happy_shift(p, action_324, j), 174 => happy_shift(p, action_325, j), 175 => happy_shift(p, action_326, j), 176 => happy_shift(p, action_327, j), 177 => happy_shift(p, action_328, j), 178 => happy_shift(p, action_329, j), 121 => happy_goto(p, action_935, j), _ => happy_reduce_408(p, j) } } fn action_908(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_488(p, j) } } fn action_909(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_322(p, j) } } fn action_910(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_209(p, j) } } fn action_911(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 132 => happy_goto(p, action_934, j), 133 => happy_goto(p, action_152, j), 134 => happy_goto(p, action_111, j), _ => happy_reduce_473(p, j) } } fn action_912(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 240 => happy_shift(p, action_144, j), 134 => happy_goto(p, action_894, j), _ => happy_reduce_200(p, j) } } fn action_913(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_206(p, j) } } fn action_914(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_933, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_915(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 180 => happy_shift(p, action_61, j), 181 => happy_shift(p, action_62, j), 184 => happy_shift(p, action_36, j), 187 => happy_shift(p, action_63, j), 189 => happy_shift(p, action_64, j), 191 => happy_shift(p, action_65, j), 194 => happy_shift(p, action_66, j), 196 => happy_shift(p, action_67, j), 197 => happy_shift(p, action_68, j), 204 => happy_shift(p, action_69, j), 205 => happy_shift(p, action_37, j), 206 => happy_shift(p, action_70, j), 207 => happy_shift(p, action_71, j), 218 => happy_shift(p, action_72, j), 221 => happy_shift(p, action_38, j), 225 => happy_shift(p, action_73, j), 233 => happy_shift(p, action_74, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_75, j), 239 => happy_shift(p, action_76, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 12 => happy_goto(p, action_932, j), 13 => happy_goto(p, action_52, j), 14 => happy_goto(p, action_53, j), 22 => happy_goto(p, action_54, j), 23 => happy_goto(p, action_55, j), 24 => happy_goto(p, action_56, j), 25 => happy_goto(p, action_57, j), 26 => happy_goto(p, action_58, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_59, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 131 => happy_goto(p, action_60, j), _ => happy_fail(p, j) } } fn action_916(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_930, j), 167 => happy_shift(p, action_931, j), _ => happy_fail(p, j) } } fn action_917(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_71(p, j) } } fn action_918(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_79(p, j) } } fn action_919(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_929, j), _ => happy_fail(p, j) } } fn action_920(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_928, j), _ => happy_fail(p, j) } } fn action_921(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_927, j), _ => happy_fail(p, j) } } fn action_922(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_377(p, j) } } fn action_923(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_344(p, j) } } fn action_924(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 141 => happy_shift(p, action_926, j), _ => happy_fail(p, j) } } fn action_925(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_351(p, j) } } fn action_926(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_360(p, j) } } fn action_927(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_943, j), _ => happy_fail(p, j) } } fn action_928(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_942, j), _ => happy_fail(p, j) } } fn action_929(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_80(p, j) } } fn action_930(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_941, j), _ => happy_fail(p, j) } } fn action_931(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 31 => happy_goto(p, action_939, j), 128 => happy_goto(p, action_940, j), _ => happy_fail(p, j) } } fn action_932(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 16 => happy_goto(p, action_938, j), _ => happy_reduce_41(p, j) } } fn action_933(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_63(p, j) } } fn action_934(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_202(p, j) } } fn action_935(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_275, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 248 => happy_shift(p, action_906, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_936, j), 107 => happy_goto(p, action_9, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), 130 => happy_goto(p, action_937, j), _ => happy_fail(p, j) } } fn action_936(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_489(p, j) } } fn action_937(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_490(p, j) } } fn action_938(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_64(p, j) } } fn action_939(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_946, j), 179 => happy_shift(p, action_947, j), _ => happy_fail(p, j) } } fn action_940(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_83(p, j) } } fn action_941(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_72(p, j) } } fn action_942(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_945, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_943(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 138 => happy_shift(p, action_26, j), 144 => happy_shift(p, action_27, j), 145 => happy_shift(p, action_28, j), 146 => happy_shift(p, action_29, j), 147 => happy_shift(p, action_30, j), 148 => happy_shift(p, action_31, j), 149 => happy_shift(p, action_32, j), 150 => happy_shift(p, action_33, j), 153 => happy_shift(p, action_34, j), 164 => happy_shift(p, action_35, j), 184 => happy_shift(p, action_36, j), 205 => happy_shift(p, action_37, j), 221 => happy_shift(p, action_38, j), 234 => happy_shift(p, action_39, j), 235 => happy_shift(p, action_40, j), 236 => happy_shift(p, action_41, j), 237 => happy_shift(p, action_42, j), 238 => happy_shift(p, action_43, j), 241 => happy_shift(p, action_44, j), 242 => happy_shift(p, action_45, j), 243 => happy_shift(p, action_46, j), 244 => happy_shift(p, action_47, j), 245 => happy_shift(p, action_48, j), 246 => happy_shift(p, action_49, j), 247 => happy_shift(p, action_50, j), 100 => happy_goto(p, action_6, j), 104 => happy_goto(p, action_7, j), 106 => happy_goto(p, action_8, j), 107 => happy_goto(p, action_9, j), 108 => happy_goto(p, action_10, j), 109 => happy_goto(p, action_11, j), 110 => happy_goto(p, action_12, j), 111 => happy_goto(p, action_13, j), 112 => happy_goto(p, action_14, j), 113 => happy_goto(p, action_15, j), 114 => happy_goto(p, action_16, j), 115 => happy_goto(p, action_17, j), 116 => happy_goto(p, action_18, j), 117 => happy_goto(p, action_19, j), 118 => happy_goto(p, action_20, j), 119 => happy_goto(p, action_21, j), 120 => happy_goto(p, action_22, j), 122 => happy_goto(p, action_944, j), 127 => happy_goto(p, action_24, j), 128 => happy_goto(p, action_25, j), _ => happy_fail(p, j) } } fn action_944(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_951, j), _ => happy_fail(p, j) } } fn action_945(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 139 => happy_shift(p, action_950, j), _ => happy_fail(p, j) } } fn action_946(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 180 => happy_shift(p, action_949, j), _ => happy_fail(p, j) } } fn action_947(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { 237 => happy_shift(p, action_42, j), 128 => happy_goto(p, action_948, j), _ => happy_fail(p, j) } } fn action_948(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_84(p, j) } } fn action_949(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_73(p, j) } } fn action_950(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_82(p, j) } } fn action_951(p: &mut Parser, i: isize, j: isize) -> Res<Cont> { match i { _ => happy_reduce_81(p, j) } } fn happy_reduce_4(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 7, happy_reduction_4, i) } fn happy_reduction_4(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT8(mut happy_var_1) => { let decls = happy_var_1; if decls.len() == 0 { let name = p.new_name(); let pos = Rc::new(p.pos_clone()); let nodeinfo = NodeInfo::new(pos.clone(), pos, 0, name); Ok(box CTranslationUnit(decls, nodeinfo)) } else { with_pos!(p, decls[0], |at| box CTranslationUnit(decls, at)) } }.map(HappyAbsSyn::NT7), _ => panic!("irrefutable pattern") } } fn happy_reduce_5(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 8, happy_reduction_5(), i) } fn happy_reduction_5() -> HappyAbsSyn { HappyAbsSyn::NT8(vec![]) } fn happy_reduce_6(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 8, happy_reduction_6, i) } fn happy_reduction_6(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT8(mut happy_var_1)) => HappyAbsSyn::NT8({happy_var_1}), _ => unreachable!() } } fn happy_reduce_7(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 8, happy_reduction_7, i) } fn happy_reduction_7(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT9(mut happy_var_2), HappyAbsSyn::NT8(mut happy_var_1)) => HappyAbsSyn::NT8({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_8(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 9, happy_reduction_8, i) } fn happy_reduction_8(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT10(mut happy_var_1) => HappyAbsSyn::NT9({box CFDefExt(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_9(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 9, happy_reduction_9, i) } fn happy_reduction_9(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT32(mut happy_var_1) => HappyAbsSyn::NT9({box CDeclExt(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_10(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 9, happy_reduction_10, i) } fn happy_reduction_10(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT9(mut happy_var_2), _) => HappyAbsSyn::NT9({happy_var_2}), _ => unreachable!() } } fn happy_reduce_11(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 9, happy_reduction_11, i) } fn happy_reduction_11(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT128(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAsmExt(*happy_var_3, at)) }.map(HappyAbsSyn::NT9), _ => panic!("irrefutable pattern") } } fn happy_reduce_12(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 10, happy_reduction_12, i) } fn happy_reduction_12(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_2), HappyAbsSyn::NT11(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(vec![], happy_var_1, vec![], happy_var_2, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_13(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_13, i) } fn happy_reduction_13(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(lift_attrs(happy_var_1), happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_14(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_14, i) } fn happy_reduction_14(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_15(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_15, i) } fn happy_reduction_15(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_16(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_16, i) } fn happy_reduction_16(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_17(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_17, i) } fn happy_reduction_17(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(lift_type_quals(happy_var_1), happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_18(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_18, i) } fn happy_reduction_18(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT11(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), happy_var_3, vec![], happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_19(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 10, happy_reduction_19, i) } fn happy_reduction_19(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT33(mut happy_var_2), HappyAbsSyn::NT11(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(vec![], happy_var_1, happy_var_2, happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_20(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_20, i) } fn happy_reduction_20(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT33(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| box CFunctionDef(lift_attrs(happy_var_1), happy_var_2, happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_21(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_21, i) } fn happy_reduction_21(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT33(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_22(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_22, i) } fn happy_reduction_22(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT33(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_23(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_23, i) } fn happy_reduction_23(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT33(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_24(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 10, happy_reduction_24, i) } fn happy_reduction_24(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT33(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(lift_type_quals(happy_var_1), happy_var_2, happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_25(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 10, happy_reduction_25, i) } fn happy_reduction_25(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_5), HappyAbsSyn::NT33(mut happy_var_4), HappyAbsSyn::NT11(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFunctionDef(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), happy_var_3, happy_var_4, happy_var_5, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_26(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 11, happy_reduction_26, i) } fn happy_reduction_26(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT66(mut happy_var_1) => { let declr = happy_var_1.reverse(); p.enter_scope(); p.do_func_param_decl_ident(&declr); Ok(declr) }.map(HappyAbsSyn::NT11), _ => panic!("irrefutable pattern") } } fn happy_reduce_27(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_27, i) } fn happy_reduction_27(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_28(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_28, i) } fn happy_reduction_28(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_29(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_29, i) } fn happy_reduction_29(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_30(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_30, i) } fn happy_reduction_30(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_31(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_31, i) } fn happy_reduction_31(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_32(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 12, happy_reduction_32, i) } fn happy_reduction_32(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT12({happy_var_1}), _ => unreachable!() } } fn happy_reduce_33(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 12, happy_reduction_33, i) } fn happy_reduction_33(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT26(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CAsm(happy_var_1, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_34(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 13, happy_reduction_34, i) } fn happy_reduction_34(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::NT131(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CLabel(happy_var_1, happy_var_4, happy_var_3, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_35(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 13, happy_reduction_35, i) } fn happy_reduction_35(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), _, HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCase(happy_var_2, happy_var_4, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_36(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 13, happy_reduction_36, i) } fn happy_reduction_36(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDefault(happy_var_3, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_37(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 13, happy_reduction_37, i) } fn happy_reduction_37(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_6), _, HappyAbsSyn::NT100(mut happy_var_4), _, HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCases(happy_var_2, happy_var_4, happy_var_6, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_38(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 14, happy_reduction_38, i) } fn happy_reduction_38(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT17(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCompound(vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_39(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 14, happy_reduction_39, i) } fn happy_reduction_39(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT17(mut happy_var_4), HappyAbsSyn::NT21(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCompound(happy_var_3, happy_var_4, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_40(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 0, 15, happy_reduction_40, i) } fn happy_reduction_40(p: &mut Parser) -> Res<HappyAbsSyn> { match () { () => { Ok(p.enter_scope()) }.map(HappyAbsSyn::NT15), _ => panic!("irrefutable pattern") } } fn happy_reduce_41(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 0, 16, happy_reduction_41, i) } fn happy_reduction_41(p: &mut Parser) -> Res<HappyAbsSyn> { match () { () => { Ok(p.leave_scope()) }.map(HappyAbsSyn::NT15), _ => panic!("irrefutable pattern") } } fn happy_reduce_42(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 17, happy_reduction_42(), i) } fn happy_reduction_42() -> HappyAbsSyn { HappyAbsSyn::NT17(vec![]) } fn happy_reduce_43(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 17, happy_reduction_43, i) } fn happy_reduction_43(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT18(mut happy_var_2), HappyAbsSyn::NT17(mut happy_var_1)) => HappyAbsSyn::NT17({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_44(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 18, happy_reduction_44, i) } fn happy_reduction_44(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT12(mut happy_var_1) => HappyAbsSyn::NT18({box CBlockStmt(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_45(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 18, happy_reduction_45, i) } fn happy_reduction_45(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT18(mut happy_var_1) => HappyAbsSyn::NT18({happy_var_1}), _ => unreachable!() } } fn happy_reduce_46(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 19, happy_reduction_46, i) } fn happy_reduction_46(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT32(mut happy_var_1) => HappyAbsSyn::NT18({box CBlockDecl(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_47(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 19, happy_reduction_47, i) } fn happy_reduction_47(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT10(mut happy_var_1) => HappyAbsSyn::NT18({box CNestedFunDef(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_48(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 19, happy_reduction_48, i) } fn happy_reduction_48(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT18(mut happy_var_2), _) => HappyAbsSyn::NT18({happy_var_2}), _ => unreachable!() } } fn happy_reduce_49(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 20, happy_reduction_49, i) } fn happy_reduction_49(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_50(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 20, happy_reduction_50, i) } fn happy_reduction_50(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_51(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 20, happy_reduction_51, i) } fn happy_reduction_51(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(happy_var_1, happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_52(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 20, happy_reduction_52, i) } fn happy_reduction_52(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_3), HappyAbsSyn::NT11(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(lift_type_quals(happy_var_1), happy_var_2, vec![], happy_var_3, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_53(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 20, happy_reduction_53, i) } fn happy_reduction_53(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_4), HappyAbsSyn::NT11(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { p.leave_scope(); with_pos!(p, happy_var_1, |at| box CFunctionDef(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), happy_var_3, vec![], happy_var_4, at)) }.map(HappyAbsSyn::NT10), _ => panic!("irrefutable pattern") } } fn happy_reduce_54(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 21, happy_reduction_54, i) } fn happy_reduction_54(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT21(mut happy_var_2), _) => HappyAbsSyn::NT21({happy_var_2}), _ => unreachable!() } } fn happy_reduce_55(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 21, happy_reduction_55, i) } fn happy_reduction_55(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT21(mut happy_var_3), _, HappyAbsSyn::NT21(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT21({add_vecs(happy_var_1, happy_var_3)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_56(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 22, happy_reduction_56, i) } fn happy_reduction_56(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CExpr(None, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_57(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 22, happy_reduction_57, i) } fn happy_reduction_57(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CExpr(Some(happy_var_1), at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_58(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 23, happy_reduction_58, i) } fn happy_reduction_58(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CIf(happy_var_3, happy_var_5, None, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_59(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 23, happy_reduction_59, i) } fn happy_reduction_59(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_7), _, HappyAbsSyn::NT12(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CIf(happy_var_3, happy_var_5, Some(happy_var_7), at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_60(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 23, happy_reduction_60, i) } fn happy_reduction_60(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CSwitch(happy_var_3, happy_var_5, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_61(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 24, happy_reduction_61, i) } fn happy_reduction_61(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CWhile(happy_var_3, happy_var_5, false, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_62(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 24, happy_reduction_62, i) } fn happy_reduction_62(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT100(mut happy_var_5), _, _, HappyAbsSyn::NT12(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CWhile(happy_var_5, happy_var_2, true, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_63(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 9, 24, happy_reduction_63, i) } fn happy_reduction_63(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT12(mut happy_var_9), _, HappyAbsSyn::NT124(mut happy_var_7), _, HappyAbsSyn::NT124(mut happy_var_5), _, HappyAbsSyn::NT124(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFor(Left(happy_var_3), happy_var_5, happy_var_7, happy_var_9, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_64(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 10, 24, happy_reduction_64, i) } fn happy_reduction_64(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT12(mut happy_var_9), _, HappyAbsSyn::NT124(mut happy_var_7), _, HappyAbsSyn::NT124(mut happy_var_5), HappyAbsSyn::NT32(mut happy_var_4), _, _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CFor(Right(happy_var_4), happy_var_5, happy_var_7, happy_var_9, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_65(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 25, happy_reduction_65, i) } fn happy_reduction_65(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT131(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CGoto(happy_var_2, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_66(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 25, happy_reduction_66, i) } fn happy_reduction_66(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CGotoPtr(happy_var_3, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_67(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 25, happy_reduction_67, i) } fn happy_reduction_67(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCont(at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_68(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 25, happy_reduction_68, i) } fn happy_reduction_68(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBreak(at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_69(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 25, happy_reduction_69, i) } fn happy_reduction_69(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT124(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CReturn(happy_var_2, at)) }.map(HappyAbsSyn::NT12), _ => panic!("irrefutable pattern") } } fn happy_reduce_70(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 26, happy_reduction_70, i) } fn happy_reduction_70(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::NT27(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyStatement(happy_var_2, happy_var_4, vec![], vec![], vec![], at)) }.map(HappyAbsSyn::NT26), _ => panic!("irrefutable pattern") } } fn happy_reduce_71(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 8, 26, happy_reduction_71, i) } fn happy_reduction_71(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT28(mut happy_var_6), _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::NT27(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyStatement(happy_var_2, happy_var_4, happy_var_6, vec![], vec![], at)) }.map(HappyAbsSyn::NT26), _ => panic!("irrefutable pattern") } } fn happy_reduce_72(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 10, 26, happy_reduction_72, i) } fn happy_reduction_72(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT28(mut happy_var_8), _, HappyAbsSyn::NT28(mut happy_var_6), _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::NT27(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyStatement(happy_var_2, happy_var_4, happy_var_6, happy_var_8, vec![], at)) }.map(HappyAbsSyn::NT26), _ => panic!("irrefutable pattern") } } fn happy_reduce_73(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 12, 26, happy_reduction_73, i) } fn happy_reduction_73(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT31(mut happy_var_10), _, HappyAbsSyn::NT28(mut happy_var_8), _, HappyAbsSyn::NT28(mut happy_var_6), _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::NT27(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyStatement(happy_var_2, happy_var_4, happy_var_6, happy_var_8, happy_var_10, at)) }.map(HappyAbsSyn::NT26), _ => panic!("irrefutable pattern") } } fn happy_reduce_74(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 27, happy_reduction_74(), i) } fn happy_reduction_74() -> HappyAbsSyn { HappyAbsSyn::NT27(None) } fn happy_reduce_75(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 27, happy_reduction_75, i) } fn happy_reduction_75(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT64(mut happy_var_1) => HappyAbsSyn::NT27({Some(happy_var_1)}), _ => unreachable!() } } fn happy_reduce_76(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 28, happy_reduction_76(), i) } fn happy_reduction_76() -> HappyAbsSyn { HappyAbsSyn::NT28(vec![]) } fn happy_reduce_77(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 28, happy_reduction_77, i) } fn happy_reduction_77(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT28(mut happy_var_1) => HappyAbsSyn::NT28({happy_var_1}), _ => unreachable!() } } fn happy_reduce_78(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 29, happy_reduction_78, i) } fn happy_reduction_78(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT30(mut happy_var_1) => HappyAbsSyn::NT28({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_79(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 29, happy_reduction_79, i) } fn happy_reduction_79(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT30(mut happy_var_3), _, HappyAbsSyn::NT28(mut happy_var_1)) => HappyAbsSyn::NT28({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_80(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 30, happy_reduction_80, i) } fn happy_reduction_80(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT128(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyOperand(None, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT30), _ => panic!("irrefutable pattern") } } fn happy_reduce_81(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 30, happy_reduction_81, i) } fn happy_reduction_81(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_6), _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_2)), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyOperand(Some(happy_var_2), happy_var_4, happy_var_6, at)) }.map(HappyAbsSyn::NT30), _ => panic!("irrefutable pattern") } } fn happy_reduce_82(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 30, happy_reduction_82, i) } fn happy_reduction_82(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_6), _, HappyAbsSyn::NT128(mut happy_var_4), _, HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_2)), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssemblyOperand(Some(happy_var_2), happy_var_4, happy_var_6, at)) }.map(HappyAbsSyn::NT30), _ => panic!("irrefutable pattern") } } fn happy_reduce_83(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 31, happy_reduction_83, i) } fn happy_reduction_83(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT128(mut happy_var_1) => HappyAbsSyn::NT31({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_84(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 31, happy_reduction_84, i) } fn happy_reduction_84(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT128(mut happy_var_3), _, HappyAbsSyn::NT31(mut happy_var_1)) => HappyAbsSyn::NT31({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_85(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 32, happy_reduction_85, i) } fn happy_reduction_85(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_86(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 32, happy_reduction_86, i) } fn happy_reduction_86(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_87(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 32, happy_reduction_87, i) } fn happy_reduction_87(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_1)) => { unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; p.with_length(at, |at| box CDecl(declspecs, rev_vec(dies), at)) } }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_88(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 32, happy_reduction_88, i) } fn happy_reduction_88(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_1)) => { unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; p.with_length(at, |at| box CDecl(declspecs, rev_vec(dies), at)) } }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_89(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 32, happy_reduction_89, i) } fn happy_reduction_89(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT128(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CStaticAssert(happy_var_3, *happy_var_5, at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_90(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 33, happy_reduction_90(), i) } fn happy_reduction_90() -> HappyAbsSyn { HappyAbsSyn::NT33(vec![]) } fn happy_reduce_91(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 33, happy_reduction_91, i) } fn happy_reduction_91(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT32(mut happy_var_2), HappyAbsSyn::NT33(mut happy_var_1)) => HappyAbsSyn::NT33({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_92(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 34, happy_reduction_92, i) } fn happy_reduction_92(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_4), HappyAbsSyn::NT35(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { let declspecs = happy_var_1; let declr = happy_var_2.with_asm_name_attrs(*happy_var_3)?; p.do_decl_ident(&declspecs, &declr); with_pos!(p, declspecs, |at| box CDecl(declspecs, vec![(Some(declr.reverse()), happy_var_4, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_93(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 34, happy_reduction_93, i) } fn happy_reduction_93(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_4), HappyAbsSyn::NT35(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { let declspecs = lift_type_quals(happy_var_1); let declr = happy_var_2.with_asm_name_attrs(*happy_var_3)?; p.do_decl_ident(&declspecs, &declr); with_pos!(p, declspecs, |at| box CDecl(declspecs, vec![(Some(declr.reverse()), happy_var_4, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_94(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 34, happy_reduction_94, i) } fn happy_reduction_94(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_5), HappyAbsSyn::NT35(mut happy_var_4), HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { let declspecs = lift_type_quals(happy_var_1); let declr = happy_var_3.with_asm_name_attrs(*happy_var_4)?; p.do_decl_ident(&declspecs, &declr); with_pos!(p, declspecs, |at| box CDecl(add_vecs(declspecs, lift_attrs(happy_var_2)), vec![(Some(declr.reverse()), happy_var_5, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_95(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 34, happy_reduction_95, i) } fn happy_reduction_95(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_4), HappyAbsSyn::NT35(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => { let declspecs = lift_attrs(happy_var_1); let declr = happy_var_2.with_asm_name_attrs(*happy_var_3)?; p.do_decl_ident(&declspecs, &declr); with_pos!(p, declspecs, |at| box CDecl(declspecs, vec![(Some(declr.reverse()), happy_var_4, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_96(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 34, happy_reduction_96, i) } fn happy_reduction_96(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_6), HappyAbsSyn::NT35(mut happy_var_5), HappyAbsSyn::NT66(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::NT32(mut happy_var_1)) => { unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; let (f, s) = { *happy_var_5 }; let declr = happy_var_4.with_asm_name_attrs((f, add_vecs(s, happy_var_3)))?; p.do_decl_ident(&declspecs, &declr); p.with_length(at, |at| box CDecl(declspecs, prepend((Some(declr.reverse()), happy_var_6, None), dies), at)) } }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_97(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 35, happy_reduction_97, i) } fn happy_reduction_97(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT67(mut happy_var_1)) => HappyAbsSyn::NT35({box (happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_98(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 36, happy_reduction_98, i) } fn happy_reduction_98(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_4), HappyAbsSyn::NT35(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { let declr = happy_var_2.with_asm_name_attrs(*happy_var_3)?; p.do_decl_ident(&happy_var_1, &declr); with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(declr.reverse()), happy_var_4, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_99(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 36, happy_reduction_99, i) } fn happy_reduction_99(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_4), HappyAbsSyn::NT35(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { let declr = happy_var_2.with_asm_name_attrs(*happy_var_3)?; p.do_decl_ident(&happy_var_1, &declr); with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(declr.reverse()), happy_var_4, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_100(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 36, happy_reduction_100, i) } fn happy_reduction_100(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT94(mut happy_var_6), HappyAbsSyn::NT35(mut happy_var_5), HappyAbsSyn::NT66(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::NT32(mut happy_var_1)) => { unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; let (f, s) = { *happy_var_5 }; let declr = happy_var_4.with_asm_name_attrs((f, add_vecs(s, happy_var_3)))?; p.do_decl_ident(&declspecs, &declr); Ok(box CDecl(declspecs, prepend((Some(declr.reverse()), happy_var_6, None), dies), at)) } }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_101(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 37, happy_reduction_101, i) } fn happy_reduction_101(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_102(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 37, happy_reduction_102, i) } fn happy_reduction_102(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_103(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 37, happy_reduction_103, i) } fn happy_reduction_103(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_104(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 38, happy_reduction_104, i) } fn happy_reduction_104(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT39(mut happy_var_1) => HappyAbsSyn::NT37({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_105(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 38, happy_reduction_105, i) } fn happy_reduction_105(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT37({appended(lift_attrs(happy_var_1), *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_106(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 38, happy_reduction_106, i) } fn happy_reduction_106(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(map(CTypeQual, happy_var_1), *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_107(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 38, happy_reduction_107, i) } fn happy_reduction_107(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_108(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 38, happy_reduction_108, i) } fn happy_reduction_108(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_109(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 38, happy_reduction_109, i) } fn happy_reduction_109(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_110(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 39, happy_reduction_110, i) } fn happy_reduction_110(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT41(mut happy_var_1) => HappyAbsSyn::NT39({box CStorageSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_111(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 39, happy_reduction_111, i) } fn happy_reduction_111(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT64(mut happy_var_1) => HappyAbsSyn::NT39({box CTypeQual(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_112(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 39, happy_reduction_112, i) } fn happy_reduction_112(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT42(mut happy_var_1) => HappyAbsSyn::NT39({box CFunSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_113(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 39, happy_reduction_113, i) } fn happy_reduction_113(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT43(mut happy_var_1) => HappyAbsSyn::NT39({box CAlignSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_114(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 40, happy_reduction_114, i) } fn happy_reduction_114(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT41(mut happy_var_1) => HappyAbsSyn::NT39({box CStorageSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_115(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 40, happy_reduction_115, i) } fn happy_reduction_115(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT42(mut happy_var_1) => HappyAbsSyn::NT39({box CFunSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_116(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 40, happy_reduction_116, i) } fn happy_reduction_116(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT43(mut happy_var_1) => HappyAbsSyn::NT39({box CAlignSpec(*happy_var_1)}), _ => unreachable!() } } fn happy_reduce_117(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_117, i) } fn happy_reduction_117(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CTypedef(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_118(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_118, i) } fn happy_reduction_118(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CExtern(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_119(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_119, i) } fn happy_reduction_119(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CStatic(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_120(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_120, i) } fn happy_reduction_120(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CAuto(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_121(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_121, i) } fn happy_reduction_121(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CRegister(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_122(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 41, happy_reduction_122, i) } fn happy_reduction_122(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CThread(at)) }.map(HappyAbsSyn::NT41), _ => panic!("irrefutable pattern") } } fn happy_reduce_123(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 42, happy_reduction_123, i) } fn happy_reduction_123(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CInlineQual(at)) }.map(HappyAbsSyn::NT42), _ => panic!("irrefutable pattern") } } fn happy_reduce_124(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 42, happy_reduction_124, i) } fn happy_reduction_124(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CNoreturnQual(at)) }.map(HappyAbsSyn::NT42), _ => panic!("irrefutable pattern") } } fn happy_reduce_125(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 43, happy_reduction_125, i) } fn happy_reduction_125(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAlignAsType(happy_var_3, at)) }.map(HappyAbsSyn::NT43), _ => panic!("irrefutable pattern") } } fn happy_reduce_126(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 43, happy_reduction_126, i) } fn happy_reduction_126(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAlignAsExpr(happy_var_3, at)) }.map(HappyAbsSyn::NT43), _ => panic!("irrefutable pattern") } } fn happy_reduce_127(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 44, happy_reduction_127, i) } fn happy_reduction_127(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_128(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 44, happy_reduction_128, i) } fn happy_reduction_128(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_129(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 44, happy_reduction_129, i) } fn happy_reduction_129(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT37(mut happy_var_1) => HappyAbsSyn::NT37({happy_var_1}), _ => unreachable!() } } fn happy_reduce_130(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_130, i) } fn happy_reduction_130(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CVoidType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_131(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_131, i) } fn happy_reduction_131(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CCharType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_132(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_132, i) } fn happy_reduction_132(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CShortType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_133(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_133, i) } fn happy_reduction_133(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CIntType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_134(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_134, i) } fn happy_reduction_134(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CLongType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_135(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_135, i) } fn happy_reduction_135(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CFloatType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_136(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_136, i) } fn happy_reduction_136(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDoubleType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_137(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_137, i) } fn happy_reduction_137(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CSignedType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_138(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_138, i) } fn happy_reduction_138(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CUnsigType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_139(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_139, i) } fn happy_reduction_139(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CBoolType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_140(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_140, i) } fn happy_reduction_140(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CComplexType(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_141(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_141, i) } fn happy_reduction_141(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CInt128Type(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_142(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 45, happy_reduction_142, i) } fn happy_reduction_142(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CFloat128Type(at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_143(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 46, happy_reduction_143, i) } fn happy_reduction_143(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_144(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 46, happy_reduction_144, i) } fn happy_reduction_144(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT41(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CStorageSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_145(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 46, happy_reduction_145, i) } fn happy_reduction_145(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_146(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 46, happy_reduction_146, i) } fn happy_reduction_146(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_147(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 46, happy_reduction_147, i) } fn happy_reduction_147(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_148(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 47, happy_reduction_148, i) } fn happy_reduction_148(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT45(mut happy_var_1) => HappyAbsSyn::NT37({vec![CTypeSpec(*happy_var_1)]}), _ => unreachable!() } } fn happy_reduce_149(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 47, happy_reduction_149, i) } fn happy_reduction_149(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT37({appended(lift_attrs(happy_var_1), CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_150(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 47, happy_reduction_150, i) } fn happy_reduction_150(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(map(CTypeQual, happy_var_1), CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_151(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 47, happy_reduction_151, i) } fn happy_reduction_151(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), CTypeSpec(*happy_var_3))}), _ => unreachable!() } } fn happy_reduce_152(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 47, happy_reduction_152, i) } fn happy_reduction_152(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeQual(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_153(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 47, happy_reduction_153, i) } fn happy_reduction_153(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_154(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 47, happy_reduction_154, i) } fn happy_reduction_154(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_155(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 48, happy_reduction_155, i) } fn happy_reduction_155(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_156(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 48, happy_reduction_156, i) } fn happy_reduction_156(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT41(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CStorageSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_157(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 48, happy_reduction_157, i) } fn happy_reduction_157(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_158(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 48, happy_reduction_158, i) } fn happy_reduction_158(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_159(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 49, happy_reduction_159, i) } fn happy_reduction_159(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT45(mut happy_var_1) => HappyAbsSyn::NT37({vec![CTypeSpec(*happy_var_1)]}), _ => unreachable!() } } fn happy_reduce_160(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 49, happy_reduction_160, i) } fn happy_reduction_160(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT37({appended(lift_attrs(happy_var_1), CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_161(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 49, happy_reduction_161, i) } fn happy_reduction_161(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(map(CTypeQual, happy_var_1), CTypeSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_162(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 49, happy_reduction_162, i) } fn happy_reduction_162(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT45(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT37({appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), CTypeSpec(*happy_var_3))}), _ => unreachable!() } } fn happy_reduce_163(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 49, happy_reduction_163, i) } fn happy_reduction_163(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeQual(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_164(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 49, happy_reduction_164, i) } fn happy_reduction_164(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_165(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 50, happy_reduction_165, i) } fn happy_reduction_165(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT41(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CStorageSpec(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_166(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 50, happy_reduction_166, i) } fn happy_reduction_166(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_2)), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(happy_var_1, CTypeSpec(CTypeDef(happy_var_2, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_167(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 50, happy_reduction_167, i) } fn happy_reduction_167(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_4), _, HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(happy_var_1, CTypeSpec(CTypeOfExpr(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_168(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 50, happy_reduction_168, i) } fn happy_reduction_168(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_4), _, HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(happy_var_1, CTypeSpec(CTypeOfType(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_169(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 50, happy_reduction_169, i) } fn happy_reduction_169(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT39(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_170(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 50, happy_reduction_170, i) } fn happy_reduction_170(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_171(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 51, happy_reduction_171, i) } fn happy_reduction_171(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| vec![CTypeSpec(CTypeDef(happy_var_1, at))]) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_172(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 51, happy_reduction_172, i) } fn happy_reduction_172(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| vec![CTypeSpec(CTypeOfExpr(happy_var_3, at))]) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_173(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 51, happy_reduction_173, i) } fn happy_reduction_173(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| vec![CTypeSpec(CTypeOfType(happy_var_3, at))]) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_174(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 51, happy_reduction_174, i) } fn happy_reduction_174(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_2)), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(map(CTypeQual, happy_var_1), CTypeSpec(CTypeDef(happy_var_2, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_175(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 51, happy_reduction_175, i) } fn happy_reduction_175(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_4), _, HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(map(CTypeQual, happy_var_1), CTypeSpec(CTypeOfExpr(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_176(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 51, happy_reduction_176, i) } fn happy_reduction_176(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_4), _, HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(map(CTypeQual, happy_var_1), CTypeSpec(CTypeOfType(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_177(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 51, happy_reduction_177, i) } fn happy_reduction_177(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_2)), HappyAbsSyn::NT132(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(lift_attrs(happy_var_1), CTypeSpec(CTypeDef(happy_var_2, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_178(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 51, happy_reduction_178, i) } fn happy_reduction_178(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_4), _, _, HappyAbsSyn::NT132(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| appended(lift_attrs(happy_var_1), CTypeSpec(CTypeOfExpr(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_179(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 51, happy_reduction_179, i) } fn happy_reduction_179(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_4), _, HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => { with_pos!(p, happy_var_2, |at| appended(lift_attrs(happy_var_1), CTypeSpec(CTypeOfType(happy_var_4, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_180(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 51, happy_reduction_180, i) } fn happy_reduction_180(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_3)), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), CTypeSpec(CTypeDef(happy_var_3, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_181(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 51, happy_reduction_181, i) } fn happy_reduction_181(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_5), _, HappyAbsSyn::Terminal(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), CTypeSpec(CTypeOfExpr(happy_var_5, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_182(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 51, happy_reduction_182, i) } fn happy_reduction_182(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_5), _, HappyAbsSyn::Terminal(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| appended(add_vecs(map(CTypeQual, happy_var_1), lift_attrs(happy_var_2)), CTypeSpec(CTypeOfType(happy_var_5, at)))) }.map(HappyAbsSyn::NT37), _ => panic!("irrefutable pattern") } } fn happy_reduce_183(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 51, happy_reduction_183, i) } fn happy_reduction_183(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({appended(happy_var_1, CTypeQual(*happy_var_2))}), _ => unreachable!() } } fn happy_reduce_184(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 51, happy_reduction_184, i) } fn happy_reduction_184(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => HappyAbsSyn::NT37({add_trailing_attrs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_185(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 52, happy_reduction_185, i) } fn happy_reduction_185(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT53(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CSUType(happy_var_1, at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_186(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 52, happy_reduction_186, i) } fn happy_reduction_186(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT61(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CEnumType(happy_var_1, at)) }.map(HappyAbsSyn::NT45), _ => panic!("irrefutable pattern") } } fn happy_reduce_187(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 53, happy_reduction_187, i) } fn happy_reduction_187(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT33(mut happy_var_5), _, HappyAbsSyn::NT131(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT54(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CStructureUnion(happy_var_1.into_inner(), Some(happy_var_3), Some(happy_var_5), happy_var_2, at)) }.map(HappyAbsSyn::NT53), _ => panic!("irrefutable pattern") } } fn happy_reduce_188(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 53, happy_reduction_188, i) } fn happy_reduction_188(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT33(mut happy_var_4), _, HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT54(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CStructureUnion(happy_var_1.into_inner(), None, Some(happy_var_4), happy_var_2, at)) }.map(HappyAbsSyn::NT53), _ => panic!("irrefutable pattern") } } fn happy_reduce_189(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 53, happy_reduction_189, i) } fn happy_reduction_189(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT54(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CStructureUnion(happy_var_1.into_inner(), Some(happy_var_3), None, happy_var_2, at)) }.map(HappyAbsSyn::NT53), _ => panic!("irrefutable pattern") } } fn happy_reduce_190(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 54, happy_reduction_190, i) } fn happy_reduction_190(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT54({Located::new(CStructTag, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_191(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 54, happy_reduction_191, i) } fn happy_reduction_191(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT54({Located::new(CUnionTag, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_192(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 55, happy_reduction_192(), i) } fn happy_reduction_192() -> HappyAbsSyn { HappyAbsSyn::NT33(vec![]) } fn happy_reduce_193(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 55, happy_reduction_193, i) } fn happy_reduction_193(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT33(mut happy_var_1)) => HappyAbsSyn::NT33({happy_var_1}), _ => unreachable!() } } fn happy_reduce_194(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 55, happy_reduction_194, i) } fn happy_reduction_194(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT32(mut happy_var_2), HappyAbsSyn::NT33(mut happy_var_1)) => HappyAbsSyn::NT33({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_195(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 56, happy_reduction_195, i) } fn happy_reduction_195(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT32(mut happy_var_1)) => HappyAbsSyn::NT32({unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; box CDecl(declspecs, rev_vec(dies), at) }}), _ => unreachable!() } } fn happy_reduce_196(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 56, happy_reduction_196, i) } fn happy_reduction_196(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT32(mut happy_var_1)) => HappyAbsSyn::NT32({unwrap_let! { CDecl(declspecs, dies, at) = { *happy_var_1 }; box CDecl(declspecs, rev_vec(dies), at) }}), _ => unreachable!() } } fn happy_reduce_197(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 56, happy_reduction_197, i) } fn happy_reduction_197(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT32(mut happy_var_2), _) => HappyAbsSyn::NT32({happy_var_2}), _ => unreachable!() } } fn happy_reduce_198(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 57, happy_reduction_198, i) } fn happy_reduction_198(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT59(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, match happy_var_3 { (d, s) => |at| box CDecl(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), vec![(d, None, s)], at) }) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_199(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 57, happy_reduction_199, i) } fn happy_reduction_199(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT59(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => { with_pos!(p, happy_var_1, match happy_var_2 { (d, s) => |at| box CDecl(lift_attrs(happy_var_1), vec![(d, None, s)], at), }) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_200(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 57, happy_reduction_200, i) } fn happy_reduction_200(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT59(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::NT32(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT32({unwrap_let! { box CDecl(_, ref mut dies, _) = happy_var_1; match happy_var_4 { (Some(d), s) => dies.insert(0, (Some(append_obj_attrs(happy_var_3, d)), None, s)), (None, s) => dies.insert(0, (None, None, s)), } } happy_var_1})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_201(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 58, happy_reduction_201, i) } fn happy_reduction_201(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT59(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, move |at| box match happy_var_2 { (Some(d), s) => { CDecl(happy_var_1, vec![(Some(append_obj_attrs(happy_var_3, d)), None, s)], at) }, (None, s) => { CDecl(happy_var_1, vec![(None, None, s)], at) }, }) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_202(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 58, happy_reduction_202, i) } fn happy_reduction_202(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_5), HappyAbsSyn::NT59(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::NT32(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT32({unwrap_let! { box CDecl(_, ref mut dies, _) = happy_var_1; match happy_var_4 { (Some(d), s) => dies.insert(0, (Some(append_obj_attrs(add_vecs(happy_var_3, happy_var_5), d)), None, s)), (None, s) => dies.insert(0, (None, None, s)), } } happy_var_1})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_203(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 58, happy_reduction_203, i) } fn happy_reduction_203(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT37(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_204(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 59, happy_reduction_204, i) } fn happy_reduction_204(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT59({(Some(happy_var_1.reverse()), None)}), _ => unreachable!() } } fn happy_reduce_205(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 59, happy_reduction_205, i) } fn happy_reduction_205(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_2), _) => HappyAbsSyn::NT59({(None, Some(happy_var_2))}), _ => unreachable!() } } fn happy_reduce_206(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 59, happy_reduction_206, i) } fn happy_reduction_206(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT66(mut happy_var_1)) => HappyAbsSyn::NT59({(Some(happy_var_1.reverse()), Some(happy_var_3))}), _ => unreachable!() } } fn happy_reduce_207(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 60, happy_reduction_207, i) } fn happy_reduction_207(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT59({(Some(happy_var_1.reverse()), None)}), _ => unreachable!() } } fn happy_reduce_208(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 60, happy_reduction_208, i) } fn happy_reduction_208(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_2), _) => HappyAbsSyn::NT59({(None, Some(happy_var_2))}), _ => unreachable!() } } fn happy_reduce_209(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 60, happy_reduction_209, i) } fn happy_reduction_209(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT66(mut happy_var_1)) => HappyAbsSyn::NT59({(Some(happy_var_1.reverse()), Some(happy_var_3))}), _ => unreachable!() } } fn happy_reduce_210(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 60, happy_reduction_210, i) } fn happy_reduction_210(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT59(mut happy_var_1)) => HappyAbsSyn::NT59({if let (Some(ref mut decl), _) = happy_var_1 { decl.3.extend(happy_var_2); } happy_var_1}), _ => unreachable!() } } fn happy_reduce_211(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 61, happy_reduction_211, i) } fn happy_reduction_211(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT62(mut happy_var_4), _, HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CEnumeration(None, Some(happy_var_4), happy_var_2, at)) }.map(HappyAbsSyn::NT61), _ => panic!("irrefutable pattern") } } fn happy_reduce_212(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 61, happy_reduction_212, i) } fn happy_reduction_212(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT62(mut happy_var_4), _, HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CEnumeration(None, Some(happy_var_4), happy_var_2, at)) }.map(HappyAbsSyn::NT61), _ => panic!("irrefutable pattern") } } fn happy_reduce_213(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 61, happy_reduction_213, i) } fn happy_reduction_213(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT62(mut happy_var_5), _, HappyAbsSyn::NT131(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CEnumeration(Some(happy_var_3), Some(happy_var_5), happy_var_2, at)) }.map(HappyAbsSyn::NT61), _ => panic!("irrefutable pattern") } } fn happy_reduce_214(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 61, happy_reduction_214, i) } fn happy_reduction_214(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT62(mut happy_var_5), _, HappyAbsSyn::NT131(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CEnumeration(Some(happy_var_3), Some(happy_var_5), happy_var_2, at)) }.map(HappyAbsSyn::NT61), _ => panic!("irrefutable pattern") } } fn happy_reduce_215(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 61, happy_reduction_215, i) } fn happy_reduction_215(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CEnumeration(Some(happy_var_3), None, happy_var_2, at)) }.map(HappyAbsSyn::NT61), _ => panic!("irrefutable pattern") } } fn happy_reduce_216(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 62, happy_reduction_216, i) } fn happy_reduction_216(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT63(mut happy_var_1) => HappyAbsSyn::NT62({vec![happy_var_1]}), _ => unreachable!() } } fn happy_reduce_217(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 62, happy_reduction_217, i) } fn happy_reduction_217(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT63(mut happy_var_3), _, HappyAbsSyn::NT62(mut happy_var_1)) => HappyAbsSyn::NT62({appended(happy_var_1, happy_var_3)}), _ => unreachable!() } } fn happy_reduce_218(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 63, happy_reduction_218, i) } fn happy_reduction_218(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT131(mut happy_var_1) => HappyAbsSyn::NT63({(happy_var_1, None)}), _ => unreachable!() } } fn happy_reduce_219(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 63, happy_reduction_219, i) } fn happy_reduction_219(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT131(mut happy_var_1)) => HappyAbsSyn::NT63({(happy_var_1, None)}), _ => unreachable!() } } fn happy_reduce_220(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 63, happy_reduction_220, i) } fn happy_reduction_220(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_4), _, _, HappyAbsSyn::NT131(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT63({(happy_var_1, Some(happy_var_4))})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_221(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 63, happy_reduction_221, i) } fn happy_reduction_221(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT131(mut happy_var_1)) => HappyAbsSyn::NT63({(happy_var_1, Some(happy_var_3))}), _ => unreachable!() } } fn happy_reduce_222(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_222, i) } fn happy_reduction_222(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CConstQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_223(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_223, i) } fn happy_reduction_223(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CVolatQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_224(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_224, i) } fn happy_reduction_224(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CRestrQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_225(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_225, i) } fn happy_reduction_225(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CNullableQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_226(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_226, i) } fn happy_reduction_226(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CNonnullQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_227(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 64, happy_reduction_227, i) } fn happy_reduction_227(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CAtomicQual(at)) }.map(HappyAbsSyn::NT64), _ => panic!("irrefutable pattern") } } fn happy_reduce_228(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 65, happy_reduction_228, i) } fn happy_reduction_228(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT65({appended(map(|q| CAttrQual(box q), happy_var_1), *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_229(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 65, happy_reduction_229, i) } fn happy_reduction_229(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT65({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_230(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 65, happy_reduction_230, i) } fn happy_reduction_230(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT64(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => HappyAbsSyn::NT65({appended(add_vecs(happy_var_1, map(|q| CAttrQual(box q), happy_var_2)), *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_231(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 66, happy_reduction_231, i) } fn happy_reduction_231(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_232(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 66, happy_reduction_232, i) } fn happy_reduction_232(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_233(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 67, happy_reduction_233(), i) } fn happy_reduction_233() -> HappyAbsSyn { HappyAbsSyn::NT67(None) } fn happy_reduce_234(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 67, happy_reduction_234, i) } fn happy_reduction_234(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT128(mut happy_var_3), _, _) => { p.stack.push(HappyAbsSyn::NT67({Some(happy_var_3)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_235(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 68, happy_reduction_235, i) } fn happy_reduction_235(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_236(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 68, happy_reduction_236, i) } fn happy_reduction_236(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_237(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 69, happy_reduction_237, i) } fn happy_reduction_237(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| CDeclrR::from_var(happy_var_1, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_238(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 69, happy_reduction_238, i) } fn happy_reduction_238(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_2), HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_1))) => { with_pos!(p, happy_var_1, |at| { happy_var_2(CDeclrR::from_var(happy_var_1, at)) }) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_239(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 69, happy_reduction_239, i) } fn happy_reduction_239(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_240(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 70, happy_reduction_240, i) } fn happy_reduction_240(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_241(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 70, happy_reduction_241, i) } fn happy_reduction_241(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_2.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_242(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 70, happy_reduction_242, i) } fn happy_reduction_242(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_2, |at| happy_var_3.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_243(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 70, happy_reduction_243, i) } fn happy_reduction_243(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_244(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 70, happy_reduction_244, i) } fn happy_reduction_244(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_3, |at| happy_var_4.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_245(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 71, happy_reduction_245, i) } fn happy_reduction_245(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_246(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 71, happy_reduction_246, i) } fn happy_reduction_246(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_4), _, HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_4(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_247(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 71, happy_reduction_247, i) } fn happy_reduction_247(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3.append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_248(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 71, happy_reduction_248, i) } fn happy_reduction_248(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_5), _, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_5(happy_var_3).append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_249(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 72, happy_reduction_249, i) } fn happy_reduction_249(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_250(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 72, happy_reduction_250, i) } fn happy_reduction_250(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_251(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 72, happy_reduction_251, i) } fn happy_reduction_251(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_4), _, HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_4.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_252(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 72, happy_reduction_252, i) } fn happy_reduction_252(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_5), _, HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_3, |at| happy_var_5.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_253(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 72, happy_reduction_253, i) } fn happy_reduction_253(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_2.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_254(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 72, happy_reduction_254, i) } fn happy_reduction_254(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_255(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 72, happy_reduction_255, i) } fn happy_reduction_255(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_3, |at| happy_var_4.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_256(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 73, happy_reduction_256, i) } fn happy_reduction_256(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_257(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 73, happy_reduction_257, i) } fn happy_reduction_257(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT88(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_258(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 73, happy_reduction_258, i) } fn happy_reduction_258(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_4), _, HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_4(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_259(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 74, happy_reduction_259, i) } fn happy_reduction_259(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_1)) => { with_pos!(p, &happy_var_1, |at| CDeclrR::from_var(happy_var_1, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_260(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 74, happy_reduction_260, i) } fn happy_reduction_260(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_261(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 75, happy_reduction_261, i) } fn happy_reduction_261(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_262(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 75, happy_reduction_262, i) } fn happy_reduction_262(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_263(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 76, happy_reduction_263, i) } fn happy_reduction_263(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_264(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 76, happy_reduction_264, i) } fn happy_reduction_264(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_2.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_265(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 76, happy_reduction_265, i) } fn happy_reduction_265(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_2, |at| happy_var_3.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_266(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 76, happy_reduction_266, i) } fn happy_reduction_266(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_267(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 76, happy_reduction_267, i) } fn happy_reduction_267(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_3, |at| happy_var_4.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_268(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 77, happy_reduction_268, i) } fn happy_reduction_268(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT88(mut happy_var_2), HappyAbsSyn::NT66(mut happy_var_1)) => HappyAbsSyn::NT66({happy_var_2(happy_var_1)}), _ => unreachable!() } } fn happy_reduce_269(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 77, happy_reduction_269, i) } fn happy_reduction_269(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_270(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 77, happy_reduction_270, i) } fn happy_reduction_270(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_4), _, HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_4(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_271(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 77, happy_reduction_271, i) } fn happy_reduction_271(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3.append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_272(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 77, happy_reduction_272, i) } fn happy_reduction_272(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_5), _, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_5(happy_var_3).append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_273(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 78, happy_reduction_273, i) } fn happy_reduction_273(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| CDeclrR::from_var(happy_var_1, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_274(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 78, happy_reduction_274, i) } fn happy_reduction_274(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_275(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 78, happy_reduction_275, i) } fn happy_reduction_275(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3.append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_276(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 79, happy_reduction_276, i) } fn happy_reduction_276(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT11({happy_var_1.reverse()}), _ => unreachable!() } } fn happy_reduce_277(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 80, happy_reduction_277, i) } fn happy_reduction_277(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_278(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 80, happy_reduction_278, i) } fn happy_reduction_278(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_2.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_279(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 80, happy_reduction_279, i) } fn happy_reduction_279(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_280(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 81, happy_reduction_280, i) } fn happy_reduction_280(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT21(mut happy_var_3), _, HappyAbsSyn::NT66(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_1.fun_declr(Left(happy_var_3), vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_281(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 81, happy_reduction_281, i) } fn happy_reduction_281(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_282(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 81, happy_reduction_282, i) } fn happy_reduction_282(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_4), _, HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_4(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_283(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 82, happy_reduction_283(), i) } fn happy_reduction_283() -> HappyAbsSyn { HappyAbsSyn::NT82((vec![], false)) } fn happy_reduce_284(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 82, happy_reduction_284, i) } fn happy_reduction_284(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT33(mut happy_var_1) => HappyAbsSyn::NT82({(happy_var_1, false)}), _ => unreachable!() } } fn happy_reduce_285(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 82, happy_reduction_285, i) } fn happy_reduction_285(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, _, HappyAbsSyn::NT33(mut happy_var_1)) => HappyAbsSyn::NT82({(happy_var_1, true)}), _ => unreachable!() } } fn happy_reduce_286(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 83, happy_reduction_286, i) } fn happy_reduction_286(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT32(mut happy_var_1) => HappyAbsSyn::NT33({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_287(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 83, happy_reduction_287, i) } fn happy_reduction_287(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::NT33(mut happy_var_1)) => HappyAbsSyn::NT33({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_288(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 84, happy_reduction_288, i) } fn happy_reduction_288(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT37(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_289(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 84, happy_reduction_289, i) } fn happy_reduction_289(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_290(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_290, i) } fn happy_reduction_290(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_291(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_291, i) } fn happy_reduction_291(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_292(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 84, happy_reduction_292, i) } fn happy_reduction_292(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT37(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_293(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 84, happy_reduction_293, i) } fn happy_reduction_293(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_294(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_294, i) } fn happy_reduction_294(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_295(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 84, happy_reduction_295, i) } fn happy_reduction_295(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT37(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_296(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 84, happy_reduction_296, i) } fn happy_reduction_296(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_297(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_297, i) } fn happy_reduction_297(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_298(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_298, i) } fn happy_reduction_298(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_299(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 84, happy_reduction_299, i) } fn happy_reduction_299(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT65(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(lift_type_quals(happy_var_1), vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_300(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 84, happy_reduction_300, i) } fn happy_reduction_300(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_301(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 84, happy_reduction_301, i) } fn happy_reduction_301(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(lift_type_quals(happy_var_1), vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_302(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 84, happy_reduction_302, i) } fn happy_reduction_302(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(lift_type_quals(happy_var_1), vec![(Some(happy_var_2.append_attrs(happy_var_3).reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_303(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 85, happy_reduction_303, i) } fn happy_reduction_303(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1)) => HappyAbsSyn::NT21({vec![happy_var_1]}), _ => unreachable!() } } fn happy_reduce_304(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 85, happy_reduction_304, i) } fn happy_reduction_304(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_3)), _, HappyAbsSyn::NT21(mut happy_var_1)) => HappyAbsSyn::NT21({appended(happy_var_1, happy_var_3)}), _ => unreachable!() } } fn happy_reduce_305(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 86, happy_reduction_305, i) } fn happy_reduction_305(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT37(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_306(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 86, happy_reduction_306, i) } fn happy_reduction_306(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT37(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(happy_var_1, vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_307(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 86, happy_reduction_307, i) } fn happy_reduction_307(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(add_vecs(lift_type_quals(happy_var_1), lift_attrs(happy_var_2)), vec![], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_308(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 86, happy_reduction_308, i) } fn happy_reduction_308(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::NT65(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CDecl(lift_type_quals(happy_var_1), vec![(Some(happy_var_2.reverse()), None, None)], at)) }.map(HappyAbsSyn::NT32), _ => panic!("irrefutable pattern") } } fn happy_reduce_309(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 87, happy_reduction_309, i) } fn happy_reduction_309(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_310(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 87, happy_reduction_310, i) } fn happy_reduction_310(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT66(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1}), _ => unreachable!() } } fn happy_reduce_311(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 87, happy_reduction_311, i) } fn happy_reduction_311(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT88(mut happy_var_1) => HappyAbsSyn::NT66({happy_var_1(CDeclrR::empty())}), _ => unreachable!() } } fn happy_reduce_312(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 88, happy_reduction_312, i) } fn happy_reduction_312(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT88(mut happy_var_1) => HappyAbsSyn::NT88({happy_var_1}), _ => unreachable!() } } fn happy_reduce_313(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 88, happy_reduction_313, i) } fn happy_reduction_313(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT82(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| { let a: Box<FnBox(Box<CDeclrR>) -> Box<CDeclrR>> = box move |declr: Box<CDeclrR>| { let (params, variadic) = happy_var_2; declr.fun_declr(Right((params, variadic)), vec![], at) }; a }) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_314(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 89, happy_reduction_314, i) } fn happy_reduction_314(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT88(mut happy_var_1) => HappyAbsSyn::NT88({happy_var_1}), _ => unreachable!() } } fn happy_reduce_315(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 89, happy_reduction_315, i) } fn happy_reduction_315(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT88(mut happy_var_2), HappyAbsSyn::NT88(mut happy_var_1)) => HappyAbsSyn::NT88({box |decl| { happy_var_2(happy_var_1(decl)) }}), _ => unreachable!() } } fn happy_reduce_316(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 90, happy_reduction_316, i) } fn happy_reduction_316(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT124(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| { let a: Box<FnBox(Box<CDeclrR>) -> Box<CDeclrR>> = box |declr: Box<CDeclrR>| { declr.arr_declr(vec![], false, false, happy_var_2, at) }; a }) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_317(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 90, happy_reduction_317, i) } fn happy_reduction_317(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT124(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_2, |at, declr| declr.arr_declr(vec![], false, false, happy_var_3, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_318(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 90, happy_reduction_318, i) } fn happy_reduction_318(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT124(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| { let a: Box<FnBox(Box<CDeclrR>) -> Box<CDeclrR>> = box |declr: Box<CDeclrR>| declr.arr_declr(happy_var_2, false, false, happy_var_3, at); a }) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_319(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 90, happy_reduction_319, i) } fn happy_reduction_319(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT124(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_3, |at, declr| declr.arr_declr(happy_var_2, false, false, happy_var_4, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_320(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 90, happy_reduction_320, i) } fn happy_reduction_320(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_4), HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_3, |at, declr| declr.arr_declr(vec![], false, true, Some(happy_var_4), at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_321(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 90, happy_reduction_321, i) } fn happy_reduction_321(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_5), HappyAbsSyn::NT132(mut happy_var_4), HappyAbsSyn::NT65(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_4, |at, declr| declr.arr_declr(happy_var_3, false, true, Some(happy_var_5), at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_322(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 90, happy_reduction_322, i) } fn happy_reduction_322(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_6), HappyAbsSyn::NT132(mut happy_var_5), _, HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, add_vecs(happy_var_3, happy_var_5), |at, declr| declr.arr_declr(happy_var_2, false, true, Some(happy_var_6), at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_323(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 90, happy_reduction_323, i) } fn happy_reduction_323(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT132(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_3, |at, declr| declr.arr_declr(vec![], true, false, None, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_324(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 90, happy_reduction_324, i) } fn happy_reduction_324(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT132(mut happy_var_4), _, HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, add_vecs(happy_var_2, happy_var_4), |at, declr| declr.arr_declr(vec![], true, false, None, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_325(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 90, happy_reduction_325, i) } fn happy_reduction_325(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT132(mut happy_var_4), _, HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, happy_var_4, |at, declr| declr.arr_declr(happy_var_2, true, false, None, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_326(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 90, happy_reduction_326, i) } fn happy_reduction_326(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT132(mut happy_var_5), _, HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute_postfix(happy_var_1, add_vecs(happy_var_3, happy_var_5), |at, declr| declr.arr_declr(happy_var_2, true, false, None, at)) }.map(HappyAbsSyn::NT88), _ => panic!("irrefutable pattern") } } fn happy_reduce_327(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 91, happy_reduction_327, i) } fn happy_reduction_327(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| CDeclrR::empty().ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_328(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 91, happy_reduction_328, i) } fn happy_reduction_328(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_3, |at| CDeclrR::empty().ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_329(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 91, happy_reduction_329, i) } fn happy_reduction_329(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_2.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_330(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 91, happy_reduction_330, i) } fn happy_reduction_330(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT65(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| happy_var_3.ptr_declr(happy_var_2, at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_331(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 91, happy_reduction_331, i) } fn happy_reduction_331(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_2, |at| CDeclrR::empty().ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_332(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 91, happy_reduction_332, i) } fn happy_reduction_332(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { p.with_attribute(happy_var_1, happy_var_2, |at| happy_var_3.ptr_declr(vec![], at)) }.map(HappyAbsSyn::NT66), _ => panic!("irrefutable pattern") } } fn happy_reduce_333(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 92, happy_reduction_333, i) } fn happy_reduction_333(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_334(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 92, happy_reduction_334, i) } fn happy_reduction_334(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT66(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2}), _ => unreachable!() } } fn happy_reduce_335(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 92, happy_reduction_335, i) } fn happy_reduction_335(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT88(mut happy_var_2), _) => HappyAbsSyn::NT66({happy_var_2(CDeclrR::empty())}), _ => unreachable!() } } fn happy_reduce_336(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 92, happy_reduction_336, i) } fn happy_reduction_336(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_4), _, HappyAbsSyn::NT66(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_4(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_337(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 92, happy_reduction_337, i) } fn happy_reduction_337(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3.append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_338(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 92, happy_reduction_338, i) } fn happy_reduction_338(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3.append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_339(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 92, happy_reduction_339, i) } fn happy_reduction_339(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT88(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_3(CDeclrR::empty()).append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_340(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 92, happy_reduction_340, i) } fn happy_reduction_340(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT88(mut happy_var_5), _, HappyAbsSyn::NT66(mut happy_var_3), HappyAbsSyn::NT132(mut happy_var_2), _) => { p.stack.push(HappyAbsSyn::NT66({happy_var_5(happy_var_3).append_attrs(happy_var_2)})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_341(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 92, happy_reduction_341, i) } fn happy_reduction_341(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT66(mut happy_var_1)) => HappyAbsSyn::NT66({happy_var_1.append_attrs(happy_var_2)}), _ => unreachable!() } } fn happy_reduce_342(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 93, happy_reduction_342, i) } fn happy_reduction_342(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT100(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| box CInitExpr(happy_var_1, at)) }.map(HappyAbsSyn::NT93), _ => panic!("irrefutable pattern") } } fn happy_reduce_343(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 93, happy_reduction_343, i) } fn happy_reduction_343(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT95(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CInitList(happy_var_2, at)) }.map(HappyAbsSyn::NT93), _ => panic!("irrefutable pattern") } } fn happy_reduce_344(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 93, happy_reduction_344, i) } fn happy_reduction_344(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT95(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CInitList(happy_var_2, at)) }.map(HappyAbsSyn::NT93), _ => panic!("irrefutable pattern") } } fn happy_reduce_345(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 94, happy_reduction_345(), i) } fn happy_reduction_345() -> HappyAbsSyn { HappyAbsSyn::NT94(None) } fn happy_reduce_346(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 94, happy_reduction_346, i) } fn happy_reduction_346(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT93(mut happy_var_2), _) => HappyAbsSyn::NT94({Some(happy_var_2)}), _ => unreachable!() } } fn happy_reduce_347(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 95, happy_reduction_347(), i) } fn happy_reduction_347() -> HappyAbsSyn { HappyAbsSyn::NT95(vec![]) } fn happy_reduce_348(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 95, happy_reduction_348, i) } fn happy_reduction_348(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT93(mut happy_var_1) => HappyAbsSyn::NT95({vec![(vec![], happy_var_1)]}), _ => unreachable!() } } fn happy_reduce_349(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 95, happy_reduction_349, i) } fn happy_reduction_349(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT93(mut happy_var_2), HappyAbsSyn::NT96(mut happy_var_1)) => HappyAbsSyn::NT95({vec![(happy_var_1, happy_var_2)]}), _ => unreachable!() } } fn happy_reduce_350(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 95, happy_reduction_350, i) } fn happy_reduction_350(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT93(mut happy_var_3), _, HappyAbsSyn::NT95(mut happy_var_1)) => HappyAbsSyn::NT95({appended(happy_var_1, (vec![], happy_var_3))}), _ => unreachable!() } } fn happy_reduce_351(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 4, 95, happy_reduction_351, i) } fn happy_reduction_351(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT93(mut happy_var_4), HappyAbsSyn::NT96(mut happy_var_3), _, HappyAbsSyn::NT95(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT95({appended(happy_var_1, (happy_var_3, happy_var_4))})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_352(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 96, happy_reduction_352, i) } fn happy_reduction_352(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT96(mut happy_var_1)) => HappyAbsSyn::NT96({happy_var_1}), _ => unreachable!() } } fn happy_reduce_353(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 96, happy_reduction_353, i) } fn happy_reduction_353(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT131(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| vec![CMemberDesig(happy_var_1, at)]) }.map(HappyAbsSyn::NT96), _ => panic!("irrefutable pattern") } } fn happy_reduce_354(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 96, happy_reduction_354, i) } fn happy_reduction_354(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT98(mut happy_var_1) => HappyAbsSyn::NT96({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_355(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 97, happy_reduction_355, i) } fn happy_reduction_355(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT98(mut happy_var_1) => HappyAbsSyn::NT96({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_356(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 97, happy_reduction_356, i) } fn happy_reduction_356(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT98(mut happy_var_2), HappyAbsSyn::NT96(mut happy_var_1)) => HappyAbsSyn::NT96({appended(happy_var_1, *happy_var_2)}), _ => unreachable!() } } fn happy_reduce_357(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 98, happy_reduction_357, i) } fn happy_reduction_357(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CArrDesig(happy_var_2, at)) }.map(HappyAbsSyn::NT98), _ => panic!("irrefutable pattern") } } fn happy_reduce_358(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 98, happy_reduction_358, i) } fn happy_reduction_358(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CMemberDesig(happy_var_2, at)) }.map(HappyAbsSyn::NT98), _ => panic!("irrefutable pattern") } } fn happy_reduce_359(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 98, happy_reduction_359, i) } fn happy_reduction_359(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT98(mut happy_var_1) => HappyAbsSyn::NT98({happy_var_1}), _ => unreachable!() } } fn happy_reduce_360(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 99, happy_reduction_360, i) } fn happy_reduction_360(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_4), _, HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CRangeDesig(happy_var_2, happy_var_4, at)) }.map(HappyAbsSyn::NT98), _ => panic!("irrefutable pattern") } } fn happy_reduce_361(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 100, happy_reduction_361, i) } fn happy_reduction_361(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CVar(happy_var_1, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_362(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 100, happy_reduction_362, i) } fn happy_reduction_362(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT127(mut happy_var_1) => HappyAbsSyn::NT100({box CConst(happy_var_1)}), _ => unreachable!() } } fn happy_reduce_363(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 100, happy_reduction_363, i) } fn happy_reduction_363(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT128(mut happy_var_1) => HappyAbsSyn::NT100({box CConst(box CConstant::from_strlit(*happy_var_1))}), _ => unreachable!() } } fn happy_reduce_364(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 100, happy_reduction_364, i) } fn happy_reduction_364(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, HappyAbsSyn::NT100(mut happy_var_2), _) => HappyAbsSyn::NT100({happy_var_2}), _ => unreachable!() } } fn happy_reduce_365(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 100, happy_reduction_365, i) } fn happy_reduction_365(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT101(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CGenericSelection(happy_var_3, happy_var_5, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_366(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 100, happy_reduction_366, i) } fn happy_reduction_366(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT12(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CStatExpr(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_367(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 100, happy_reduction_367, i) } fn happy_reduction_367(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBuiltinExpr(box CBuiltinVaArg(happy_var_3, happy_var_5, at))) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_368(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 100, happy_reduction_368, i) } fn happy_reduction_368(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT96(mut happy_var_5), _, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBuiltinExpr(box CBuiltinOffsetOf(happy_var_3, happy_var_5, at))) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_369(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 100, happy_reduction_369, i) } fn happy_reduction_369(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_5), _, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBuiltinExpr(box CBuiltinTypesCompatible(happy_var_3, happy_var_5, at))) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_370(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 100, happy_reduction_370, i) } fn happy_reduction_370(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBuiltinExpr(box CBuiltinConvertVector(happy_var_3, happy_var_5, at))) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_371(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 101, happy_reduction_371, i) } fn happy_reduction_371(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT102(mut happy_var_3), _, HappyAbsSyn::NT101(mut happy_var_1)) => HappyAbsSyn::NT101({appended(happy_var_1, happy_var_3)}), _ => unreachable!() } } fn happy_reduce_372(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 101, happy_reduction_372, i) } fn happy_reduction_372(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT102(mut happy_var_1) => HappyAbsSyn::NT101({vec![happy_var_1]}), _ => unreachable!() } } fn happy_reduce_373(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 102, happy_reduction_373, i) } fn happy_reduction_373(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT32(mut happy_var_1)) => HappyAbsSyn::NT102({(Some(happy_var_1), happy_var_3)}), _ => unreachable!() } } fn happy_reduce_374(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 102, happy_reduction_374, i) } fn happy_reduction_374(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, _) => HappyAbsSyn::NT102({(None, happy_var_3)}), _ => unreachable!() } } fn happy_reduce_375(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 103, happy_reduction_375, i) } fn happy_reduction_375(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::NT131(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| vec![CMemberDesig(happy_var_1, at)]) }.map(HappyAbsSyn::NT96), _ => panic!("irrefutable pattern") } } fn happy_reduce_376(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 103, happy_reduction_376, i) } fn happy_reduction_376(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_3), _, HappyAbsSyn::NT96(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| appended(happy_var_1, CMemberDesig(happy_var_3, at))) }.map(HappyAbsSyn::NT96), _ => panic!("irrefutable pattern") } } fn happy_reduce_377(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 103, happy_reduction_377, i) } fn happy_reduction_377(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT96(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| appended(happy_var_1, CArrDesig(happy_var_3, at))) }.map(HappyAbsSyn::NT96), _ => panic!("irrefutable pattern") } } fn happy_reduce_378(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 104, happy_reduction_378, i) } fn happy_reduction_378(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_379(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 104, happy_reduction_379, i) } fn happy_reduction_379(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CIndex(happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_380(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 104, happy_reduction_380, i) } fn happy_reduction_380(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCall(happy_var_1, vec![], at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_381(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 104, happy_reduction_381, i) } fn happy_reduction_381(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT105(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCall(happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_382(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 104, happy_reduction_382, i) } fn happy_reduction_382(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CMember(happy_var_1, happy_var_3, false, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_383(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 104, happy_reduction_383, i) } fn happy_reduction_383(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CMember(happy_var_1, happy_var_3, true, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_384(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 104, happy_reduction_384, i) } fn happy_reduction_384(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CUnary(CPostIncOp, happy_var_1, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_385(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 104, happy_reduction_385, i) } fn happy_reduction_385(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CUnary(CPostDecOp, happy_var_1, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_386(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 6, 104, happy_reduction_386, i) } fn happy_reduction_386(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT95(mut happy_var_5), _, _, HappyAbsSyn::NT32(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCompoundLit(happy_var_2, happy_var_5, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_387(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 7, 104, happy_reduction_387, i) } fn happy_reduction_387(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT95(mut happy_var_5), _, _, HappyAbsSyn::NT32(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCompoundLit(happy_var_2, happy_var_5, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_388(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 105, happy_reduction_388, i) } fn happy_reduction_388(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT105({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_389(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 105, happy_reduction_389, i) } fn happy_reduction_389(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT105(mut happy_var_1)) => HappyAbsSyn::NT105({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_390(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 106, happy_reduction_390, i) } fn happy_reduction_390(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_391(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_391, i) } fn happy_reduction_391(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CUnary(CPreIncOp, happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_392(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_392, i) } fn happy_reduction_392(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CUnary(CPreDecOp, happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_393(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 106, happy_reduction_393, i) } fn happy_reduction_393(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_2), _) => HappyAbsSyn::NT100({happy_var_2}), _ => unreachable!() } } fn happy_reduce_394(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_394, i) } fn happy_reduction_394(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::NT107(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CUnary(happy_var_1.into_inner(), happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_395(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_395, i) } fn happy_reduction_395(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CSizeofExpr(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_396(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 106, happy_reduction_396, i) } fn happy_reduction_396(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CSizeofType(happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_397(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_397, i) } fn happy_reduction_397(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAlignofExpr(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_398(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 106, happy_reduction_398, i) } fn happy_reduction_398(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT32(mut happy_var_3), _, HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAlignofType(happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_399(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_399, i) } fn happy_reduction_399(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CComplexReal(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_400(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_400, i) } fn happy_reduction_400(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CComplexImag(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_401(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 106, happy_reduction_401, i) } fn happy_reduction_401(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT131(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CLabAddrExpr(happy_var_2, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_402(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_402, i) } fn happy_reduction_402(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CAdrOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_403(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_403, i) } fn happy_reduction_403(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CIndOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_404(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_404, i) } fn happy_reduction_404(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CPlusOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_405(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_405, i) } fn happy_reduction_405(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CMinOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_406(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_406, i) } fn happy_reduction_406(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CCompOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_407(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 107, happy_reduction_407, i) } fn happy_reduction_407(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT107({Located::new(CNegOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_408(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 108, happy_reduction_408, i) } fn happy_reduction_408(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_409(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 108, happy_reduction_409, i) } fn happy_reduction_409(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_4), _, HappyAbsSyn::NT32(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCast(happy_var_2, happy_var_4, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_410(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 109, happy_reduction_410, i) } fn happy_reduction_410(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_411(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 109, happy_reduction_411, i) } fn happy_reduction_411(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CMulOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_412(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 109, happy_reduction_412, i) } fn happy_reduction_412(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CDivOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_413(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 109, happy_reduction_413, i) } fn happy_reduction_413(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CRmdOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_414(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 110, happy_reduction_414, i) } fn happy_reduction_414(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_415(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 110, happy_reduction_415, i) } fn happy_reduction_415(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CAddOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_416(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 110, happy_reduction_416, i) } fn happy_reduction_416(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CSubOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_417(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 111, happy_reduction_417, i) } fn happy_reduction_417(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_418(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 111, happy_reduction_418, i) } fn happy_reduction_418(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CShlOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_419(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 111, happy_reduction_419, i) } fn happy_reduction_419(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CShrOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_420(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 112, happy_reduction_420, i) } fn happy_reduction_420(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_421(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 112, happy_reduction_421, i) } fn happy_reduction_421(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CLeOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_422(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 112, happy_reduction_422, i) } fn happy_reduction_422(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CGrOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_423(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 112, happy_reduction_423, i) } fn happy_reduction_423(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CLeqOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_424(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 112, happy_reduction_424, i) } fn happy_reduction_424(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CGeqOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_425(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 113, happy_reduction_425, i) } fn happy_reduction_425(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_426(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 113, happy_reduction_426, i) } fn happy_reduction_426(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CEqOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_427(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 113, happy_reduction_427, i) } fn happy_reduction_427(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CNeqOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_428(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 114, happy_reduction_428, i) } fn happy_reduction_428(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_429(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 114, happy_reduction_429, i) } fn happy_reduction_429(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CAndOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_430(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 115, happy_reduction_430, i) } fn happy_reduction_430(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_431(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 115, happy_reduction_431, i) } fn happy_reduction_431(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CXorOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_432(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 116, happy_reduction_432, i) } fn happy_reduction_432(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_433(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 116, happy_reduction_433, i) } fn happy_reduction_433(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(COrOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_434(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 117, happy_reduction_434, i) } fn happy_reduction_434(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_435(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 117, happy_reduction_435, i) } fn happy_reduction_435(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CLndOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_436(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 118, happy_reduction_436, i) } fn happy_reduction_436(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_437(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 118, happy_reduction_437, i) } fn happy_reduction_437(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CBinary(CLorOp, happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_438(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 119, happy_reduction_438, i) } fn happy_reduction_438(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_439(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 5, 119, happy_reduction_439, i) } fn happy_reduction_439(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_5), _, HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCond(happy_var_1, Some(happy_var_3), happy_var_5, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_440(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 119, happy_reduction_440, i) } fn happy_reduction_440(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_4), _, _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CCond(happy_var_1, None, happy_var_4, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_441(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 120, happy_reduction_441, i) } fn happy_reduction_441(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_442(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 120, happy_reduction_442, i) } fn happy_reduction_442(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT100(mut happy_var_3), HappyAbsSyn::NT121(mut happy_var_2), HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| box CAssign(happy_var_2.into_inner(), happy_var_1, happy_var_3, at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_443(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_443, i) } fn happy_reduction_443(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CAssignOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_444(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_444, i) } fn happy_reduction_444(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CMulAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_445(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_445, i) } fn happy_reduction_445(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CDivAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_446(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_446, i) } fn happy_reduction_446(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CRmdAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_447(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_447, i) } fn happy_reduction_447(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CAddAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_448(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_448, i) } fn happy_reduction_448(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CSubAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_449(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_449, i) } fn happy_reduction_449(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CShlAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_450(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_450, i) } fn happy_reduction_450(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CShrAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_451(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_451, i) } fn happy_reduction_451(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CAndAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_452(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_452, i) } fn happy_reduction_452(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(CXorAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_453(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 121, happy_reduction_453, i) } fn happy_reduction_453(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT121({Located::new(COrAssOp, happy_var_1)}), _ => unreachable!() } } fn happy_reduce_454(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 122, happy_reduction_454, i) } fn happy_reduction_454(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_455(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 122, happy_reduction_455, i) } fn happy_reduction_455(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT105(mut happy_var_3), _, HappyAbsSyn::NT100(mut happy_var_1)) => { with_pos!(p, happy_var_3, |at| box CComma(prepend(*happy_var_1, happy_var_3), at)) }.map(HappyAbsSyn::NT100), _ => panic!("irrefutable pattern") } } fn happy_reduce_456(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 123, happy_reduction_456, i) } fn happy_reduction_456(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT105({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_457(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 123, happy_reduction_457, i) } fn happy_reduction_457(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT105(mut happy_var_1)) => HappyAbsSyn::NT105({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_458(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 124, happy_reduction_458(), i) } fn happy_reduction_458() -> HappyAbsSyn { HappyAbsSyn::NT124(None) } fn happy_reduce_459(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 124, happy_reduction_459, i) } fn happy_reduction_459(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT124({Some(happy_var_1)}), _ => unreachable!() } } fn happy_reduce_460(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 125, happy_reduction_460(), i) } fn happy_reduction_460() -> HappyAbsSyn { HappyAbsSyn::NT124(None) } fn happy_reduce_461(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 125, happy_reduction_461, i) } fn happy_reduction_461(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT124({Some(happy_var_1)}), _ => unreachable!() } } fn happy_reduce_462(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 126, happy_reduction_462, i) } fn happy_reduction_462(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT100({happy_var_1}), _ => unreachable!() } } fn happy_reduce_463(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 127, happy_reduction_463, i) } fn happy_reduction_463(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, move |at| unwrap_let! { CTokILit(_, i) = happy_var_1; box CIntConst(i, at) }) }.map(HappyAbsSyn::NT127), _ => panic!("irrefutable pattern") } } fn happy_reduce_464(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 127, happy_reduction_464, i) } fn happy_reduction_464(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, move |at| unwrap_let! { CTokCLit(_, c) = happy_var_1; box CCharConst(c, at) }) }.map(HappyAbsSyn::NT127), _ => panic!("irrefutable pattern") } } fn happy_reduce_465(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 127, happy_reduction_465, i) } fn happy_reduction_465(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, move |at| unwrap_let! { CTokFLit(_, f) = happy_var_1; box CFloatConst(f, at) }) }.map(HappyAbsSyn::NT127), _ => panic!("irrefutable pattern") } } fn happy_reduce_466(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 128, happy_reduction_466, i) } fn happy_reduction_466(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, move |at| unwrap_let! { CTokSLit(_, s) = happy_var_1; box CStringLiteral(s, at) }) }.map(HappyAbsSyn::NT128), _ => panic!("irrefutable pattern") } } fn happy_reduce_467(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 2, 128, happy_reduction_467, i) } fn happy_reduction_467(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (HappyAbsSyn::NT129(mut happy_var_2), HappyAbsSyn::Terminal(mut happy_var_1)) => { with_pos!(p, happy_var_1, move |at| unwrap_let! { CTokSLit(_, s) = happy_var_1; box CStringLiteral(CString::concat(prepend(s, happy_var_2)), at) }) }.map(HappyAbsSyn::NT128), _ => panic!("irrefutable pattern") } } fn happy_reduce_468(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 129, happy_reduction_468, i) } fn happy_reduction_468(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(mut happy_var_1) => HappyAbsSyn::NT129({unwrap_let! { CTokSLit(_, s) = happy_var_1; vec![s] }}), _ => unreachable!() } } fn happy_reduce_469(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 129, happy_reduction_469, i) } fn happy_reduction_469(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::Terminal(mut happy_var_2), HappyAbsSyn::NT129(mut happy_var_1)) => HappyAbsSyn::NT129({unwrap_let! { CTokSLit(_, s) = happy_var_2; appended(happy_var_1, s) }}), _ => unreachable!() } } fn happy_reduce_470(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 130, happy_reduction_470, i) } fn happy_reduction_470(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(CTokClangC(_, ClangCTok::CVersion(mut happy_var_1))) => HappyAbsSyn::NT130({happy_var_1}), _ => unreachable!() } } fn happy_reduce_471(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 131, happy_reduction_471, i) } fn happy_reduction_471(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1)) => HappyAbsSyn::NT131({happy_var_1}), _ => unreachable!() } } fn happy_reduce_472(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 131, happy_reduction_472, i) } fn happy_reduction_472(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::Terminal(CTokTyIdent(_, mut happy_var_1)) => HappyAbsSyn::NT131({happy_var_1}), _ => unreachable!() } } fn happy_reduce_473(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 132, happy_reduction_473(), i) } fn happy_reduction_473() -> HappyAbsSyn { HappyAbsSyn::NT132(vec![]) } fn happy_reduce_474(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 132, happy_reduction_474, i) } fn happy_reduction_474(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT132(mut happy_var_1) => HappyAbsSyn::NT132({happy_var_1}), _ => unreachable!() } } fn happy_reduce_475(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 133, happy_reduction_475, i) } fn happy_reduction_475(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT132(mut happy_var_1) => HappyAbsSyn::NT132({happy_var_1}), _ => unreachable!() } } fn happy_reduce_476(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_2(p, 133, happy_reduction_476, i) } fn happy_reduction_476(happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_2, happy_x_1) { (HappyAbsSyn::NT132(mut happy_var_2), HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT132({add_vecs(happy_var_1, happy_var_2)}), _ => unreachable!() } } fn happy_reduce_477(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 6, 134, happy_reduction_477, i) } fn happy_reduction_477(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::NT132(mut happy_var_4), _, _, _) => { p.stack.push(HappyAbsSyn::NT132({happy_var_4})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_478(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 135, happy_reduction_478, i) } fn happy_reduction_478(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT136(mut happy_var_1) => HappyAbsSyn::NT132({happy_var_1.map_or(vec![], |a| vec![*a])}), _ => unreachable!() } } fn happy_reduce_479(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 135, happy_reduction_479, i) } fn happy_reduction_479(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT136(mut happy_var_3), _, HappyAbsSyn::NT132(mut happy_var_1)) => HappyAbsSyn::NT132({if let Some(a) = happy_var_3 { appended(happy_var_1, *a) } else { happy_var_1 }}), _ => unreachable!() } } fn happy_reduce_480(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_0(p, 136, happy_reduction_480(), i) } fn happy_reduction_480() -> HappyAbsSyn { HappyAbsSyn::NT136(None) } fn happy_reduce_481(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 136, happy_reduction_481, i) } fn happy_reduction_481(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1)) => { with_pos!(p, happy_var_1, |at| Some(box CAttribute(happy_var_1, vec![], at))) }.map(HappyAbsSyn::NT136), _ => panic!("irrefutable pattern") } } fn happy_reduce_482(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 1, 136, happy_reduction_482, i) } fn happy_reduction_482(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap()) { HappyAbsSyn::Terminal(mut happy_var_1) => { with_pos!(p, happy_var_1, |at| Some(box CAttribute(Ident::internal("const".into()), vec![], at))) }.map(HappyAbsSyn::NT136), _ => panic!("irrefutable pattern") } } fn happy_reduce_483(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 4, 136, happy_reduction_483, i) } fn happy_reduction_483(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, HappyAbsSyn::NT105(mut happy_var_3), _, HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1))) => { with_pos!(p, happy_var_1, |at| Some(box CAttribute(happy_var_1, happy_var_3, at))) }.map(HappyAbsSyn::NT136), _ => panic!("irrefutable pattern") } } fn happy_reduce_484(p: &mut Parser, i: isize) -> Res<Cont> { happy_result_reduce(p, 3, 136, happy_reduction_484, i) } fn happy_reduction_484(p: &mut Parser) -> Res<HappyAbsSyn> { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, HappyAbsSyn::Terminal(CTokIdent(_, mut happy_var_1))) => { with_pos!(p, happy_var_1, |at| Some(box CAttribute(happy_var_1, vec![], at))) }.map(HappyAbsSyn::NT136), _ => panic!("irrefutable pattern") } } fn happy_reduce_485(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_1(p, 137, happy_reduction_485, i) } fn happy_reduction_485(happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_1) { HappyAbsSyn::NT100(mut happy_var_1) => HappyAbsSyn::NT105({vec![*happy_var_1]}), _ => unreachable!() } } fn happy_reduce_486(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 137, happy_reduction_486, i) } fn happy_reduction_486(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, _, _) => HappyAbsSyn::NT105({vec![]}), _ => unreachable!() } } fn happy_reduce_487(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 137, happy_reduction_487, i) } fn happy_reduction_487(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (_, _, _) => HappyAbsSyn::NT105({vec![]}), _ => unreachable!() } } fn happy_reduce_488(p: &mut Parser, i: isize) -> Res<Cont> { happy_spec_reduce_3(p, 137, happy_reduction_488, i) } fn happy_reduction_488(happy_x_3: HappyAbsSyn, happy_x_2: HappyAbsSyn, happy_x_1: HappyAbsSyn) -> HappyAbsSyn { match (happy_x_3, happy_x_2, happy_x_1) { (HappyAbsSyn::NT100(mut happy_var_3), _, HappyAbsSyn::NT105(mut happy_var_1)) => HappyAbsSyn::NT105({appended(happy_var_1, *happy_var_3)}), _ => unreachable!() } } fn happy_reduce_489(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 137, happy_reduction_489, i) } fn happy_reduction_489(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, _, _, HappyAbsSyn::NT105(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT105({happy_var_1})); } _ => panic!("irrefutable pattern") } } fn happy_reduce_490(p: &mut Parser, i: isize) -> Res<Cont> { happy_reduce(p, 5, 137, happy_reduction_490, i) } fn happy_reduction_490(p: &mut Parser) { match (p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap(), p.stack.pop().unwrap()) { (_, _, _, _, HappyAbsSyn::NT105(mut happy_var_1)) => { p.stack.push(HappyAbsSyn::NT105({happy_var_1})); } _ => panic!("irrefutable pattern") } } fn happy_new_token(p: &mut Parser) -> Res<Cont> { p.token = lex(p)?; let action = p.state; match p.token { CTokEof => action(p, 249, 249), CTokLParen(_) => action(p, 138, 138), CTokRParen(_) => action(p, 139, 139), CTokLBracket(_) => action(p, 140, 140), CTokRBracket(_) => action(p, 141, 141), CTokArrow(_) => action(p, 142, 142), CTokDot(_) => action(p, 143, 143), CTokExclam(_) => action(p, 144, 144), CTokTilde(_) => action(p, 145, 145), CTokInc(_) => action(p, 146, 146), CTokDec(_) => action(p, 147, 147), CTokPlus(_) => action(p, 148, 148), CTokMinus(_) => action(p, 149, 149), CTokStar(_) => action(p, 150, 150), CTokSlash(_) => action(p, 151, 151), CTokPercent(_) => action(p, 152, 152), CTokAmper(_) => action(p, 153, 153), CTokShiftL(_) => action(p, 154, 154), CTokShiftR(_) => action(p, 155, 155), CTokLess(_) => action(p, 156, 156), CTokLessEq(_) => action(p, 157, 157), CTokHigh(_) => action(p, 158, 158), CTokHighEq(_) => action(p, 159, 159), CTokEqual(_) => action(p, 160, 160), CTokUnequal(_) => action(p, 161, 161), CTokHat(_) => action(p, 162, 162), CTokBar(_) => action(p, 163, 163), CTokAnd(_) => action(p, 164, 164), CTokOr(_) => action(p, 165, 165), CTokQuest(_) => action(p, 166, 166), CTokColon(_) => action(p, 167, 167), CTokAssign(_) => action(p, 168, 168), CTokPlusAss(_) => action(p, 169, 169), CTokMinusAss(_) => action(p, 170, 170), CTokStarAss(_) => action(p, 171, 171), CTokSlashAss(_) => action(p, 172, 172), CTokPercAss(_) => action(p, 173, 173), CTokAmpAss(_) => action(p, 174, 174), CTokHatAss(_) => action(p, 175, 175), CTokBarAss(_) => action(p, 176, 176), CTokSLAss(_) => action(p, 177, 177), CTokSRAss(_) => action(p, 178, 178), CTokComma(_) => action(p, 179, 179), CTokSemic(_) => action(p, 180, 180), CTokLBrace(_) => action(p, 181, 181), CTokRBrace(_) => action(p, 182, 182), CTokEllipsis(_) => action(p, 183, 183), CTokAlignof(_) => action(p, 184, 184), CTokAlignas(_) => action(p, 185, 185), CTokAtomic(_) => action(p, 186, 186), CTokAsm(_) => action(p, 187, 187), CTokAuto(_) => action(p, 188, 188), CTokBreak(_) => action(p, 189, 189), CTokBool(_) => action(p, 190, 190), CTokCase(_) => action(p, 191, 191), CTokChar(_) => action(p, 192, 192), CTokConst(_) => action(p, 193, 193), CTokContinue(_) => action(p, 194, 194), CTokComplex(_) => action(p, 195, 195), CTokDefault(_) => action(p, 196, 196), CTokDo(_) => action(p, 197, 197), CTokDouble(_) => action(p, 198, 198), CTokElse(_) => action(p, 199, 199), CTokEnum(_) => action(p, 200, 200), CTokExtern(_) => action(p, 201, 201), CTokFloat(_) => action(p, 202, 202), CTokFloat128(_) => action(p, 203, 203), CTokFor(_) => action(p, 204, 204), CTokGeneric(_) => action(p, 205, 205), CTokGoto(_) => action(p, 206, 206), CTokIf(_) => action(p, 207, 207), CTokInline(_) => action(p, 208, 208), CTokInt(_) => action(p, 209, 209), CTokInt128(_) => action(p, 210, 210), CTokLong(_) => action(p, 211, 211), CTokLabel(_) => action(p, 212, 212), CTokNoreturn(_) => action(p, 213, 213), CTokNullable(_) => action(p, 214, 214), CTokNonnull(_) => action(p, 215, 215), CTokRegister(_) => action(p, 216, 216), CTokRestrict(_) => action(p, 217, 217), CTokReturn(_) => action(p, 218, 218), CTokShort(_) => action(p, 219, 219), CTokSigned(_) => action(p, 220, 220), CTokSizeof(_) => action(p, 221, 221), CTokStatic(_) => action(p, 222, 222), CTokStaticAssert(_) => action(p, 223, 223), CTokStruct(_) => action(p, 224, 224), CTokSwitch(_) => action(p, 225, 225), CTokTypedef(_) => action(p, 226, 226), CTokTypeof(_) => action(p, 227, 227), CTokThread(_) => action(p, 228, 228), CTokUnion(_) => action(p, 229, 229), CTokUnsigned(_) => action(p, 230, 230), CTokVoid(_) => action(p, 231, 231), CTokVolatile(_) => action(p, 232, 232), CTokWhile(_) => action(p, 233, 233), CTokCLit(_, _) => action(p, 234, 234), CTokILit(_, _) => action(p, 235, 235), CTokFLit(_, _) => action(p, 236, 236), CTokSLit(_, _) => action(p, 237, 237), CTokIdent(_, _) => action(p, 238, 238), CTokTyIdent(_, _) => action(p, 239, 239), CTokGnuC(_, GnuCTok::Attr) => action(p, 240, 240), CTokGnuC(_, GnuCTok::Ext) => action(p, 241, 241), CTokGnuC(_, GnuCTok::ComplexReal) => action(p, 242, 242), CTokGnuC(_, GnuCTok::ComplexImag) => action(p, 243, 243), CTokGnuC(_, GnuCTok::VaArg) => action(p, 244, 244), CTokGnuC(_, GnuCTok::Offsetof) => action(p, 245, 245), CTokGnuC(_, GnuCTok::TyCompat) => action(p, 246, 246), CTokClangC(_, ClangCTok::ConvertVector) => action(p, 247, 247), CTokClangC(_, ClangCTok::CVersion(_)) => action(p, 248, 248), } } fn happy_error_<T>(p: &mut Parser, _: isize) -> Res<T> { happy_error(p) } pub fn translation_unit(p: &mut Parser) -> Res<Box<CTranslUnit>> { let x = happy_parse(p, action_0)?; match x { HappyAbsSyn::NT7(z) => Ok(z), _ => unreachable!() } } pub fn external_declaration(p: &mut Parser) -> Res<Box<CExtDecl>> { let x = happy_parse(p, action_1)?; match x { HappyAbsSyn::NT9(z) => Ok(z), _ => unreachable!() } } pub fn statement(p: &mut Parser) -> Res<Box<CStat>> { let x = happy_parse(p, action_2)?; match x { HappyAbsSyn::NT12(z) => Ok(z), _ => unreachable!() } } pub fn expression(p: &mut Parser) -> Res<Box<CExpr>> { let x = happy_parse(p, action_3)?; match x { HappyAbsSyn::NT100(z) => Ok(z), _ => unreachable!() } } #[inline] fn rev_vec<T>(mut a: Vec<T>) -> Vec<T> { a.reverse(); a } #[inline] fn prepend<T>(t: T, mut a: Vec<T>) -> Vec<T> { a.insert(0, t); a } #[inline] fn add_vecs<T>(mut a: Vec<T>, mut b: Vec<T>) -> Vec<T> { a.append(&mut b); a } #[inline] fn appended<T>(mut a: Vec<T>, b: T) -> Vec<T> { a.push(b); a } #[inline] fn map<T, U, F: Fn(T) -> U>(f: F, a: Vec<T>) -> Vec<U> { a.into_iter().map(f).collect() } #[inline] fn lift_type_quals(quals: Vec<CTypeQual>) -> Vec<CDeclSpec> { map(CTypeQual, quals) } #[inline] fn lift_attrs(attrs: Vec<CAttribute<NodeInfo>>) -> Vec<CDeclSpec> { map(|attr| CTypeQual(CAttrQual(box attr)), attrs) } #[inline] fn append_obj_attrs(mut new_attrs: Vec<CAttr>, mut declr: Box<CDeclr>) -> Box<CDeclr> { declr.3.append(&mut new_attrs); declr } fn add_trailing_attrs(mut declspecs: Vec<CDeclSpec>, mut new_attrs: Vec<CAttr>) -> Vec<CDeclSpec> { let is_new = match declspecs.last_mut() { Some(&mut CTypeSpec(CSUType(box CStructureUnion(_, _, _, ref mut def_attrs, _), _))) => { def_attrs.append(&mut new_attrs); false } Some(&mut CTypeSpec(CEnumType(box CEnumeration(_, _, ref mut def_attrs, _), _))) => { def_attrs.append(&mut new_attrs); false } _ => true }; if is_new { declspecs.append(&mut lift_attrs(new_attrs)); } declspecs } fn happy_error<T>(p: &mut Parser) -> Res<T> { parse_error(p) } // Original location: "templates/GenericTemplate.hs", line 1 // ----------------------------------------------------------------------------- // Some convenient typedefs use std::mem; const ERROR_TOK: isize = 1; enum Cont { Loop(isize, isize), NewToken, Accept(isize), } // Types to be defined by the user: Token, Error, State type Res<T> = Result<T, Error>; type Action = fn(&mut Parser, isize, isize) -> Res<Cont>; type Stack = Vec<HappyAbsSyn>; pub struct Parser { pub user: State, token: Token, stack: Stack, state: Action, states: Vec<Action>, } impl Parser { pub fn exec<F, T>(initial_state: State, do_parse: F) -> Res<(State, T)> where F: FnOnce(&mut Parser) -> Res<T> { let mut parser = Parser { user: initial_state, token: EOF_TOK, state: happy_invalid, states: vec![], stack: vec![] }; let res = do_parse(&mut parser)?; Ok((parser.user, res)) } } fn happy_invalid(_: &mut Parser, _: isize, _: isize) -> Res<Cont> { panic!("parser not initialized correctly") } // ----------------------------------------------------------------------------- // Starting the parse fn happy_parse(p: &mut Parser, start_state: Action) -> Res<HappyAbsSyn> { p.state = start_state; p.states.clear(); p.stack.clear(); p.stack.push(HappyAbsSyn::ErrorToken(0)); let mut cont = Cont::NewToken; loop { cont = match cont { Cont::Loop(i, j) => (p.state)(p, i, j)?, Cont::NewToken => happy_new_token(p)?, Cont::Accept(j) => return happy_accept(p, j), } } } // ----------------------------------------------------------------------------- // Accepting the parse // // If the current token is ERROR_TOK, it means we've just accepted a partial // parse (a %partial parser). We must ignore the saved token on the top of // the stack in this case. fn happy_accept(p: &mut Parser, j: isize) -> Res<HappyAbsSyn> { match j { ERROR_TOK if p.stack.len() > 1 => { p.stack.pop(); Ok(p.stack.pop().unwrap()) } _ => Ok(p.stack.pop().unwrap()) } } // ----------------------------------------------------------------------------- // Shifting a token fn happy_shift(p: &mut Parser, new_state: Action, i: isize) -> Res<Cont> { match i { ERROR_TOK => { let x = p.stack.pop().unwrap(); let i = match x { HappyAbsSyn::ErrorToken(i) => i, _ => unreachable!(), }; p.states.push(new_state); p.state = new_state; Ok(Cont::Loop(i, i)) } _ => { p.states.push(p.state); p.stack.push(HappyAbsSyn::Terminal(mem::replace(&mut p.token, EOF_TOK))); p.state = new_state; Ok(Cont::NewToken) }, } } // ----------------------------------------------------------------------------- // happyReduce is specialised for the common cases. fn happy_spec_reduce_0(p: &mut Parser, nt: isize, val: HappyAbsSyn, j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { p.states.push(p.state); p.stack.push(val); Ok(Cont::Loop(nt, j)) }, } } fn happy_spec_reduce_1(p: &mut Parser, nt: isize, reducer: fn(HappyAbsSyn) -> HappyAbsSyn, j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { let v1 = p.stack.pop().unwrap(); p.state = *p.states.last().unwrap(); let val = reducer(v1); p.stack.push(val); Ok(Cont::Loop(nt, j)) } } } fn happy_spec_reduce_2(p: &mut Parser, nt: isize, reducer: fn(HappyAbsSyn, HappyAbsSyn) -> HappyAbsSyn, j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { let v1 = p.stack.pop().unwrap(); let v2 = p.stack.pop().unwrap(); p.states.pop(); p.state = *p.states.last().unwrap(); let val = reducer(v1, v2); p.stack.push(val); Ok(Cont::Loop(nt, j)) } } } fn happy_spec_reduce_3(p: &mut Parser, nt: isize, reducer: fn(HappyAbsSyn, HappyAbsSyn, HappyAbsSyn) -> HappyAbsSyn, j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { let v1 = p.stack.pop().unwrap(); let v2 = p.stack.pop().unwrap(); let v3 = p.stack.pop().unwrap(); p.states.pop(); p.states.pop(); p.state = *p.states.last().unwrap(); let val = reducer(v1, v2, v3); p.stack.push(val); Ok(Cont::Loop(nt, j)) } } } fn happy_reduce(p: &mut Parser, k: isize, nt: isize, reducer: fn(&mut Parser), j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { for _ in 0..k - 1 { p.states.pop(); } p.state = *p.states.last().unwrap(); reducer(p); Ok(Cont::Loop(nt, j)) } } } fn happy_result_reduce(p: &mut Parser, k: isize, nt: isize, reducer: fn(&mut Parser) -> Res<HappyAbsSyn>, j: isize) -> Res<Cont> { match j { ERROR_TOK => happy_fail(p, ERROR_TOK), j => { p.states.push(p.state); for _ in 0..k { p.states.pop(); } p.state = *p.states.last().unwrap(); let val = reducer(p)?; p.stack.push(val); Ok(Cont::Loop(nt, j)) } } } // ----------------------------------------------------------------------------- // Moving to a new state after a reduction fn happy_goto(p: &mut Parser, action: Action, j: isize) -> Res<Cont> { p.state = action; action(p, j, j) } // ----------------------------------------------------------------------------- // Error recovery (ERROR_TOK is the error token) fn happy_fail(p: &mut Parser, i: isize) -> Res<Cont> { match i { ERROR_TOK if p.stack.len() > 0 => happy_error_(p, i), i => { p.stack.push(HappyAbsSyn::ErrorToken(i)); (p.state)(p, ERROR_TOK, ERROR_TOK) }, } } // end of Happy Template.
use raylib::prelude::*; use super::game::GameStates; use crate::consts::*; use crate::gui::{gui_button::Button, gui_component::GuiComponentBehaviour, gui_cursor::Cursor}; pub struct PauseMenu<'a> { pub current_state: &'a mut GameStates, } impl PauseMenu<'_> { pub fn new(initial_state: &mut GameStates) -> PauseMenu { PauseMenu { current_state: initial_state, } } pub fn draw( &mut self, cursor: &Cursor, draw_handler: &mut RaylibDrawHandle, vignette_texture: &Texture2D, ) { let mut buttons = vec![ Button::new( "Resume".to_string(), (0, (draw_handler.get_screen_height() / 2) - 50), (150, DEFAULT_BUTTON_HEIGHT), "play".to_string(), Color::GRAY, Color::DARKGRAY, Option::None, ), Button::new( "Reset level".to_string(), (0, (draw_handler.get_screen_height() / 2)), (150, DEFAULT_BUTTON_HEIGHT), "play_reset".to_string(), Color::GRAY, Color::DARKGRAY, Option::None, ), Button::new( "Quit to menu".to_string(), (0, (draw_handler.get_screen_height() / 2) + 50), (150, DEFAULT_BUTTON_HEIGHT), "menu".to_string(), Color::GRAY, Color::DARKGRAY, Option::None, ), ]; draw_handler.draw_texture_pro( vignette_texture, Rectangle::new( 0.0, 0.0, vignette_texture.width() as f32, vignette_texture.height() as f32, ), Rectangle::new(0.0, 0.0, SCREEN_WIDTH as f32, SCREEN_HEIGHT as f32), Vector2::new(0.0, 0.0), 0.0, Color::WHITE, ); for button in buttons.iter_mut() { button.draw(&cursor, draw_handler, &mut self.current_state); } } }
mod event_logger; mod run; pub use event_logger::*; pub use run::*;
use kerla_runtime::arch::halt; use crate::{ctypes::c_int, result::Result, syscalls::SyscallHandler}; impl<'a> SyscallHandler<'a> { pub fn sys_reboot(&mut self, _magic: c_int, _magic2: c_int, _arg: usize) -> Result<isize> { info!("Halting the system by reboot(2)"); halt(); } }
use crate::components::card::{Card, Rank, Suit}; use crate::{JESTER, WIZARD}; use core::{fmt, ops}; #[derive(Clone, Eq, PartialEq, Debug)] pub struct Deck(pub Vec<Card>); impl Deck { pub fn build() -> Deck { let mut deck: Vec<Card> = Vec::new(); // Build normal 52 card deck. let ranks = [ Rank::Two, Rank::Three, Rank::Four, Rank::Five, Rank::Six, Rank::Seven, Rank::Eight, Rank::Nine, Rank::Ten, Rank::Jack, Rank::Queen, Rank::King, Rank::Ace, ]; for suit in [Suit::Club, Suit::Diamond, Suit::Heart, Suit::Spade] { for rank in ranks { deck.push(Card { rank, suit }); } } // Add 4 Wizards and 4 Jesters. for _ in 0..4 { deck.push(WIZARD); deck.push(JESTER); } Deck(deck) } } impl fmt::Display for Deck { // Return space " " separated list of cards. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.iter().fold(Ok(()), |result, card| { result.and_then(|_| write!(f, "{} ", card)) }) } } impl ops::Deref for Deck { type Target = Vec<Card>; fn deref(&self) -> &Self::Target { &self.0 } } impl ops::DerefMut for Deck { fn deref_mut(&mut self) -> &mut Self::Target { self.0.as_mut() } } #[test] pub fn test_build_deck() { let deck = Deck::build(); assert_eq!(60, deck.len()); }
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - ICACHE control register"] pub cr: CR, #[doc = "0x04 - ICACHE status register"] pub sr: SR, #[doc = "0x08 - ICACHE interrupt enable register"] pub ier: IER, #[doc = "0x0c - ICACHE flag clear register"] pub fcr: FCR, #[doc = "0x10 - ICACHE hit monitor register"] pub hmonr: HMONR, #[doc = "0x14 - ICACHE miss monitor register"] pub mmonr: MMONR, } #[doc = "CR (rw) register accessor: ICACHE control register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cr::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`cr`] module"] pub type CR = crate::Reg<cr::CR_SPEC>; #[doc = "ICACHE control register"] pub mod cr; #[doc = "SR (r) register accessor: ICACHE status register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`sr`] module"] pub type SR = crate::Reg<sr::SR_SPEC>; #[doc = "ICACHE status register"] pub mod sr; #[doc = "IER (rw) register accessor: ICACHE interrupt enable register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ier::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ier::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`ier`] module"] pub type IER = crate::Reg<ier::IER_SPEC>; #[doc = "ICACHE interrupt enable register"] pub mod ier; #[doc = "FCR (w) register accessor: ICACHE flag clear register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fcr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`fcr`] module"] pub type FCR = crate::Reg<fcr::FCR_SPEC>; #[doc = "ICACHE flag clear register"] pub mod fcr; #[doc = "HMONR (r) register accessor: ICACHE hit monitor register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`hmonr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`hmonr`] module"] pub type HMONR = crate::Reg<hmonr::HMONR_SPEC>; #[doc = "ICACHE hit monitor register"] pub mod hmonr; #[doc = "MMONR (r) register accessor: ICACHE miss monitor register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mmonr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mmonr`] module"] pub type MMONR = crate::Reg<mmonr::MMONR_SPEC>; #[doc = "ICACHE miss monitor register"] pub mod mmonr;
//! This mod keeps tabs that on the state of the app //! as well as current typing test //! main structs App and TestState use crate::colorscheme::Theme; use crate::handlers::{self, KeyHandler}; use crate::painters::*; use crate::settings::Settings; use crate::Term; use crossterm::event::KeyEvent; use std::path::PathBuf; use directories_next::ProjectDirs; use crate::typer::TestState; pub const APPLOGO: &str = " _._ _ _ | _ _>| | |(_)|<(/_\\/ / "; pub struct App<'t> { pub settings: Settings, pub test: TestState<'t>, pub theme: Theme, pub margin: u16, pub paragraph: u16, pub config: Config, pub klucznik: KeyHandler, pub painter: Painter, pub is_alive: bool, } impl<'t> App<'t> { /// returns App instance with initialized test /// basically ready to use /// perhaps this will become the new function pub fn setup() -> Self { let mut app = Self::default(); app.reset_test(); app } /// Paints to the screen using current painter pub fn paint(&mut self, terminal: &mut Term) { (self.painter)(terminal, self) } /// Performs an action based on KeyEvent /// Such action may call for changing keyhandler and painter /// which is also performed in the scope of this function /// ``` /// use crossterm::event::{KeyCode, KeyEvent}; /// use smokey::application::App; /// // app starts on the test Screen /// let mut app = App::setup(); /// /// // q in this context just counts toward the test /// app.handle_key_event(KeyEvent::from(KeyCode::Char('q'))); /// assert_eq!(app.test.done, 1); /// assert!(app.is_alive); /// /// // Esc should go back to the settings /// app.handle_key_event(KeyEvent::from(KeyCode::Esc)); /// // now q char is handled differently -> (quit app) /// app.handle_key_event(KeyEvent::from(KeyCode::Char('q'))); /// assert!(!app.is_alive); /// ``` pub fn handle_key_event(&mut self, key_event: KeyEvent) { (self.klucznik)(key_event, self) } pub fn change_to_post(&mut self) { self.painter = draw_post; self.klucznik = handlers::post::handle; } pub fn change_to_settings(&mut self) { self.painter = draw_settings; self.klucznik = handlers::settings::handle; } pub fn change_to_test(&mut self) { self.painter = draw_test_and_update; self.klucznik = handlers::typer::handle; } pub fn stop(&mut self) { self.is_alive = false; } pub fn reset_test(&mut self) { self.test.cursor_x = 1; self.test.reset(&self.settings.test_cfg); } } impl<'t> Default for App<'t> { /// Creates App instance /// the test isnt initialized though fn default() -> Self { let config = Config::default(); let settings = Settings::default(); Self { test: TestState::default(), theme: Theme::default(), is_alive: true, margin: 2, paragraph: 62, config, settings, /// unwrap wont painc because the Squad Default always returns Some painter: draw_test_and_update, klucznik: handlers::typer::handle, } } } pub struct Config { words: PathBuf, pub source: String, pub length: usize, pub freq_cut_off: usize, } impl Default for Config { fn default() -> Self { let base = ProjectDirs::from("pl", "ukmrs", "smokey") .unwrap() .data_dir() .to_path_buf(); Config { words: base.join("words"), source: String::from("english"), length: 30, freq_cut_off: 10_000, } } } impl Config { pub fn get_source(&self) -> PathBuf { self.words.join(&self.source) } }
fn main() { println!("Hello, world!"); let num = 3; if num > 5{ println!("Condition was true."); }else{ println!("Condition was false."); } let num = 5; if num % 3 == 0{ println!("Number is divisible by 3."); }else if num % 4 == 0{ println!("Number is divisible by 4"); }else if num % 5 == 0{ println!("Number is divisible by 5"); }else{ println!("Number is not divisible by 3, 4, 5."); } let condition = true; let number = if condition{ 5 }else{ 4 }; println!("The number is:{}", number); }
use wasm_bindgen::prelude::*; use super::{Camera, Euler, Ray, Vector2, Vector3}; #[wasm_bindgen(module = "three")] extern "C" { pub type BufferAttribute; #[wasm_bindgen(constructor)] pub fn new_with_f32array( array: &js_sys::Float32Array, item_size: u32, normalized: bool, ) -> BufferAttribute; #[wasm_bindgen(constructor)] pub fn new_with_u16array( array: &js_sys::Uint16Array, item_size: u32, normalized: bool, ) -> BufferAttribute; #[wasm_bindgen(method, getter, js_name = "array")] pub fn array_as_f32array(this: &BufferAttribute) -> js_sys::Float32Array; #[wasm_bindgen(method, getter, js_name = "array")] pub fn array_as_u16array(this: &BufferAttribute) -> js_sys::Uint16Array; } #[wasm_bindgen(module = "three")] extern "C" { #[wasm_bindgen(extends = EventDispatcher)] pub type BufferGeometry; #[wasm_bindgen(constructor)] pub fn new() -> BufferGeometry; #[wasm_bindgen(method, js_name = "getAttribute")] pub fn get_attribute(this: &BufferGeometry, name: &str) -> BufferAttribute; #[wasm_bindgen(method, js_name = "getIndex")] pub fn get_index(this: &BufferGeometry) -> BufferAttribute; #[wasm_bindgen(method, js_name = "setAttribute")] pub fn set_attribute( this: &BufferGeometry, name: &str, attribute: &BufferAttribute, ) -> BufferGeometry; #[wasm_bindgen(method, js_name = "setIndex")] pub fn set_index(this: &BufferGeometry, index: &BufferAttribute) -> BufferGeometry; #[wasm_bindgen(method, js_name = "setFromPoints")] pub fn set_from_points(this: &BufferGeometry, points: &js_sys::Array) -> BufferGeometry; } #[wasm_bindgen(module = "three")] extern "C" { pub type EventDispatcher; #[wasm_bindgen(constructor)] pub fn new() -> EventDispatcher; } #[wasm_bindgen(module = "three")] extern "C" { #[wasm_bindgen(extends = EventDispatcher)] pub type Object3D; #[wasm_bindgen(constructor)] pub fn new() -> Object3D; #[wasm_bindgen(method)] pub fn add(this: &Object3D, object: &Object3D); #[wasm_bindgen(method)] pub fn remove(this: &Object3D, object: &Object3D); #[wasm_bindgen(method, getter)] pub fn children(this: &Object3D) -> js_sys::Array; #[wasm_bindgen(method, getter)] pub fn position(this: &Object3D) -> Vector3; #[wasm_bindgen(method, getter)] pub fn scale(this: &Object3D) -> Vector3; #[wasm_bindgen(method, setter, js_name = "renderOrder")] pub fn set_render_order(this: &Object3D, render_order: f64); #[wasm_bindgen(method, getter)] pub fn rotation(this: &Object3D) -> Euler; #[wasm_bindgen(method, getter, js_name = "userData")] pub fn user_data(this: &Object3D) -> JsValue; #[wasm_bindgen(method, setter, js_name = "userData")] pub fn set_user_data(this: &Object3D, user_data: &JsValue); #[wasm_bindgen(method, setter, js_name = "visible")] pub fn set_visible(this: &Object3D, visible: bool); } #[wasm_bindgen(module = "three")] extern "C" { pub type Raycaster; #[wasm_bindgen(constructor)] pub fn new() -> Raycaster; #[wasm_bindgen(method, js_name = "intersectObjects")] pub fn intersect_objects(this: &Raycaster, objects: &js_sys::Array) -> js_sys::Array; #[wasm_bindgen(method, js_name = "setFromCamera")] pub fn set_from_camera(this: &Raycaster, coords: &Vector2, camera: &Camera); #[wasm_bindgen(method, getter)] pub fn ray(this: &Raycaster) -> Ray; }
pub fn run() -> u64 { let mut day = 2; let mut sunday_count = 0; for year in 1901..2001 { for month in 0..12 { if day == 0 { sunday_count += 1; } day = (day + days_in_month(month, year)) % 7; } } sunday_count } fn days_in_month(month: i32, year: i32) -> i32 { match month { 0 | 2 | 4 | 6 | 7 | 9 | 11 => 31, 3 | 5 | 8 | 10 => 30, 1 => if year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) { 29 } else { 28 }, _ => unreachable!(), } }
use crate::{Flush, ReadAt, Result, WriteAt}; use nt_native::NtString; type NtFile = nt_native::File; #[derive(Clone)] #[cfg_attr(any(feature = "std", test), derive(Debug))] pub struct File(NtFile); impl ReadAt for File { fn read_at(&self, offset: u64, buffer: &mut [u8]) -> Result<usize> { nt_native::ReadAt::read_at(&self.0, offset, buffer).map_err(From::from) } } impl WriteAt for File { fn write_at(&self, offset: u64, data: &[u8]) -> Result<usize> { nt_native::WriteAt::write_at(&self.0, offset, data).map_err(From::from) } } impl Flush for File { fn flush(&self) -> Result<()> { nt_native::Flush::flush(&self.0).map_err(From::from) } } impl File { pub fn open(path: &str) -> Result<Self> { let nt_path = NtString::from(path); NtFile::open(&nt_path).map(File).map_err(From::from) } pub fn create_preallocated(path: &str, size: u64) -> Result<Self> { let nt_path = NtString::from(path); NtFile::create_preallocated(&nt_path, size).map(File).map_err(From::from) } pub fn owerwrite_or_create(path: &str) -> Result<(Self, bool)> { let nt_path = NtString::from(path); NtFile::owerwrite_or_create(&nt_path) .map(|(nt_file, already_exists)| (File(nt_file), already_exists)) .map_err(From::from) } pub fn size(&self) -> Result<u64> { self.0.size().map_err(From::from) } }
use super::atom::common::Common; use super::atom::{ attr, btn::{self, Btn}, text::Text, }; use super::molecule::modal::{self, Modal}; use super::organism::modal_create_block_texture::{self, ModalCreateBlockTexture}; use super::organism::modal_create_terran_texture::{self, ModalCreateTerranTexture}; use crate::arena::{block, component, resource, ArenaMut, BlockKind, BlockMut, BlockRef}; use crate::libs::random_id::U128Id; use isaribi::{ style, styled::{Style, Styled}, }; use kagura::prelude::*; use nusa::prelude::*; use std::collections::HashSet; pub mod title { pub static VIEW_ALL_RESOURCE: &str = "リソース一覧"; pub static SELECT_BLOCK_TEXTURE: &str = "ブロック用のテクスチャを選択"; pub static SELECT_TEXTURE: &str = "画像を選択"; } pub struct Props { pub arena: ArenaMut, pub filter: HashSet<BlockKind>, pub world: BlockMut<block::World>, pub is_selecter: bool, pub title: String, } pub enum Msg { Sub(On), AddResource(BlockKind), EditResource(Resource), CloseModal, LoadBlockTexture(resource::BlockTexture), SelectResource(Resource), SetSelectedKind(BlockKind), SetSelectedResource(Resource), } pub enum On { Close, SelectNone, SelectImageData(BlockRef<resource::ImageData>), SelectBlockTexture(BlockRef<resource::BlockTexture>), SelectTerranTexture(BlockMut<block::TerranTexture>), SelectComponent(U128Id), UpdateBlocks { insert: HashSet<U128Id>, update: HashSet<U128Id>, }, } pub enum Resource { None, ImageData(BlockRef<resource::ImageData>), BlockTexture(BlockRef<resource::BlockTexture>), TerranTexture(BlockMut<block::TerranTexture>), BoxblockComponent(BlockMut<component::BoxblockComponent>), CraftboardComponent(BlockMut<component::CraftboardComponent>), TextboardComponent(BlockMut<component::TextboardComponent>), } impl Resource { fn id(&self) -> U128Id { match self { Self::None => U128Id::none(), Self::ImageData(data) => data.id(), Self::BlockTexture(data) => data.id(), Self::TerranTexture(data) => data.id(), Self::BoxblockComponent(data) => data.id(), Self::CraftboardComponent(data) => data.id(), Self::TextboardComponent(data) => data.id(), } } } pub struct ModalResource { arena: ArenaMut, world: BlockMut<block::World>, selected_kind: BlockKind, filter: HashSet<BlockKind>, selected_resource: Resource, is_selecter: bool, title: String, showing_modal: ShowingModal, } enum ShowingModal { None, CreateBlockTexture, CreateTerranTexture(BlockMut<block::TerranTexture>), } impl Component for ModalResource { type Props = Props; type Msg = Msg; type Event = On; } impl HtmlComponent for ModalResource {} impl Constructor for ModalResource { fn constructor(props: Props) -> Self { let selected_kind = if props.filter.is_empty() { BlockKind::ImageData } else if props.filter.contains(&BlockKind::ImageData) { BlockKind::ImageData } else if props.filter.contains(&BlockKind::BlockTexture) { BlockKind::BlockTexture } else { BlockKind::None }; Self { arena: props.arena, world: props.world, filter: props.filter, selected_kind, selected_resource: Resource::None, is_selecter: props.is_selecter, title: props.title, showing_modal: ShowingModal::None, } } } impl Update for ModalResource { fn on_load(mut self: Pin<&mut Self>, props: Props) -> Cmd<Self> { self.arena = props.arena; self.world = props.world; Cmd::none() } fn update(mut self: Pin<&mut Self>, msg: Msg) -> Cmd<Self> { match msg { Msg::Sub(sub) => Cmd::submit(sub), Msg::CloseModal => { self.showing_modal = ShowingModal::None; Cmd::none() } Msg::AddResource(kind) => match kind { BlockKind::BlockTexture => { self.showing_modal = ShowingModal::CreateBlockTexture; Cmd::none() } BlockKind::TerranTexture => { self.showing_modal = ShowingModal::CreateTerranTexture(BlockMut::none()); Cmd::none() } _ => Cmd::none(), }, Msg::EditResource(resource) => match resource { Resource::TerranTexture(block) => { self.showing_modal = ShowingModal::CreateTerranTexture(block); Cmd::none() } _ => Cmd::none(), }, Msg::LoadBlockTexture(texture) => { let texture = self.arena.insert(texture).as_ref(); let texture_id = texture.id(); self.world.update(|world| { world.push_block_texture_resource(texture); }); self.showing_modal = ShowingModal::None; Cmd::submit(On::UpdateBlocks { insert: set! { texture_id }, update: set! { self.world.id() }, }) } Msg::SetSelectedKind(kind) => { self.selected_kind = kind; Cmd::none() } Msg::SetSelectedResource(resource) => { self.selected_resource = resource; Cmd::none() } Msg::SelectResource(resource) => { crate::debug::log_1("Msg::SelectResource"); match resource { Resource::None => Cmd::submit(On::SelectNone), Resource::ImageData(data) => Cmd::submit(On::SelectImageData(data)), Resource::BlockTexture(data) => Cmd::submit(On::SelectBlockTexture(data)), Resource::TerranTexture(data) => Cmd::submit(On::SelectTerranTexture(data)), Resource::BoxblockComponent(data) => { Cmd::submit(On::SelectComponent(data.id())) } Resource::CraftboardComponent(data) => { Cmd::submit(On::SelectComponent(data.id())) } Resource::TextboardComponent(data) => { Cmd::submit(On::SelectComponent(data.id())) } _ => Cmd::none(), } } } } } impl Render<Html> for ModalResource { type Children = (); fn render(&self, _: Self::Children) -> Html { Self::styled(Modal::new( self, None, modal::Props {}, Sub::map(|sub| match sub { modal::On::Close => Msg::Sub(On::Close), }), ( self.title.clone(), String::from(""), vec![ Html::div( Attributes::new().class(Self::class("base")), Events::new(), vec![ Html::div( Attributes::new().class(Self::class("kind-list")), Events::new(), vec![ self.render_btn_to_select_kind( BlockKind::ImageData, Html::text("画像"), ), self.render_btn_to_select_kind( BlockKind::BlockTexture, Text::condense_75("ブロック用テクスチャ"), ), self.render_btn_to_select_kind( BlockKind::TerranTexture, Text::condense_75("地形用テクスチャ"), ), if self.filter.is_empty() || self.filter.contains(&BlockKind::BoxblockComponent) || self.filter.contains(&BlockKind::CraftboardComponent) || self.filter.contains(&BlockKind::TextboardComponent) { self.render_group_to_select_kind(Text::condense_75( "コンポーネント", )) } else { Html::none() }, self.render_btn_to_select_kind( BlockKind::CraftboardComponent, Html::text("盤面"), ), self.render_btn_to_select_kind( BlockKind::BoxblockComponent, Html::text("ブロック"), ), self.render_btn_to_select_kind( BlockKind::TextboardComponent, Html::text("メモ"), ), ], ), Html::div( Attributes::new().class(Self::class("resource-list")), Events::new(), match &self.selected_kind { BlockKind::ImageData => self.render_list_image_data(), BlockKind::BlockTexture => self.render_list_block_texture(), BlockKind::TerranTexture => self.render_list_terran_texture(), BlockKind::BoxblockComponent => { self.render_list_boxblock_component() } BlockKind::CraftboardComponent => { self.render_list_craftboard_component() } BlockKind::TextboardComponent => { self.render_list_textboard_component() } _ => vec![], }, ), Html::div( Attributes::new().class(Self::class("detail")), Events::new(), vec![], ), ], ), self.render_modal(), ], ), )) } } impl ModalResource { fn render_modal(&self) -> Html { match &self.showing_modal { ShowingModal::None => Html::none(), ShowingModal::CreateBlockTexture => ModalCreateBlockTexture::empty( self, None, modal_create_block_texture::Props { arena: ArenaMut::clone(&self.arena), world: BlockMut::clone(&self.world), }, Sub::map(|sub| match sub { modal_create_block_texture::On::Close => Msg::CloseModal, modal_create_block_texture::On::UpdateBlocks { insert, update } => { Msg::Sub(On::UpdateBlocks { insert, update }) } modal_create_block_texture::On::CreateTexure(texture) => { Msg::LoadBlockTexture(texture) } }), ), ShowingModal::CreateTerranTexture(terran_texture) => ModalCreateTerranTexture::empty( self, None, modal_create_terran_texture::Props { arena: ArenaMut::clone(&self.arena), world: BlockMut::clone(&self.world), terran_texture: BlockMut::clone(&terran_texture), }, Sub::map(|sub| match sub { modal_create_terran_texture::On::Close => Msg::CloseModal, modal_create_terran_texture::On::UpdateBlocks { insert, update } => { Msg::Sub(On::UpdateBlocks { insert, update }) } }), ), } } fn render_btn_to_select_kind(&self, kind: BlockKind, text: Html) -> Html { if self.filter.is_empty() || self.filter.contains(&kind) { Btn::with_variant( if self.selected_kind == kind { btn::Variant::PrimaryLikeMenu } else { btn::Variant::LightLikeMenu }, Attributes::new(), Events::new().on_click(self, move |_| Msg::SetSelectedKind(kind)), vec![text], ) } else { Html::none() } } fn render_group_to_select_kind(&self, text: Html) -> Html { Html::div( Attributes::new() .class(Self::class("group-to-select-kind")) .class(Self::class("text")), Events::new(), vec![text], ) } fn render_list_image_data(&self) -> Vec<Html> { self.world .map(|world| { vec![ if self.is_selecter { self.render_cell_none("画像無し") } else { Html::none() }, Html::fragment( world .image_data_resources() .iter() .map(|data| self.render_cell_image_data(BlockRef::clone(&data))) .collect(), ), self.render_btn_to_add_cell(BlockKind::ImageData), ] }) .unwrap_or(vec![]) } fn render_list_block_texture(&self) -> Vec<Html> { self.world .map(|world| { vec![ if self.is_selecter { self.render_cell_none("テクスチャ無し") } else { Html::none() }, Html::fragment( world .block_texture_resources() .iter() .map(|data| self.render_cell_block_texture(BlockRef::clone(&data))) .collect(), ), self.render_btn_to_add_cell(BlockKind::BlockTexture), ] }) .unwrap_or(vec![]) } fn render_list_terran_texture(&self) -> Vec<Html> { self.world .map(|world| { vec![ if self.is_selecter { self.render_cell_none("テクスチャ無し") } else { Html::none() }, Html::fragment( world .terran_texture_blocks() .iter() .map(|data| self.render_cell_terran_texture(BlockMut::clone(&data))) .collect(), ), self.render_btn_to_add_cell(BlockKind::TerranTexture), ] }) .unwrap_or(vec![]) } fn render_list_boxblock_component(&self) -> Vec<Html> { self.world .map(|world| { world .components() .boxblocks() .iter() .map(|data| self.render_cell_boxblock_component(BlockMut::clone(data))) .collect() }) .unwrap_or(vec![]) } fn render_list_craftboard_component(&self) -> Vec<Html> { self.world .map(|world| { world .components() .craftboards() .iter() .map(|data| self.render_cell_craftboard_component(BlockMut::clone(data))) .collect() }) .unwrap_or(vec![]) } fn render_list_textboard_component(&self) -> Vec<Html> { self.world .map(|world| { world .components() .textboards() .iter() .map(|data| self.render_cell_textboard_component(BlockMut::clone(data))) .collect() }) .unwrap_or(vec![]) } fn render_cell_none(&self, name: impl Into<String>) -> Html { Html::div( Attributes::new().class(Self::class("cell")), Events::new().on_click(self, move |_| Msg::SetSelectedResource(Resource::None)), vec![ Html::div( Attributes::new().class(Self::class("cell-img")), Events::new(), vec![], ), attr::span(Attributes::new().class(Self::class("text")), name), if self.is_selecter { self.render_btn_to_select_cell(Resource::None) } else { Html::none() }, ], ) } fn render_cell_image_data(&self, data: BlockRef<resource::ImageData>) -> Html { BlockRef::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ Html::img( Attributes::new() .draggable("false") .class(Self::class("cell-img")) .class(Common::bg_transparent()) .src(this.url().to_string()), Events::new(), vec![], ), attr::span(Attributes::new().class(Self::class("text")), this.name()), if self.is_selecter { self.render_btn_to_select_cell(Resource::ImageData(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn render_cell_block_texture(&self, data: BlockRef<resource::BlockTexture>) -> Html { BlockRef::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ Html::img( Attributes::new() .draggable("false") .class(Self::class("cell-img")) .class(Common::bg_transparent()) .src(this.data().url().to_string()), Events::new(), vec![], ), attr::span( Attributes::new().class(Self::class("text")), this.data().name(), ), if self.is_selecter { self.render_btn_to_select_cell(Resource::BlockTexture(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn render_cell_terran_texture(&self, data: BlockMut<block::TerranTexture>) -> Html { BlockMut::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ Html::node(this.data().clone().into()), { let data = BlockMut::clone(&data); self.render_btn_to_edit_cell(Resource::TerranTexture(data)) }, if self.is_selecter { self.render_btn_to_select_cell(Resource::TerranTexture(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn render_cell_boxblock_component(&self, data: BlockMut<component::BoxblockComponent>) -> Html { BlockMut::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ self.render_cell_boxblock_component_img(this), attr::span(Attributes::new().class(Self::class("text")), this.name()), if self.is_selecter { self.render_btn_to_select_cell(Resource::BoxblockComponent(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn render_cell_boxblock_component_img(&self, data: &component::BoxblockComponent) -> Html { data.texture() .and_then(|texture| { texture.map(|texture| { Html::img( Attributes::new() .draggable("false") .class(Self::class("cell-img")) .class(Common::bg_transparent()) .src(texture.data().url().to_string()), Events::new(), vec![], ) }) }) .unwrap_or_else(|| self.render_cell_boxblock_component_bgcolor(data)) } fn render_cell_boxblock_component_bgcolor(&self, data: &component::BoxblockComponent) -> Html { Html::div( Attributes::new() .class(Self::class("cell-tile")) .style("background-color", data.color().to_string()), Events::new(), vec![], ) } fn render_cell_craftboard_component( &self, data: BlockMut<component::CraftboardComponent>, ) -> Html { BlockMut::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ Html::div( Attributes::new() .class(Common::layered()) .style( "width", format!( "{}rem", (10.0 * this.size()[0] / this.size()[1]).min(10.0) ), ) .style( "height", format!( "{}rem", (10.0 * this.size()[1] / this.size()[0]).min(10.0) ), ), Events::new(), vec![ this.textures() .nz .as_ref() .and_then(|texture| { texture.map(|texture| { Html::img( Attributes::new() .draggable("false") .class(Self::class("fill-img")) .class(Common::bg_transparent()) .class(Common::layered_item()) .src(texture.url().to_string()), Events::new(), vec![], ) }) }) .unwrap_or_else(|| Html::none()), Html::div( Attributes::new().class(Common::layered_item()).style( "background", Self::style_grid_line( this.size()[1] as u32, this.size()[0] as u32, ), ), Events::new(), vec![], ), ], ), attr::span(Attributes::new().class(Self::class("text")), this.name()), if self.is_selecter { self.render_btn_to_select_cell(Resource::CraftboardComponent(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn render_cell_textboard_component( &self, data: BlockMut<component::TextboardComponent>, ) -> Html { BlockMut::clone(&data) .map(|this| { Html::div( Attributes::new().class(Self::class("cell")), Events::new(), vec![ Html::pre( Attributes::new() .class(Self::class("cell-tile")) .class(Self::class("cell-textboard")), Events::new(), vec![Html::text(this.text())], ), attr::span(Attributes::new().class(Self::class("text")), this.title()), if self.is_selecter { self.render_btn_to_select_cell(Resource::TextboardComponent(data)) } else { Html::none() }, ], ) }) .unwrap_or(Html::none()) } fn style_grid_line(rows: u32, cols: u32) -> String { format!( "repeating-linear-gradient(0deg, #000, #000 1px, transparent 1px, transparent calc((100% - 1px) / {})),\ repeating-linear-gradient(90deg, #000, #000 1px, transparent 1px, transparent calc((100% - 1px) / {}))", rows, cols ) } fn render_btn_to_select_cell(&self, resource: Resource) -> Html { Btn::secondary( Attributes::new(), Events::new().on_click(self, move |_| Msg::SelectResource(resource)), vec![Html::text("選択")], ) } fn render_btn_to_edit_cell(&self, resource: Resource) -> Html { Btn::secondary( Attributes::new(), Events::new().on_click(self, move |_| Msg::EditResource(resource)), vec![Html::text("編集")], ) } fn render_btn_to_add_cell(&self, kind: BlockKind) -> Html { Btn::secondary( Attributes::new().class(Self::class("cell")), Events::new().on_click(self, move |_| Msg::AddResource(kind)), vec![Html::text("追加")], ) } } impl Styled for ModalResource { fn style() -> Style { style! { ".base" { "display": "grid"; "grid-template-columns": "max-content 1fr"; "grid-template-rows": "1fr max-content"; "height": "100%"; "overflow": "hidden"; } ".kind-list, .resource-list, .detail" { "overflow-y": "scroll"; } ".kind-list" { "grid-column": "1 / 2"; "grid-row": "1 / 3"; "display": "flex"; "flex-direction": "column"; } ".kind-list > *" { "margin-top": ".35rem"; } ".resource-list" { "grid-column": "2 / 3"; "grid-row": "1 / 2"; "display": "grid"; "grid-template-columns": "repeat(auto-fill, minmax(10rem, 1fr))"; "grid-auto-rows": "max-content"; } ".detail" { "grid-column": "2 / 3"; "grid-row": "2 / 3"; } ".cell" { "min-height": "10rem"; "width": "100%"; "overflow": "hidden"; "display": "flex"; "flex-direction": "column"; "justify-content": "center"; "align-items": "center"; } ".cell > canvas" { "width": "10rem"; "height": "10rem"; } ".cell-img" { "height": "10rem"; "object-fit": "contain"; } ".cell-tile" { "height": "10rem"; "width": "10rem"; } ".cell .text" { "text-overflow": "ellipsis"; "overflow": "hidden"; "max-width": "100%"; } ".text" { "color": crate::libs::color::Pallet::gray(9); } ".group-to-select-kind" { "margin-top": "1rem"; "padding-left": "1em"; "padding-right": "1em"; } ".fill-img" { "width": "100%"; "height": "100%"; "object-fit": "fill"; } ".cell-textboard" { "text-overflow": "ellipsis"; "overflow": "hidden"; } } } }
pub mod gateway; pub mod reqrep;
pub fn insertion_sort<T:Ord>(arr:&mut[T]) -> &mut[T]{ for i in 0..arr.len() { if i == 0{ continue } for j in (0..i+1).rev() { if j==0 { break; } if arr[j] < arr[j-1]{ arr.swap(j,j-1) }else{ break; } } } arr } #[cfg(test)] mod test{ use super::*; #[test] fn sort() { let mut arr = vec!["23","3","123","43","22","98","12","1","68"]; let sort = insertion_sort(&mut arr); println!("{:?}",sort); for i in 0..arr.len() -1 { assert!(arr[i] <= arr[i+1]) } } }
// Copyright 2019-2020 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Substrate is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Substrate. If not, see <http://www.gnu.org/licenses/>. //! Implementations of the `IntoProtocolsHandler` and `ProtocolsHandler` traits for both incoming //! and outgoing substreams for all gossiping protocols together. //! //! This is the main implementation of `ProtocolsHandler` in this crate, that handles all the //! protocols that are Substrate-related and outside of the scope of libp2p. //! //! # Usage //! //! The handler can be in one of the following states: `Initial`, `Enabled`, `Disabled`. //! //! The `Initial` state is the state that the handler initially is in. It is a temporary state //! during which the user must either enable or disable the handler. After that, the handler stays //! either enabled or disabled. //! //! On the wire, we try to open the following substreams: //! //! - One substream for each notification protocol passed as parameter to the //! `NotifsHandlerProto::new` function. //! - One "legacy" substream used for anything non-related to gossiping, and used as a fallback in //! case the notification protocol can't be opened. //! //! When the handler is in the `Enabled` state, we immediately open and try to maintain all the //! aforementioned substreams. When the handler is in the `Disabled` state, we immediately close //! (or abort opening) all these substreams. It is intended that in the future we allow states in //! which some protocols are open and not others. Symmetrically, we allow incoming //! Substrate-related substreams if and only if we are in the `Enabled` state. //! //! The user has the choice between sending a message with `SendNotification`, to send a //! notification, and `SendLegacy`, to send any other kind of message. use crate::protocol::generic_proto::{ handler::legacy::{ LegacyProtoHandler, LegacyProtoHandlerIn, LegacyProtoHandlerOut, LegacyProtoHandlerProto, }, handler::notif_in::{ NotifsInHandler, NotifsInHandlerIn, NotifsInHandlerOut, NotifsInHandlerProto, }, handler::notif_out::{ NotifsOutHandler, NotifsOutHandlerIn, NotifsOutHandlerOut, NotifsOutHandlerProto, }, upgrade::{ NotificationsHandshakeError, NotificationsIn, NotificationsOut, RegisteredProtocol, UpgradeCollec, }, }; use bytes::BytesMut; use futures::{ channel::mpsc, lock::{Mutex as FuturesMutex, MutexGuard as FuturesMutexGuard}, prelude::*, }; use libp2p::core::upgrade::{ EitherUpgrade, InboundUpgrade, OutboundUpgrade, SelectUpgrade, UpgradeError, }; use libp2p::core::{ either::{EitherError, EitherOutput}, ConnectedPoint, PeerId, }; use libp2p::swarm::{ IntoProtocolsHandler, KeepAlive, NegotiatedSubstream, ProtocolsHandler, ProtocolsHandlerEvent, ProtocolsHandlerUpgrErr, SubstreamProtocol, }; use log::{debug, error}; use parking_lot::{Mutex, RwLock}; use std::{ borrow::Cow, error, io, str, sync::Arc, task::{Context, Poll}, }; /// Number of pending notifications in asynchronous contexts. /// See [`NotificationsSink::reserve_notification`] for context. const ASYNC_NOTIFICATIONS_BUFFER_SIZE: usize = 8; /// Number of pending notifications in synchronous contexts. const SYNC_NOTIFICATIONS_BUFFER_SIZE: usize = 2048; /// Implements the `IntoProtocolsHandler` trait of libp2p. /// /// Every time a connection with a remote starts, an instance of this struct is created and /// sent to a background task dedicated to this connection. Once the connection is established, /// it is turned into a [`NotifsHandler`]. /// /// See the documentation at the module level for more information. pub struct NotifsHandlerProto { /// Prototypes for handlers for inbound substreams, and the message we respond with in the /// handshake. in_handlers: Vec<(NotifsInHandlerProto, Arc<RwLock<Vec<u8>>>)>, /// Prototypes for handlers for outbound substreams, and the initial handshake message we send. out_handlers: Vec<(NotifsOutHandlerProto, Arc<RwLock<Vec<u8>>>)>, /// Prototype for handler for backwards-compatibility. legacy: LegacyProtoHandlerProto, } /// The actual handler once the connection has been established. /// /// See the documentation at the module level for more information. pub struct NotifsHandler { /// Handlers for inbound substreams, and the message we respond with in the handshake. in_handlers: Vec<(NotifsInHandler, Arc<RwLock<Vec<u8>>>)>, /// Handlers for outbound substreams, and the initial handshake message we send. out_handlers: Vec<(NotifsOutHandler, Arc<RwLock<Vec<u8>>>)>, /// Whether we are the connection dialer or listener. endpoint: ConnectedPoint, /// Handler for backwards-compatibility. legacy: LegacyProtoHandler, /// In the situation where either the legacy substream has been opened or the handshake-bearing /// notifications protocol is open, but we haven't sent out any [`NotifsHandlerOut::Open`] /// event yet, this contains the received handshake waiting to be reported through the /// external API. pending_handshake: Option<Vec<u8>>, /// State of this handler. enabled: EnabledState, /// If we receive inbound substream requests while in initialization mode, /// we push the corresponding index here and process them when the handler /// gets enabled/disabled. pending_in: Vec<usize>, /// If `Some`, contains the two `Receiver`s connected to the [`NotificationsSink`] that has /// been sent out. The notifications to send out can be pulled from this receivers. /// We use two different channels in order to have two different channel sizes, but from the /// receiving point of view, the two channels are the same. /// The receivers are fused in case the user drops the [`NotificationsSink`] entirely. /// /// Contains `Some` if and only if it has been reported to the user that the substreams are /// open. notifications_sink_rx: Option< stream::Select< stream::Fuse<mpsc::Receiver<NotificationsSinkMessage>>, stream::Fuse<mpsc::Receiver<NotificationsSinkMessage>>, >, >, } #[derive(Debug, Clone, PartialEq, Eq)] enum EnabledState { Initial, Enabled, Disabled, } impl IntoProtocolsHandler for NotifsHandlerProto { type Handler = NotifsHandler; fn inbound_protocol( &self, ) -> SelectUpgrade<UpgradeCollec<NotificationsIn>, RegisteredProtocol> { let in_handlers = self .in_handlers .iter() .map(|(h, _)| h.inbound_protocol()) .collect::<UpgradeCollec<_>>(); SelectUpgrade::new(in_handlers, self.legacy.inbound_protocol()) } fn into_handler( self, remote_peer_id: &PeerId, connected_point: &ConnectedPoint, ) -> Self::Handler { NotifsHandler { in_handlers: self .in_handlers .into_iter() .map(|(proto, msg)| (proto.into_handler(remote_peer_id, connected_point), msg)) .collect(), out_handlers: self .out_handlers .into_iter() .map(|(proto, msg)| (proto.into_handler(remote_peer_id, connected_point), msg)) .collect(), endpoint: connected_point.clone(), legacy: self.legacy.into_handler(remote_peer_id, connected_point), pending_handshake: None, enabled: EnabledState::Initial, pending_in: Vec::new(), notifications_sink_rx: None, } } } /// Event that can be received by a `NotifsHandler`. #[derive(Debug, Clone)] pub enum NotifsHandlerIn { /// The node should start using custom protocols. Enable, /// The node should stop using custom protocols. Disable, } /// Event that can be emitted by a `NotifsHandler`. #[derive(Debug)] pub enum NotifsHandlerOut { /// The connection is open for custom protocols. Open { /// The endpoint of the connection that is open for custom protocols. endpoint: ConnectedPoint, /// Handshake that was sent to us. /// This is normally a "Status" message, but this out of the concern of this code. received_handshake: Vec<u8>, /// How notifications can be sent to this node. notifications_sink: NotificationsSink, }, /// The connection is closed for custom protocols. Closed { /// The reason for closing, for diagnostic purposes. reason: Cow<'static, str>, /// The endpoint of the connection that closed for custom protocols. endpoint: ConnectedPoint, }, /// Received a non-gossiping message on the legacy substream. CustomMessage { /// Message that has been received. /// /// Keep in mind that this can be a `ConsensusMessage` message, which then contains a /// notification. message: BytesMut, }, /// Received a message on a custom protocol substream. Notification { /// Name of the protocol of the message. protocol_name: Cow<'static, str>, /// Message that has been received. message: BytesMut, }, /// An error has happened on the protocol level with this node. ProtocolError { /// If true the error is severe, such as a protocol violation. is_severe: bool, /// The error that happened. error: Box<dyn error::Error + Send + Sync>, }, } /// Sink connected directly to the node background task. Allows sending notifications to the peer. /// /// Can be cloned in order to obtain multiple references to the same peer. #[derive(Debug, Clone)] pub struct NotificationsSink { inner: Arc<NotificationsSinkInner>, } #[derive(Debug)] struct NotificationsSinkInner { /// Sender to use in asynchronous contexts. Uses an asynchronous mutex. async_channel: FuturesMutex<mpsc::Sender<NotificationsSinkMessage>>, /// Sender to use in synchronous contexts. Uses a synchronous mutex. /// This channel has a large capacity and is meant to be used in contexts where /// back-pressure cannot be properly exerted. /// It will be removed in a future version. sync_channel: Mutex<mpsc::Sender<NotificationsSinkMessage>>, } /// Message emitted through the [`NotificationsSink`] and processed by the background task /// dedicated to the peer. #[derive(Debug)] enum NotificationsSinkMessage { /// Message emitted by [`NotificationsSink::reserve_notification`] and /// [`NotificationsSink::write_notification_now`]. Notification { protocol_name: Cow<'static, str>, message: Vec<u8> }, /// Must close the connection. ForceClose, } impl NotificationsSink { /// Sends a notification to the peer. /// /// If too many messages are already buffered, the notification is silently discarded and the /// connection to the peer will be closed shortly after. /// /// The protocol name is expected to be checked ahead of calling this method. It is a logic /// error to send a notification using an unknown protocol. /// /// This method will be removed in a future version. pub fn send_sync_notification<'a>( &'a self, protocol_name: Cow<'static, str>, message: impl Into<Vec<u8>>, ) { let mut lock = self.inner.sync_channel.lock(); let result = lock.try_send(NotificationsSinkMessage::Notification { protocol_name, message: message.into(), }); if result.is_err() { // Cloning the `mpsc::Sender` guarantees the allocation of an extra spot in the // buffer, and therefore that `try_send` will succeed. let _result2 = lock.clone().try_send(NotificationsSinkMessage::ForceClose); debug_assert!(_result2.map(|()| true).unwrap_or_else(|err| err.is_disconnected())); } } /// Wait until the remote is ready to accept a notification. /// /// Returns an error in the case where the connection is closed. /// /// The protocol name is expected to be checked ahead of calling this method. It is a logic /// error to send a notification using an unknown protocol. pub async fn reserve_notification<'a>( &'a self, protocol_name: Cow<'static, str>, ) -> Result<Ready<'a>, ()> { let mut lock = self.inner.async_channel.lock().await; let poll_ready = future::poll_fn(|cx| lock.poll_ready(cx)).await; if poll_ready.is_ok() { Ok(Ready { protocol_name, lock }) } else { Err(()) } } } /// Notification slot is reserved and the notification can actually be sent. #[must_use] #[derive(Debug)] pub struct Ready<'a> { /// Guarded channel. The channel inside is guaranteed to not be full. lock: FuturesMutexGuard<'a, mpsc::Sender<NotificationsSinkMessage>>, /// Name of the protocol. Should match one of the protocols passed at initialization. protocol_name: Cow<'static, str>, } impl<'a> Ready<'a> { /// Consumes this slots reservation and actually queues the notification. /// /// Returns an error if the substream has been closed. pub fn send(mut self, notification: impl Into<Vec<u8>>) -> Result<(), ()> { self.lock .start_send(NotificationsSinkMessage::Notification { protocol_name: self.protocol_name, message: notification.into(), }) .map_err(|_| ()) } } /// Error specific to the collection of protocols. #[derive(Debug, derive_more::Display, derive_more::Error)] pub enum NotifsHandlerError { /// Channel of synchronous notifications is full. SyncNotificationsClogged, /// Error in legacy protocol. Legacy(<LegacyProtoHandler as ProtocolsHandler>::Error), } impl NotifsHandlerProto { /// Builds a new handler. /// /// `list` is a list of notification protocols names, and the message to send as part of the /// handshake. At the moment, the message is always the same whether we open a substream /// ourselves or respond to handshake from the remote. /// /// The first protocol in `list` is special-cased as the protocol that contains the handshake /// to report through the [`NotifsHandlerOut::Open`] event. /// /// # Panic /// /// - Panics if `list` is empty. pub fn new( legacy: RegisteredProtocol, list: impl Into<Vec<(Cow<'static, str>, Arc<RwLock<Vec<u8>>>)>>, ) -> Self { let list = list.into(); assert!(!list.is_empty()); let out_handlers = list .clone() .into_iter() .map(|(proto_name, initial_message)| { (NotifsOutHandlerProto::new(proto_name), initial_message) }) .collect(); let in_handlers = list .clone() .into_iter() .map(|(proto_name, msg)| (NotifsInHandlerProto::new(proto_name), msg)) .collect(); NotifsHandlerProto { in_handlers, out_handlers, legacy: LegacyProtoHandlerProto::new(legacy), } } } impl ProtocolsHandler for NotifsHandler { type InEvent = NotifsHandlerIn; type OutEvent = NotifsHandlerOut; type Error = NotifsHandlerError; type InboundProtocol = SelectUpgrade<UpgradeCollec<NotificationsIn>, RegisteredProtocol>; type OutboundProtocol = EitherUpgrade<NotificationsOut, RegisteredProtocol>; // Index within the `out_handlers`; None for legacy type OutboundOpenInfo = Option<usize>; type InboundOpenInfo = (); fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, ()> { let in_handlers = self .in_handlers .iter() .map(|(h, _)| h.listen_protocol().into_upgrade().1) .collect::<UpgradeCollec<_>>(); let proto = SelectUpgrade::new(in_handlers, self.legacy.listen_protocol().into_upgrade().1); SubstreamProtocol::new(proto, ()) } fn inject_fully_negotiated_inbound( &mut self, out: <Self::InboundProtocol as InboundUpgrade<NegotiatedSubstream>>::Output, (): (), ) { match out { EitherOutput::First((out, num)) => self.in_handlers[num].0.inject_fully_negotiated_inbound(out, ()), EitherOutput::Second(out) => self.legacy.inject_fully_negotiated_inbound(out, ()), } } fn inject_fully_negotiated_outbound( &mut self, out: <Self::OutboundProtocol as OutboundUpgrade<NegotiatedSubstream>>::Output, num: Self::OutboundOpenInfo, ) { match (out, num) { (EitherOutput::First(out), Some(num)) => self.out_handlers[num].0.inject_fully_negotiated_outbound(out, ()), (EitherOutput::Second(out), None) => self.legacy.inject_fully_negotiated_outbound(out, ()), _ => error!("inject_fully_negotiated_outbound called with wrong parameters"), } } fn inject_event(&mut self, message: NotifsHandlerIn) { match message { NotifsHandlerIn::Enable => { if let EnabledState::Enabled = self.enabled { debug!("enabling already-enabled handler"); } self.enabled = EnabledState::Enabled; self.legacy.inject_event(LegacyProtoHandlerIn::Enable); for (handler, initial_message) in &mut self.out_handlers { // We create `initial_message` on a separate line to be sure that the lock // is released as soon as possible. let initial_message = initial_message.read().clone(); handler.inject_event(NotifsOutHandlerIn::Enable { initial_message }); } for num in self.pending_in.drain(..) { // We create `handshake_message` on a separate line to be sure // that the lock is released as soon as possible. let handshake_message = self.in_handlers[num].1.read().clone(); self.in_handlers[num] .0 .inject_event(NotifsInHandlerIn::Accept(handshake_message)); } }, NotifsHandlerIn::Disable => { if let EnabledState::Disabled = self.enabled { debug!("disabling already-disabled handler"); } self.legacy.inject_event(LegacyProtoHandlerIn::Disable); // The notifications protocols start in the disabled state. If we were in the // "Initial" state, then we shouldn't disable the notifications protocols again. if self.enabled != EnabledState::Initial { for (handler, _) in &mut self.out_handlers { handler.inject_event(NotifsOutHandlerIn::Disable); } } self.enabled = EnabledState::Disabled; for num in self.pending_in.drain(..) { self.in_handlers[num].0.inject_event(NotifsInHandlerIn::Refuse); } }, } } fn inject_dial_upgrade_error( &mut self, num: Option<usize>, err: ProtocolsHandlerUpgrErr<EitherError<NotificationsHandshakeError, io::Error>>, ) { match (err, num) { (ProtocolsHandlerUpgrErr::Timeout, Some(num)) => self.out_handlers[num] .0 .inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timeout), (ProtocolsHandlerUpgrErr::Timeout, None) => self.legacy.inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timeout), (ProtocolsHandlerUpgrErr::Timer, Some(num)) => self.out_handlers[num] .0 .inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timer), (ProtocolsHandlerUpgrErr::Timer, None) => self.legacy.inject_dial_upgrade_error((), ProtocolsHandlerUpgrErr::Timer), (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), Some(num)) => self.out_handlers[num].0.inject_dial_upgrade_error( (), ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), ), (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), None) => self.legacy.inject_dial_upgrade_error( (), ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Select(err)), ), ( ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(EitherError::A(err))), Some(num), ) => self.out_handlers[num].0.inject_dial_upgrade_error( (), ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(err)), ), (ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(EitherError::B(err))), None) => self.legacy.inject_dial_upgrade_error( (), ProtocolsHandlerUpgrErr::Upgrade(UpgradeError::Apply(err)), ), _ => error!("inject_dial_upgrade_error called with bad parameters"), } } fn connection_keep_alive(&self) -> KeepAlive { // Iterate over each handler and return the maximum value. let mut ret = self.legacy.connection_keep_alive(); if ret.is_yes() { return KeepAlive::Yes } for (handler, _) in &self.in_handlers { let val = handler.connection_keep_alive(); if val.is_yes() { return KeepAlive::Yes } if ret < val { ret = val; } } for (handler, _) in &self.out_handlers { let val = handler.connection_keep_alive(); if val.is_yes() { return KeepAlive::Yes } if ret < val { ret = val; } } ret } fn poll( &mut self, cx: &mut Context, ) -> Poll< ProtocolsHandlerEvent< Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent, Self::Error, >, > { if let Some(notifications_sink_rx) = &mut self.notifications_sink_rx { 'poll_notifs_sink: loop { // Before we poll the notifications sink receiver, check that all the notification // channels are ready to send a message. // TODO: it is planned that in the future we switch to one `NotificationsSink` per // protocol, in which case each sink should wait only for its corresponding handler // to be ready, and not all handlers // see https://github.com/paritytech/substrate/issues/5670 for (out_handler, _) in &mut self.out_handlers { match out_handler.poll_ready(cx) { Poll::Ready(_) => {}, Poll::Pending => break 'poll_notifs_sink, } } let message = match notifications_sink_rx.poll_next_unpin(cx) { Poll::Ready(Some(msg)) => msg, Poll::Ready(None) | Poll::Pending => break, }; match message { NotificationsSinkMessage::Notification { protocol_name, message } => { let mut found_any_with_name = false; for (handler, _) in &mut self.out_handlers { if *handler.protocol_name() == protocol_name { found_any_with_name = true; if handler.is_open() { handler.send_or_discard(message); continue 'poll_notifs_sink } } } // This code can be reached via the following scenarios: // // - User tried to send a notification on a non-existing protocol. This // most likely relates to https://github.com/paritytech/substrate/issues/6827 // - User tried to send a notification to a peer we're not or no longer // connected to. This happens in a normal scenario due to the racy nature // of connections and disconnections, and is benign. // // We print a warning in the former condition. if !found_any_with_name { log::warn!( target: "sub-libp2p", "Tried to send a notification on non-registered protocol: {:?}", protocol_name ); } }, NotificationsSinkMessage::ForceClose => { return Poll::Ready(ProtocolsHandlerEvent::Close( NotifsHandlerError::SyncNotificationsClogged, )) }, } } } // If `self.pending_handshake` is `Some`, we are in a state where the handshake-bearing // substream (either the legacy substream or the one special-cased as providing the // handshake) is open but the user isn't aware yet of the substreams being open. // When that is the case, neither the legacy substream nor the incoming notifications // substreams should be polled, otherwise there is a risk of receiving messages from them. if self.pending_handshake.is_none() { while let Poll::Ready(ev) = self.legacy.poll(cx) { match ev { ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol } => return Poll::Ready(ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol: protocol.map_upgrade(EitherUpgrade::B).map_info(|()| None), }), ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::CustomProtocolOpen { received_handshake, .. }) => { if self.notifications_sink_rx.is_none() { debug_assert!(self.pending_handshake.is_none()); self.pending_handshake = Some(received_handshake); } cx.waker().wake_by_ref(); return Poll::Pending }, ProtocolsHandlerEvent::Custom( LegacyProtoHandlerOut::CustomProtocolClosed { reason, .. }, ) => { // We consciously drop the receivers despite notifications being potentially // still buffered up. self.notifications_sink_rx = None; return Poll::Ready(ProtocolsHandlerEvent::Custom( NotifsHandlerOut::Closed { endpoint: self.endpoint.clone(), reason }, )) }, ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::CustomMessage { message, }) => return Poll::Ready(ProtocolsHandlerEvent::Custom( NotifsHandlerOut::CustomMessage { message }, )), ProtocolsHandlerEvent::Custom(LegacyProtoHandlerOut::ProtocolError { is_severe, error, }) => return Poll::Ready(ProtocolsHandlerEvent::Custom( NotifsHandlerOut::ProtocolError { is_severe, error }, )), ProtocolsHandlerEvent::Close(err) => return Poll::Ready(ProtocolsHandlerEvent::Close( NotifsHandlerError::Legacy(err), )), } } } for (handler_num, (handler, handshake_message)) in self.in_handlers.iter_mut().enumerate() { loop { let poll = if self.notifications_sink_rx.is_some() { handler.poll(cx) } else { handler.poll_process(cx) }; let ev = match poll { Poll::Ready(e) => e, Poll::Pending => break, }; match ev { ProtocolsHandlerEvent::OutboundSubstreamRequest { .. } => error!("Incoming substream handler tried to open a substream"), ProtocolsHandlerEvent::Close(err) => void::unreachable(err), ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::OpenRequest(_)) => match self .enabled { EnabledState::Initial => self.pending_in.push(handler_num), EnabledState::Enabled => { // We create `handshake_message` on a separate line to be sure // that the lock is released as soon as possible. let handshake_message = handshake_message.read().clone(); handler.inject_event(NotifsInHandlerIn::Accept(handshake_message)) }, EnabledState::Disabled => handler.inject_event(NotifsInHandlerIn::Refuse), }, ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Closed) => {}, ProtocolsHandlerEvent::Custom(NotifsInHandlerOut::Notif(message)) => { debug_assert!(self.pending_handshake.is_none()); if self.notifications_sink_rx.is_some() { let msg = NotifsHandlerOut::Notification { message, protocol_name: handler.protocol_name().clone(), }; return Poll::Ready(ProtocolsHandlerEvent::Custom(msg)) } }, } } } for (handler_num, (handler, _)) in self.out_handlers.iter_mut().enumerate() { while let Poll::Ready(ev) = handler.poll(cx) { match ev { ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol } => return Poll::Ready(ProtocolsHandlerEvent::OutboundSubstreamRequest { protocol: protocol .map_upgrade(EitherUpgrade::A) .map_info(|()| Some(handler_num)), }), ProtocolsHandlerEvent::Close(err) => void::unreachable(err), // Opened substream on the handshake-bearing notification protocol. ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Open { handshake }) if handler_num == 0 => { if self.notifications_sink_rx.is_none() && self.pending_handshake.is_none() { self.pending_handshake = Some(handshake); } } // Nothing to do in response to other notification substreams being opened // or closed. ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Open { .. }) => {}, ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Closed) => {}, ProtocolsHandlerEvent::Custom(NotifsOutHandlerOut::Refused) => {}, } } } if self.out_handlers.iter().all(|(h, _)| h.is_open() || h.is_refused()) { if let Some(handshake) = self.pending_handshake.take() { let (async_tx, async_rx) = mpsc::channel(ASYNC_NOTIFICATIONS_BUFFER_SIZE); let (sync_tx, sync_rx) = mpsc::channel(SYNC_NOTIFICATIONS_BUFFER_SIZE); let notifications_sink = NotificationsSink { inner: Arc::new(NotificationsSinkInner { async_channel: FuturesMutex::new(async_tx), sync_channel: Mutex::new(sync_tx), }), }; debug_assert!(self.notifications_sink_rx.is_none()); self.notifications_sink_rx = Some(stream::select(async_rx.fuse(), sync_rx.fuse())); return Poll::Ready(ProtocolsHandlerEvent::Custom(NotifsHandlerOut::Open { endpoint: self.endpoint.clone(), received_handshake: handshake, notifications_sink, })) } } Poll::Pending } }