/* Generated by re2rust 4.3.1 */ pub fn open_block_directive_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x39 | 0x3B..=0xFE => { ctxmarker = cursor; cursor += 1; yystate = 7; continue 'yyl; } 0x3A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 8; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x39 | 0x3B..=0xFE => { cursor += 1; yystate = 7; continue 'yyl; } 0x3A => { yystate = 5; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 8 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } pub fn close_block_directive_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x39 | 0x3B..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { ctxmarker = cursor; cursor += 1; yystate = 7; continue 'yyl; } 0x3A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 8; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 8 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } pub fn atx_heading_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x23 => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x22 | 0x24..=0xFE => { yystate = 2; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x23 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { if cursor == len + 1 { cursor -= 1; } return Some(cursor); } 6 => { yystate = 5; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x22 | 0x24..=0xFE => { yystate = 8; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x23 => { cursor += 1; yystate = 9; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } 8 => { cursor = marker; yystate = 2; continue 'yyl; } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x22 | 0x24..=0xFE => { yystate = 8; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x23 => { cursor += 1; yystate = 10; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x22 | 0x24..=0xFE => { yystate = 8; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x23 => { cursor += 1; yystate = 11; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x22 | 0x24..=0xFE => { yystate = 8; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x23 => { cursor += 1; yystate = 12; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 8; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { cursor += 1; yystate = 6; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn atx_subtext_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x2D => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x23 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x20 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 7 => { if cursor == len + 1 { cursor -= 1; } return Some(cursor); } 8 => { yystate = 7; continue 'yyl; } _ => panic!("internal lexer error"), } } } } pub fn html_block_end_1(s: &str) -> bool { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0xFE => { yystate = 1; continue 'yyl; } 0x3C => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0xFE => { yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return false; } 3 => { yystate = 2; continue 'yyl; } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2E | 0x30..=0xFE => { yystate = 6; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 6; continue 'yyl; } 6 => match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } }, 7 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 22; continue 'yyl; } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2E | 0x30..=0x3B | 0x3D..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x4F | 0x51..=0x52 | 0x55..=0x6F | 0x71..=0x72 | 0x75..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 10; continue 'yyl; } 0x53 | 0x73 => { cursor += 1; yystate = 11; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x51 | 0x53..=0x71 | 0x73..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x42 | 0x44..=0x53 | 0x55..=0x62 | 0x64..=0x73 | 0x75..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x43 | 0x63 => { cursor += 1; yystate = 14; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 15; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x44 | 0x46..=0x64 | 0x66..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x44 | 0x46..=0x64 | 0x66..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x51 | 0x53..=0x71 | 0x73..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 18; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x58 | 0x5A..=0x78 | 0x7A..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x59 | 0x79 => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x57 | 0x59..=0x77 | 0x79..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x58 | 0x78 => { cursor += 1; yystate = 20; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x3E => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x48 | 0x4A..=0x68 | 0x6A..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 23; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x4B | 0x4D..=0x6B | 0x6D..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x4C | 0x6C => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x53 | 0x55..=0x73 | 0x75..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 24; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 21 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 22; continue 'yyl; } } } 22 => { return true; } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x4F | 0x51..=0x6F | 0x71..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 25; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x40 | 0x42..=0x60 | 0x62..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 26; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x53 | 0x55..=0x73 | 0x75..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x51 | 0x53..=0x71 | 0x73..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 27; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x44 | 0x46..=0x64 | 0x66..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 28; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3B | 0x3D..=0x40 | 0x42..=0x60 | 0x62..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3C => { cursor += 1; yystate = 8; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn html_block_end_2(s: &str) -> bool { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0xFE => { yystate = 1; continue 'yyl; } 0x2D => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0xFE => { yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return false; } 3 => { yystate = 2; continue 'yyl; } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 6; continue 'yyl; } 6 => match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } }, 7 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 11; continue 'yyl; } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 10 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 11; continue 'yyl; } } } 11 => { return true; } _ => panic!("internal lexer error"), } } } } pub fn html_block_end_3(s: &str) -> bool { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x3E | 0x40..=0xFE => { yystate = 1; continue 'yyl; } 0x3F => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0xFE => { yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return false; } 3 => { yystate = 2; continue 'yyl; } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x3F..=0xFE => { yystate = 6; continue 'yyl; } 0x3E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 6; continue 'yyl; } 6 => match yych { 0x00..=0x09 | 0x0B..=0x3E | 0x40..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3F => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } }, 7 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 10; continue 'yyl; } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x40..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3E => { cursor += 1; yystate = 9; continue 'yyl; } 0x3F => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 9 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3E | 0x40..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3F => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 10; continue 'yyl; } } } 10 => { return true; } _ => panic!("internal lexer error"), } } } } pub fn html_block_end_4(s: &str) -> bool { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x3F..=0xFE => { yystate = 1; continue 'yyl; } 0x3E => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0xFE => { yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return false; } 3 => { yystate = 2; continue 'yyl; } 4 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x3E => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { return true; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 7; continue 'yyl; } 7 => match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x3E => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } }, 8 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 5; continue 'yyl; } } _ => panic!("internal lexer error"), } } } } pub fn html_block_end_5(s: &str) -> bool { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x5C | 0x5E..=0xFE => { yystate = 1; continue 'yyl; } 0x5D => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0xFE => { yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return false; } 3 => { yystate = 2; continue 'yyl; } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x5D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 6; continue 'yyl; } 6 => match yych { 0x00..=0x09 | 0x0B..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x5D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } }, 7 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 11; continue 'yyl; } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x5D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x3D | 0x3F..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } 0x5D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 10 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 5; continue 'yyl; } 0x5D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 11; continue 'yyl; } } } 11 => { return true; } _ => panic!("internal lexer error"), } } } } pub fn alert_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3E => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5B => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x21 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 9; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 10; continue 'yyl; } 0x4E | 0x6E => { cursor += 1; yystate = 11; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 12; continue 'yyl; } 0x57 | 0x77 => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 14; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 15; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 18; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x55 | 0x75 => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 20; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 22; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 23; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 24; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 25; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 26; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { cursor += 1; yystate = 27; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 28; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 29; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 30; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { cursor += 1; yystate = 31; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 27 => { return Some(crate::nodes::AlertType::Tip); } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 32; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 33; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 34; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 31 => { return Some(crate::nodes::AlertType::Note); } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 35; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 36; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 37; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { cursor += 1; yystate = 39; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 37 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 40; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 38 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { cursor += 1; yystate = 41; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 39 => { return Some(crate::nodes::AlertType::Caution); } 40 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 42; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 41 => { return Some(crate::nodes::AlertType::Warning); } 42 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { cursor += 1; yystate = 43; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 43 => { return Some(crate::nodes::AlertType::Important); } _ => panic!("internal lexer error"), } } } } pub fn open_code_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x60 => { yystate = 3; continue 'yyl; } 0x7E => { yystate = 4; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x60 => { cursor += 1; yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x7E => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x60 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x7E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5F | 0x61..=0xFE => { ctxmarker = cursor; cursor += 1; yystate = 10; continue 'yyl; } 0x60 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 11; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x7D | 0x7F..=0xFE => { ctxmarker = cursor; cursor += 1; yystate = 12; continue 'yyl; } 0x7E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 13; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5F | 0x61..=0xFE => { cursor += 1; yystate = 10; continue 'yyl; } 0x60 => { yystate = 6; continue 'yyl; } _ => { cursor += 1; yystate = 11; continue 'yyl; } } } 11 => { cursor = ctxmarker; { return Some(cursor); } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0xFE => { yystate = 12; continue 'yyl; } _ => { yystate = 13; continue 'yyl; } } } 13 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } pub fn close_code_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x60 => { yystate = 3; continue 'yyl; } 0x7E => { yystate = 4; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x60 => { cursor += 1; yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x7E => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x60 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x7E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x5F | 0x61..=0xFE => { yystate = 6; continue 'yyl; } 0x09 | 0x20 => { ctxmarker = cursor; cursor += 1; yystate = 10; continue 'yyl; } 0x60 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 11; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x7D | 0x7F..=0xFE => { yystate = 6; continue 'yyl; } 0x09 | 0x20 => { ctxmarker = cursor; cursor += 1; yystate = 12; continue 'yyl; } 0x7E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 13; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 6; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } _ => { cursor += 1; yystate = 11; continue 'yyl; } } } 11 => { cursor = ctxmarker; { return Some(cursor); } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 6; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 12; continue 'yyl; } _ => { cursor += 1; yystate = 13; continue 'yyl; } } } 13 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } pub fn html_block_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x21 => { cursor += 1; yystate = 4; continue 'yyl; } 0x2F => { cursor += 1; yystate = 6; continue 'yyl; } 0x3F => { cursor += 1; yystate = 7; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 8; continue 'yyl; } 0x42 | 0x62 => { cursor += 1; yystate = 9; continue 'yyl; } 0x43 | 0x63 => { cursor += 1; yystate = 10; continue 'yyl; } 0x44 | 0x64 => { cursor += 1; yystate = 11; continue 'yyl; } 0x46 | 0x66 => { cursor += 1; yystate = 12; continue 'yyl; } 0x48 | 0x68 => { cursor += 1; yystate = 13; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 14; continue 'yyl; } 0x4C | 0x6C => { cursor += 1; yystate = 15; continue 'yyl; } 0x4D | 0x6D => { cursor += 1; yystate = 16; continue 'yyl; } 0x4E | 0x6E => { cursor += 1; yystate = 17; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 18; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 19; continue 'yyl; } 0x53 | 0x73 => { cursor += 1; yystate = 20; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 21; continue 'yyl; } 0x55 | 0x75 => { cursor += 1; yystate = 22; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 23; continue 'yyl; } 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 24; continue 'yyl; } 0x5B => { cursor += 1; yystate = 25; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 8; continue 'yyl; } 0x42 | 0x62 => { cursor += 1; yystate = 9; continue 'yyl; } 0x43 | 0x63 => { cursor += 1; yystate = 10; continue 'yyl; } 0x44 | 0x64 => { cursor += 1; yystate = 11; continue 'yyl; } 0x46 | 0x66 => { cursor += 1; yystate = 12; continue 'yyl; } 0x48 | 0x68 => { cursor += 1; yystate = 13; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 14; continue 'yyl; } 0x4C | 0x6C => { cursor += 1; yystate = 15; continue 'yyl; } 0x4D | 0x6D => { cursor += 1; yystate = 16; continue 'yyl; } 0x4E | 0x6E => { cursor += 1; yystate = 17; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 18; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 26; continue 'yyl; } 0x53 | 0x73 => { cursor += 1; yystate = 27; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 28; continue 'yyl; } 0x55 | 0x75 => { cursor += 1; yystate = 22; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { return Some(3); } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 29; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 30; continue 'yyl; } 0x53 | 0x73 => { cursor += 1; yystate = 31; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 32; continue 'yyl; } 0x4C | 0x6C => { cursor += 1; yystate = 33; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 34; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 35; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 36; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 37; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x4C | 0x54 | 0x64 | 0x6C | 0x74 => { cursor += 1; yystate = 38; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 39; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 40; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 41; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 42; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 43; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x31..=0x36 | 0x52 | 0x72 => { cursor += 1; yystate = 38; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 44; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 45; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x46 | 0x66 => { cursor += 1; yystate = 46; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 47; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 48; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 49; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 50; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 51; continue 'yyl; } 0x4F | 0x6F => { cursor += 1; yystate = 52; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 38; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 53; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 56; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 57; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 58; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 59; continue 'yyl; } 0x54 | 0x74 => { cursor += 1; yystate = 60; continue 'yyl; } 0x55 | 0x75 => { cursor += 1; yystate = 61; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 62; continue 'yyl; } 0x42 | 0x62 => { cursor += 1; yystate = 63; continue 'yyl; } 0x44 | 0x64 => { cursor += 1; yystate = 38; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 64; continue 'yyl; } 0x46 | 0x66 => { cursor += 1; yystate = 65; continue 'yyl; } 0x48 | 0x68 => { cursor += 1; yystate = 66; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 67; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 68; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 69; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 24 => { return Some(4); } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 70; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 56; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 59; continue 'yyl; } 0x55 | 0x75 => { cursor += 1; yystate = 61; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 62; continue 'yyl; } 0x42 | 0x62 => { cursor += 1; yystate = 63; continue 'yyl; } 0x44 | 0x64 => { cursor += 1; yystate = 38; continue 'yyl; } 0x46 | 0x66 => { cursor += 1; yystate = 65; continue 'yyl; } 0x48 | 0x68 => { cursor += 1; yystate = 66; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 67; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 68; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 71; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 72; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 31 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 73; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x53 | 0x73 => { cursor += 1; yystate = 74; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 75; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 76; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 77; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 78; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 37 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 79; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 38 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 39 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 80; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 40 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 81; continue 'yyl; } 0x52 | 0x56 | 0x72 | 0x76 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 41 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 82; continue 'yyl; } 0x47 | 0x67 => { cursor += 1; yystate = 83; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 42 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 78; continue 'yyl; } 0x52 | 0x72 => { cursor += 1; yystate = 84; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 43 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 85; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 44 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 86; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 45 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 22; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 46 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 87; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 47 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 88; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 48 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x4E | 0x6E => { cursor += 1; yystate = 89; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 49 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 90; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 50 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 91; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 51 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x56 | 0x76 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 52 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x46 | 0x66 => { cursor += 1; yystate = 92; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 53 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 93; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 54 => { return Some(6); } 55 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 56 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 94; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 57 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 95; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 58 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 96; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 59 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 97; continue 'yyl; } 0x43 | 0x63 => { cursor += 1; yystate = 77; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 60 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x59 | 0x79 => { cursor += 1; yystate = 98; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 61 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 99; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 62 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x42 | 0x62 => { cursor += 1; yystate = 100; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 63 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 34; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 64 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x58 | 0x78 => { cursor += 1; yystate = 101; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 65 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 102; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 66 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 103; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 67 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 100; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 68 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x41 | 0x61 => { cursor += 1; yystate = 104; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 69 => { return Some(2); } 70 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 105; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 71 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 106; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 72 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 107; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 73 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 108; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 74 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 109; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 75 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 110; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 76 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x59 | 0x79 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 77 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 111; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 78 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 112; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 79 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x47 | 0x67 => { cursor += 1; yystate = 113; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 80 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 114; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 81 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 115; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 82 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 116; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 83 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 117; continue 'yyl; } 0x55 | 0x75 => { cursor += 1; yystate = 118; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 84 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 85 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 119; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 86 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 120; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 87 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 121; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 88 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 122; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 89 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4B | 0x6B => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 90 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 91 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x55 | 0x75 => { cursor += 1; yystate = 123; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 92 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 124; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 93 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 113; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 125; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 94 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 84; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 95 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 126; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 96 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 127; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 97 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 128; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 98 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 57; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 99 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 129; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 100 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 108; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 101 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 130; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 102 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 131; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 103 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 132; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 104 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 89; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 105 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 133; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 106 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 134; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 107 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 100; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 108 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 109 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x46 | 0x66 => { cursor += 1; yystate = 135; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 110 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4B | 0x6B => { cursor += 1; yystate = 136; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 111 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 125; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 112 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 137; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 113 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 138; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 114 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 139; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 115 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 140; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 116 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 141; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 117 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 35; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 118 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 108; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 119 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 142; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 120 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x45 | 0x65 => { cursor += 1; yystate = 137; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 121 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 108; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 122 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 132; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 123 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x49 | 0x69 => { cursor += 1; yystate = 143; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 124 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 144; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 125 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 90; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 126 => { return Some(1); } 127 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 145; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 128 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 146; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 129 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 147; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 130 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 148; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 131 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 132 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 133 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 149; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 134 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x53 | 0x73 => { cursor += 1; yystate = 150; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 135 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 151; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 136 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x51 | 0x71 => { cursor += 1; yystate = 152; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 137 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 138 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 153; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 139 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 150; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 140 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 141 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x53 | 0x73 => { cursor += 1; yystate = 154; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 142 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x3E => { cursor += 1; yystate = 54; continue 'yyl; } 0x2F => { cursor += 1; yystate = 55; continue 'yyl; } 0x53 | 0x73 => { cursor += 1; yystate = 154; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 143 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 155; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 144 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 156; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 145 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 95; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 146 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x48 | 0x68 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 147 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 76; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 148 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 157; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 149 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 158; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 150 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x53 | 0x73 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 151 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 131; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 152 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x55 | 0x75 => { cursor += 1; yystate = 159; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 153 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x55 | 0x75 => { cursor += 1; yystate = 160; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 154 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 131; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 155 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 84; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 156 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 150; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 157 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 161; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 158 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5B => { cursor += 1; yystate = 162; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 159 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4F | 0x6F => { cursor += 1; yystate = 163; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 160 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 161 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 95; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 162 => { return Some(5); } 163 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 108; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn html_block_start_7(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 4; continue 'yyl; } 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 14; continue 'yyl; } } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 8; continue 'yyl; } 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 11; continue 'yyl; } 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 8; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 12; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x0C | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } 0x0A => { cursor += 1; yystate = 13; continue 'yyl; } _ => { cursor += 1; yystate = 15; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 11; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 16; continue 'yyl; } 0x2D..=0x2E | 0x30..=0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 12; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3D => { cursor += 1; yystate = 17; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 14; continue 'yyl; } 0x09 | 0x0C | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } 0x0A => { cursor += 1; yystate = 13; continue 'yyl; } _ => { cursor += 1; yystate = 15; continue 'yyl; } } } 14 => { return Some(7); } 15 => { yystate = 14; continue 'yyl; } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 16; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 12; continue 'yyl; } 0x3D => { cursor += 1; yystate = 17; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21 | 0x23..=0x26 | 0x28..=0x3B | 0x3F..=0x5F | 0x61..=0xFE => { cursor += 1; yystate = 18; continue 'yyl; } 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 17; continue 'yyl; } 0x22 => { cursor += 1; yystate = 19; continue 'yyl; } 0x27 => { cursor += 1; yystate = 20; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21 | 0x23..=0x26 | 0x28..=0x3B | 0x3F..=0x5F | 0x61..=0xFE => { cursor += 1; yystate = 18; continue 'yyl; } 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 8; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x21 | 0x23..=0xFE => { cursor += 1; yystate = 19; continue 'yyl; } 0x22 => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x26 | 0x28..=0xFE => { cursor += 1; yystate = 20; continue 'yyl; } 0x27 => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 8; continue 'yyl; } 0x2F => { cursor += 1; yystate = 9; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub enum SetextChar { Equals, Hyphen, } pub fn setext_heading_line(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x2D => { yystate = 3; continue 'yyl; } 0x3D => { yystate = 4; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x2C | 0x2E..=0xFE => { yystate = 2; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x3C | 0x3E..=0xFE => { yystate = 2; continue 'yyl; } 0x3D => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 11; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 6; continue 'yyl; } 6 => match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 5; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } }, 7 => { cursor = marker; yystate = 2; continue 'yyl; } 8 => { return Some(SetextChar::Hyphen); } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x2C | 0x2E..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 5; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 11; continue 'yyl; } 11 => match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } _ => { cursor += 1; yystate = 12; continue 'yyl; } }, 12 => { return Some(SetextChar::Equals); } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x3C | 0x3E..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } 0x3D => { cursor += 1; yystate = 13; continue 'yyl; } _ => { cursor += 1; yystate = 12; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn footnote_definition(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x5B => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5E => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { yystate = 5; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 7; continue 'yyl; } 7 => match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x5D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } }, 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x20 => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 10; continue 'yyl; } } } 10 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } pub fn scheme(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x41..=0x5A | 0x61..=0x7A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { return Some(cursor); } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 9; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 10; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 11; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 12; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 14; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 15; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 16; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 17; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 18; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 19; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 20; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 21; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 22; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 23; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 24; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 25; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 26; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 27; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 28; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 29; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 30; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 31; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 31 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 32; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 33; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 34; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 35; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 36; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn autolink_uri(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x41..=0x5A | 0x61..=0x7A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00 | 0x21..=0x3B | 0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 10; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { return Some(cursor); } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 11; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 12; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 14; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 15; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 16; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 17; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 18; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 19; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 20; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 21; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 22; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 23; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 24; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 25; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 26; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 27; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 28; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 29; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 30; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 31; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 31 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 32; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 33; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 34; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 35; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 36; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D..=0x2E | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 37; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 37 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn autolink_email(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x21 | 0x23..=0x27 | 0x2A..=0x2B | 0x2D..=0x39 | 0x3D | 0x3F | 0x41..=0x5A | 0x5E..=0x7E => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x21 | 0x23..=0x27 | 0x2A..=0x2B | 0x2D..=0x39 | 0x3D | 0x3F..=0x5A | 0x5E..=0x7E => { yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 5; continue 'yyl; } 5 => match yych { 0x21 | 0x23..=0x27 | 0x2A..=0x2B | 0x2D..=0x39 | 0x3D | 0x3F | 0x41..=0x5A | 0x5E..=0x7E => { cursor += 1; yystate = 4; continue 'yyl; } 0x40 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } }, 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 10; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 12; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 12; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 11 => { return Some(cursor); } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 14; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 15; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 14; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 15; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 16; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 16; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 17; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 18; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 18; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 19; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 20; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 20; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 21; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 20 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 22; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 23; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 22; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 23; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 24; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 25; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 24; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 25; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 26; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 27; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 26; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 27; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 28; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 29; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 28; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 29; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 30; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 31; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 30; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 31; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 32; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 33; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 31 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 32; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 33; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 34; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 35; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 34; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 35; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 36; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 37; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 36; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 37; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 38; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 39; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 37 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 38; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 39; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 38 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 40; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 41; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 39 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 40; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 41; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 40 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 42; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 43; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 41 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 42; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 43; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 42 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 44; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 45; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 43 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 44; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 45; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 44 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 46; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 47; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 45 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 46; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 47; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 46 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 48; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 49; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 47 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 48; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 49; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 48 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 50; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 51; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 49 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 50; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 51; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 50 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 52; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 53; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 51 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 52; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 53; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 52 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 54; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 55; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 53 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 54; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 55; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 54 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 56; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 57; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 55 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 56; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 57; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 56 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 58; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 59; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 57 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 58; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 59; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 58 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 60; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 61; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 59 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 60; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 61; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 60 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 62; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 63; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 61 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 62; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 63; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 62 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 64; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 65; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 63 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 64; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 65; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 64 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 66; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 67; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 65 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 66; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 67; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 66 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 68; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 69; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 67 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 68; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 69; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 68 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 70; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 71; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 69 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 70; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 71; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 70 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 72; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 73; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 71 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 72; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 73; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 72 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 74; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 75; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 73 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 74; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 75; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 74 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 76; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 77; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 75 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 76; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 77; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 76 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 78; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 79; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 77 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 78; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 79; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 78 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 80; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 81; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 79 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 80; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 81; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 80 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 82; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 83; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 81 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 82; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 83; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 82 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 84; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 85; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 83 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 84; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 85; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 84 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 86; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 87; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 85 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 86; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 87; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 86 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 88; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 89; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 87 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 88; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 89; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 88 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 90; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 91; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 89 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 90; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 91; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 90 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 92; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 93; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 91 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 92; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 93; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 92 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 94; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 95; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 93 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 94; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 95; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 94 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 96; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 97; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 95 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 96; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 97; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 96 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 98; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 99; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 97 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 98; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 99; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 98 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 100; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 101; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 99 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 100; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 101; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 100 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 102; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 103; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 101 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 102; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 103; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 102 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 104; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 105; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 103 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 104; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 105; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 104 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 106; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 107; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 105 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 106; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 107; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 106 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 108; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 109; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 107 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 108; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 109; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 108 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 110; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 111; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 109 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 110; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 111; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 110 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 112; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 113; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 111 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 112; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 113; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 112 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 114; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 115; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 113 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 114; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 115; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 114 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 116; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 117; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 115 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 116; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 117; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 116 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 118; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 119; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 117 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 118; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 119; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 118 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 120; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 121; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 119 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 120; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 121; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 120 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 122; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 123; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 121 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 122; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 123; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 122 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 124; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 125; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 123 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 124; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 125; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 124 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 126; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 127; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 125 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 126; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 127; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 126 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 128; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 129; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 127 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 128; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 129; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 128 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 130; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 131; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 129 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 130; continue 'yyl; } 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 131; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 130 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 132; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 131 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 132; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 132 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2E => { cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn html_tag(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x2F => { yystate = 3; continue 'yyl; } 0x41..=0x5A | 0x61..=0x7A => { yystate = 4; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 | 0x2D | 0x2F..=0x39 | 0x3E | 0x41..=0x5A | 0x61..=0x7A => { yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 12; continue 'yyl; } 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 5; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } 0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 9; continue 'yyl; } 9 => match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } }, 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 11 => { return Some(cursor); } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 12; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 14; continue 'yyl; } 0x2D..=0x2E | 0x30..=0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } 0x3D => { cursor += 1; yystate = 15; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 14; continue 'yyl; } 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } 0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 13; continue 'yyl; } 0x3D => { cursor += 1; yystate = 15; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21 | 0x23..=0x26 | 0x28..=0x3B | 0x3F..=0x5F | 0x61..=0xFE => { cursor += 1; yystate = 16; continue 'yyl; } 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 15; continue 'yyl; } 0x22 => { cursor += 1; yystate = 17; continue 'yyl; } 0x27 => { cursor += 1; yystate = 18; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21 | 0x23..=0x26 | 0x28..=0x3B | 0x3F..=0x5F | 0x61..=0xFE => { cursor += 1; yystate = 16; continue 'yyl; } 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x21 | 0x23..=0xFE => { cursor += 1; yystate = 17; continue 'yyl; } 0x22 => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x26 | 0x28..=0xFE => { cursor += 1; yystate = 18; continue 'yyl; } 0x27 => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } 0x3E => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn html_comment(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x2D => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 4; continue 'yyl; } 0x2D => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 4; continue 'yyl; } 0x2D => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 4; continue 'yyl; } 0x3E => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } pub fn html_processing_instruction(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x3E | 0x40..=0xFE => { yystate = 1; continue 'yyl; } 0x3F => { yystate = 3; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 1 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3E | 0x40..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } 0x3F => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return Some(cursor); } 3 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } _ => { yystate = 4; continue 'yyl; } } } 4 => { return None; } 5 => { yystate = 4; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 7 => { cursor = marker; yystate = 2; continue 'yyl; } _ => panic!("internal lexer error"), } } } } pub fn html_declaration(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x41..=0x5A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x41..=0x5A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { return Some(cursor); } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } 0x41..=0x5A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 7 => { cursor = marker; yystate = 2; continue 'yyl; } _ => panic!("internal lexer error"), } } } } pub fn html_cdata(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x43 | 0x63 => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x44 | 0x64 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 10; continue 'yyl; } } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5B => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 9; continue 'yyl; } 0x5D => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 10; continue 'yyl; } } } 10 => { return Some(cursor); } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 9; continue 'yyl; } 0x5D => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn spacechars(s: &str) -> Option { let mut cursor = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x09..=0x0D | 0x20 => { yystate = 2; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { return None; } 2 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 2; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 3 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } pub fn link_title(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x22 => { yystate = 3; continue 'yyl; } 0x27 => { yystate = 4; continue 'yyl; } 0x28 => { yystate = 5; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; if yych <= 0xFE { yystate = 7; continue 'yyl; } yystate = 2; continue 'yyl; } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; if yych <= 0xFE { yystate = 13; continue 'yyl; } yystate = 2; continue 'yyl; } 5 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x27 | 0x29..=0xFE => { yystate = 18; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 7; continue 'yyl; } 7 => match yych { 0x00..=0x21 | 0x23..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x22 => { cursor += 1; yystate = 9; continue 'yyl; } 0x5C => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } }, 8 => { cursor = marker; match yyaccept { 0 => { yystate = 2; continue 'yyl; } 1 => { yystate = 10; continue 'yyl; } 2 => { yystate = 15; continue 'yyl; } _ => { yystate = 20; continue 'yyl; } } } 9 => { yystate = 10; continue 'yyl; } 10 => { return Some(cursor); } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x21 | 0x23..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x22 => { cursor += 1; yystate = 22; continue 'yyl; } 0x5C => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 13; continue 'yyl; } 13 => match yych { 0x00..=0x26 | 0x28..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 12; continue 'yyl; } 0x27 => { cursor += 1; yystate = 14; continue 'yyl; } 0x5C => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } }, 14 => { yystate = 15; continue 'yyl; } 15 => { return Some(cursor); } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x26 | 0x28..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 12; continue 'yyl; } 0x27 => { cursor += 1; yystate = 23; continue 'yyl; } 0x5C => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 18; continue 'yyl; } 18 => match yych { 0x00..=0x27 | 0x2A..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 17; continue 'yyl; } 0x29 => { cursor += 1; yystate = 19; continue 'yyl; } 0x5C => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } }, 19 => { yystate = 20; continue 'yyl; } 20 => { return Some(cursor); } 21 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x28 | 0x2A..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 17; continue 'yyl; } 0x29 => { cursor += 1; yystate = 24; continue 'yyl; } 0x5C => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 22 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x21 | 0x23..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x22 => { cursor += 1; yystate = 9; continue 'yyl; } 0x5C => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 10; continue 'yyl; } } } 23 => { yyaccept = 2; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x26 | 0x28..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 12; continue 'yyl; } 0x27 => { cursor += 1; yystate = 14; continue 'yyl; } 0x5C => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 15; continue 'yyl; } } } 24 => { yyaccept = 3; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x27 | 0x2A..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 17; continue 'yyl; } 0x29 => { cursor += 1; yystate = 19; continue 'yyl; } 0x5C => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 20; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn dangerous_url(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x44 | 0x64 => { yystate = 3; continue 'yyl; } 0x46 | 0x66 => { yystate = 4; continue 'yyl; } 0x4A | 0x6A => { yystate = 5; continue 'yyl; } 0x56 | 0x76 => { yystate = 6; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 6 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x42 | 0x62 => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 8 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 20; continue 'yyl; } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4C | 0x6C => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x56 | 0x76 => { cursor += 1; yystate = 14; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x53 | 0x73 => { cursor += 1; yystate = 15; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x43 | 0x63 => { cursor += 1; yystate = 18; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 19; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 21; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x52 | 0x72 => { cursor += 1; yystate = 22; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 19 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 23; continue 'yyl; } _ => { yystate = 20; continue 'yyl; } } } 20 => { return Some(cursor); } 21 => { yystate = 20; continue 'yyl; } 22 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 24; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 23 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4D | 0x6D => { cursor += 1; yystate = 25; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 24 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 26; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 25 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41 | 0x61 => { cursor += 1; yystate = 27; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 26 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 27 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 28; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 28 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 29; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 29 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 30; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 30 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 31; continue 'yyl; } 0x4A | 0x6A => { cursor += 1; yystate = 32; continue 'yyl; } 0x50 | 0x70 => { cursor += 1; yystate = 33; continue 'yyl; } 0x57 | 0x77 => { cursor += 1; yystate = 34; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 31 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x49 | 0x69 => { cursor += 1; yystate = 35; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 32 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 36; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 33 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x4E | 0x6E => { cursor += 1; yystate = 37; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 34 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 38; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 35 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x46 | 0x66 => { cursor += 1; yystate = 39; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 36 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x45 | 0x65 => { cursor += 1; yystate = 37; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 37 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x47 | 0x67 => { cursor += 1; yystate = 39; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 38 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x42 | 0x62 => { cursor += 1; yystate = 40; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 39 => { return None; } 40 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 39; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn ipv6_url_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x48 | 0x68 => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x54 | 0x74 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x50 | 0x70 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 8; continue 'yyl; } 0x73 => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5B => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x25 | 0x5D => { yystate = 5; continue 'yyl; } _ => { yystate = 14; continue 'yyl; } } } 13 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 14; continue 'yyl; } 14 => match yych { 0x25 => { cursor += 1; yystate = 15; continue 'yyl; } 0x30..=0x3A | 0x41..=0x46 | 0x61..=0x66 => { cursor += 1; yystate = 13; continue 'yyl; } 0x5D => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } }, 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x32 => { cursor += 1; yystate = 17; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 16 => { return Some(cursor); } 17 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x35 => { cursor += 1; yystate = 18; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 18 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { yystate = 5; continue 'yyl; } _ => { yystate = 20; continue 'yyl; } } } 19 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 20; continue 'yyl; } 20 => match yych { 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 19; continue 'yyl; } 0x5D => { cursor += 1; yystate = 16; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } }, _ => panic!("internal lexer error"), } } } } pub fn ipv6_relaxed_url_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x61..=0x7A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 4; continue 'yyl; } 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3A => { cursor += 1; yystate = 4; continue 'yyl; } 0x61..=0x7A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5B => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x25 | 0x5D => { yystate = 5; continue 'yyl; } _ => { yystate = 11; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 11; continue 'yyl; } 11 => match yych { 0x25 => { cursor += 1; yystate = 12; continue 'yyl; } 0x30..=0x3A | 0x41..=0x46 | 0x61..=0x66 => { cursor += 1; yystate = 10; continue 'yyl; } 0x5D => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } }, 12 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x32 => { cursor += 1; yystate = 14; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 13 => { return Some(cursor); } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x35 => { cursor += 1; yystate = 15; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x5D => { yystate = 5; continue 'yyl; } _ => { yystate = 17; continue 'yyl; } } } 16 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 17; continue 'yyl; } 17 => match yych { 0x30..=0x39 | 0x41..=0x5A | 0x61..=0x7A => { cursor += 1; yystate = 16; continue 'yyl; } 0x5D => { cursor += 1; yystate = 13; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } }, _ => panic!("internal lexer error"), } } } } pub fn table_start(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x09 | 0x0B..=0x0C | 0x20 | 0x7C => { yystate = 3; continue 'yyl; } 0x2D => { yystate = 4; continue 'yyl; } 0x3A => { yystate = 5; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 6; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21..=0x2C | 0x2E..=0x39 | 0x3B..=0x7B | 0x7D..=0xFE => { yystate = 2; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 11; continue 'yyl; } } } 5 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 6; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 7 => { cursor = marker; yystate = 2; continue 'yyl; } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21..=0x2C | 0x2E..=0x39 | 0x3B..=0x7B | 0x7D..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x0B..=0x0C | 0x20 | 0x3A => { cursor += 1; yystate = 10; continue 'yyl; } 0x0D => { cursor += 1; yystate = 14; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } 0x7C => { cursor += 1; yystate = 15; continue 'yyl; } _ => { cursor += 1; yystate = 12; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 11; continue 'yyl; } 11 => match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21..=0x7B | 0x7D..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 10; continue 'yyl; } 0x0D => { cursor += 1; yystate = 14; continue 'yyl; } 0x7C => { cursor += 1; yystate = 15; continue 'yyl; } _ => { cursor += 1; yystate = 12; continue 'yyl; } }, 12 => { yystate = 13; continue 'yyl; } 13 => { return Some(cursor); } 14 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x0A => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 13; continue 'yyl; } } } 15 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21..=0x2C | 0x2E..=0x39 | 0x3B..=0xFE => { yystate = 7; continue 'yyl; } 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 15; continue 'yyl; } 0x0D => { cursor += 1; yystate = 14; continue 'yyl; } 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } 0x3A => { cursor += 1; yystate = 9; continue 'yyl; } _ => { cursor += 1; yystate = 12; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } pub fn table_cell(s: &str, spoiler: bool) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); // In fact, `table_cell` matches non-empty table cells only. The empty // string is also a valid table cell, but is handled by the default rule. // This approach prevents re2c's match-empty-string warning. if spoiler { { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x26 | 0x28..=0x5B | 0x5D..=0x7B | 0x7D..=0xFE => { yystate = 1; continue 'yyl; } 0x27 | 0x5C => { yystate = 5; continue 'yyl; } 0x7C => { yystate = 6; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x26 | 0x28..=0x5B | 0x5D..=0x7B | 0x7D..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } 0x27 | 0x5C => { cursor += 1; yystate = 5; continue 'yyl; } 0x7C => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return Some(cursor); } 3 => { yystate = 4; continue 'yyl; } 4 => { return None; } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x26 | 0x28..=0x5B | 0x5D..=0x7B | 0x7D..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } 0x27 | 0x5C | 0x7C => { cursor += 1; yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x27 | 0x7C => { cursor += 1; yystate = 1; continue 'yyl; } _ => { yystate = 4; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x27 | 0x7C => { cursor += 1; yystate = 1; continue 'yyl; } _ => { yystate = 8; continue 'yyl; } } } 8 => { cursor = marker; yystate = 2; continue 'yyl; } _ => panic!("internal lexer error"), } } } } else { { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5B | 0x5D..=0x7B | 0x7D..=0xFE => { yystate = 1; continue 'yyl; } 0x5C => { yystate = 4; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 1 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5B | 0x5D..=0x7B | 0x7D..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } 0x5C => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 2 => { return Some(cursor); } 3 => { return None; } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5B | 0x5D..=0xFE => { cursor += 1; yystate = 1; continue 'yyl; } 0x5C => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } } pub fn table_cell_end(s: &str) -> Option { let mut cursor = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x7C => { yystate = 2; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { return None; } 2 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 2; continue 'yyl; } _ => { yystate = 3; continue 'yyl; } } } 3 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } pub fn table_row_end(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x09 | 0x0B..=0x0C | 0x20 => { yystate = 3; continue 'yyl; } 0x0A => { yystate = 4; continue 'yyl; } 0x0D => { yystate = 6; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { yystate = 8; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yystate = 5; continue 'yyl; } 5 => { return Some(cursor); } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x0A => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 8; continue 'yyl; } 8 => match yych { 0x09 | 0x0B..=0x0C | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } 0x0A => { cursor += 1; yystate = 4; continue 'yyl; } 0x0D => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 9; continue 'yyl; } }, 9 => { cursor = marker; yystate = 2; continue 'yyl; } _ => panic!("internal lexer error"), } } } } #[cfg(feature = "shortcodes")] pub fn shortcode(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x2B | 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2B | 0x2D | 0x30..=0x3A | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { yystate = 5; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; yystate = 5; continue 'yyl; } 5 => match yych { 0x2B | 0x2D | 0x30..=0x39 | 0x41..=0x5A | 0x5F | 0x61..=0x7A => { cursor += 1; yystate = 4; continue 'yyl; } 0x3A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } }, 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } pub fn open_multiline_block_quote_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3E => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x3D | 0x3F..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { ctxmarker = cursor; cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 8; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 8 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } pub fn close_multiline_block_quote_fence(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let mut ctxmarker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3E => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0x3D | 0x3F..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { ctxmarker = cursor; cursor += 1; yystate = 7; continue 'yyl; } 0x3E => { cursor += 1; yystate = 6; continue 'yyl; } _ => { ctxmarker = cursor; cursor += 1; yystate = 8; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0B..=0x0C | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 5; continue 'yyl; } 0x09 | 0x20 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { cursor += 1; yystate = 8; continue 'yyl; } } } 8 => { cursor = ctxmarker; { return Some(cursor); } } _ => panic!("internal lexer error"), } } } } // Returns the length of the match, the tasklist item contents, and the range of // the tasklist item match. // The match is not guaranteed to be one byte or one "character" long; the // caller must ascertain its fitness for purpose. pub fn tasklist(s: &str) -> Option<(usize, &str, std::ops::Range)> { let mut cursor = 0; let mut marker = 0; let len = s.len(); let t1; let mut t2; let mut yyt1 = 0; { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x09..=0x0D | 0x20 => { yystate = 3; continue 'yyl; } 0x5B => { yystate = 4; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 5; continue 'yyl; } 0x5B => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5C | 0x5E..=0xFE => { yyt1 = cursor; cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 5 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09..=0x0D | 0x20 => { cursor += 1; yystate = 5; continue 'yyl; } 0x5B => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 6 => { cursor = marker; yystate = 2; continue 'yyl; } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5C | 0x5E..=0xFE => { yyt1 = cursor; cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x09 | 0x0B..=0x0C | 0x0E..=0x5C | 0x5E..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } 0x5D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 6; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x21..=0xFE => { yystate = 6; continue 'yyl; } _ => { cursor += 1; yystate = 10; continue 'yyl; } } } 10 => { t1 = yyt1; t2 = cursor; t2 = (t2 as isize + -2) as usize; { if cursor == len + 1 { cursor -= 1; } return Some((cursor, &s[t1..t2], t1..t2)); } } _ => panic!("internal lexer error"), } } } } pub fn description_item_start(s: &str) -> Option { let mut cursor = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3A | 0x7E => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x09 | 0x20 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } #[cfg(feature = "phoenix_heex")] pub fn phoenix_opening_tag(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yyaccept: usize = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { yyaccept = 0; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2E => { cursor += 1; yystate = 4; continue 'yyl; } 0x41..=0x5A => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; if yyaccept == 0 { yystate = 2; continue 'yyl; } else { yystate = 7; continue 'yyl; } } 6 => { yyaccept = 1; marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x23..=0x26 | 0x28..=0x2C | 0x30..=0x3B | 0x3F..=0x7A | 0x7C | 0x7E..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x2E => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 7 => { return Some(cursor - 1); } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x23..=0x26 | 0x28..=0x2C | 0x30..=0x3B | 0x3F..=0x7A | 0x7C | 0x7E..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 7; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41..=0x5A => { cursor += 1; yystate = 6; continue 'yyl; } 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } _ => panic!("internal lexer error"), } } } } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_closing_tag(s: &str) -> Option { let mut cursor = 0; let mut marker = 0; let len = s.len(); { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2F => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2E => { cursor += 1; yystate = 6; continue 'yyl; } 0x41..=0x5A => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x23..=0x26 | 0x28..=0x2C | 0x30..=0x3B | 0x3F..=0x7A | 0x7C | 0x7E..=0xFE => { cursor += 1; yystate = 7; continue 'yyl; } 0x2E => { cursor += 1; yystate = 9; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x08 | 0x0E..=0x1F | 0x23..=0x26 | 0x28..=0x2C | 0x30..=0x3B | 0x3F..=0x7A | 0x7C | 0x7E..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } 0x3E => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x41..=0x5A => { cursor += 1; yystate = 7; continue 'yyl; } 0x61..=0x7A => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { return Some(cursor - 3); } _ => panic!("internal lexer error"), } } } } #[cfg(feature = "phoenix_heex")] pub fn phoenix_closing_tag(s: &str) -> Option { phoenix_block_closing_tag(s).map(|tag_len| tag_len + 3) } #[cfg(feature = "phoenix_heex")] pub fn phoenix_closing_tag_end(s: &str, tag_name: &str) -> Option { let bytes = s.as_bytes(); let len = bytes.len(); let mut i = 0; while i + 3 < len { if bytes[i] == b'<' && bytes[i + 1] == b'/' { if let Some(tag_name_len) = phoenix_block_closing_tag(&s[i..]) { if &s[i + 2..i + 2 + tag_name_len] == tag_name { return Some(i + 2 + tag_name_len + 1); } } } i += 1; } None } #[cfg(feature = "phoenix_heex")] pub fn phoenix_self_closing_tag_end(s: &str) -> Option { let bytes = s.as_bytes(); let len = bytes.len(); if len < 4 || bytes[0] != b'<' { return None; } let mut i = 1; while i + 1 < len { match bytes[i] { b'"' | b'\'' => { i = crate::strings::skip_quoted_string(s, i + 1, bytes[i]); } b'/' if bytes[i + 1] == b'>' => { return Some(i + 2); } b'>' => { return None; } _ => i += 1, } } None } #[cfg(feature = "phoenix_heex")] pub fn phoenix_directive(s: &str) -> Option { let bytes = s.as_bytes(); let len = s.len(); if s.len() < 4 || bytes[0] != b'<' || bytes[1] != b'%' { return None; } if bytes[2] == b'!' && s.len() >= 7 { let mut cursor = 0; let mut marker = 0; { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x25 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x21 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x2D => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } 0x2D => { cursor += 1; yystate = 9; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 9 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x2C | 0x2E..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } 0x2D => { cursor += 1; yystate = 10; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 10 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x24 | 0x26..=0xFE => { cursor += 1; yystate = 8; continue 'yyl; } 0x25 => { cursor += 1; yystate = 11; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 11 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x3E => { cursor += 1; yystate = 12; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 12 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } if bytes[2] == b'#' { let mut cursor = 0; let mut marker = 0; { #[allow(unused_assignments)] let mut yych: u8 = 0; let mut yystate: usize = 0; 'yyl: loop { match yystate { 0 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; cursor += 1; match yych { 0x3C => { yystate = 3; continue 'yyl; } _ => { yystate = 1; continue 'yyl; } } } 1 => { yystate = 2; continue 'yyl; } 2 => { return None; } 3 => { marker = cursor; yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x25 => { cursor += 1; yystate = 4; continue 'yyl; } _ => { yystate = 2; continue 'yyl; } } } 4 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x23 => { cursor += 1; yystate = 6; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 5 => { cursor = marker; yystate = 2; continue 'yyl; } 6 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x24 | 0x26..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x25 => { cursor += 1; yystate = 7; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 7 => { yych = unsafe { if cursor < len { *s.as_bytes().get_unchecked(cursor) } else { 255 } }; match yych { 0x00..=0x3D | 0x3F..=0xFE => { cursor += 1; yystate = 6; continue 'yyl; } 0x3E => { cursor += 1; yystate = 8; continue 'yyl; } _ => { yystate = 5; continue 'yyl; } } } 8 => { return Some(cursor); } _ => panic!("internal lexer error"), } } } } let mut cursor = 2; while cursor + 1 < len { match bytes[cursor] { b'"' | b'\'' => { cursor = crate::strings::skip_quoted_string(s, cursor + 1, bytes[cursor]); } b'%' if bytes[cursor + 1] == b'>' => { return Some(cursor + 2); } _ => cursor += 1, } } None } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_directive_start(s: &str) -> Option { let bytes = s.as_bytes(); if bytes.len() >= 2 && bytes[0] == b'<' && bytes[1] == b'%' { Some(2) } else { None } } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_expression_start(s: &str) -> Option { let bytes = s.as_bytes(); if !bytes.is_empty() && bytes[0] == b'{' { Some(1) } else { None } } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_directive_end(s: &str) -> bool { let bytes = s.as_bytes(); let len = bytes.len(); if len < 2 { return false; } let mut i = 0; while i < len { match bytes[i] { b'"' | b'\'' => { i = crate::strings::skip_quoted_string(s, i + 1, bytes[i]); } b'-' if i + 3 < len && bytes[i + 1] == b'-' && bytes[i + 2] == b'%' && bytes[i + 3] == b'>' => { return true; } b'%' if i + 1 < len && bytes[i + 1] == b'>' => { return true; } _ => i += 1, } } false } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_comment_end(s: &str) -> bool { let bytes = s.as_bytes(); let len = bytes.len(); if len < 2 { return false; } let mut i = 0; while i < len { match bytes[i] { b'"' | b'\'' => { i = crate::strings::skip_quoted_string(s, i + 1, bytes[i]); } b'%' if i + 1 < len && bytes[i + 1] == b'>' => { return true; } _ => i += 1, } } false } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_multiline_comment_end(s: &str) -> bool { let bytes = s.as_bytes(); let len = bytes.len(); if len < 4 { return false; } let mut i = 0; while i < len { match bytes[i] { b'"' | b'\'' => { i = crate::strings::skip_quoted_string(s, i + 1, bytes[i]); } b'-' if i + 3 < len && bytes[i + 1] == b'-' && bytes[i + 2] == b'%' && bytes[i + 3] == b'>' => { return true; } _ => i += 1, } } false } #[cfg(feature = "phoenix_heex")] pub fn phoenix_block_expression_end(s: &str) -> bool { let bytes = s.as_bytes(); let len = bytes.len(); if len < 1 { return false; } let mut i = 0; while i < len { match bytes[i] { b'"' | b'\'' => { i = crate::strings::skip_quoted_string(s, i + 1, bytes[i]); } b'}' => { return true; } _ => i += 1, } } false }