#![allow(dead_code)]
#![allow(unused_comparisons)]
#![allow(unused_variables)]
#![allow(unused_imports)]
#[macro_use]
extern crate nom;
use nom::character::{is_digit, streaming::alpha1 as alpha};
use std::str;
named!(multi<&[u8], () >, fold_many0!( take_while1!( is_digit ), (), |_, _| {}));
#[cfg(feature = "alloc")]
named!(
value<Vec<Vec<&str>>>,
do_parse!(
first_line: map_res!(is_not!("\n"), std::str::from_utf8)
>> rest:
many_m_n!(
0,
1,
separated_list0!(
tag!("\n\t"),
map_res!(take_while!(call!(|c| c != b'\n')), std::str::from_utf8)
)
)
>> (rest)
)
);
#[cfg(feature = "alloc")]
fn wrap_suffix(input: &Option<Vec<&[u8]>>) -> Option<String> {
if input.is_some() {
Some("hello".to_string())
} else {
None
}
}
#[cfg(feature = "alloc")]
named!(parse_suffix<&[u8],Option<String>>,do_parse!(
u: opt!(many1!(alt!(
complete!(tag!("%")) | complete!(tag!("#")) | complete!(tag!("@")) | complete!(alpha)
))) >>
(wrap_suffix(&u))
));