/// helper trait for the [permutation()] combinator
///
/// this trait is implemented for tuples of up to 21 elements
pub trait Permutation<I, O, E> {
/// tries to apply all parsers in the tuple in various orders until all of them succeed
fn permutation(&mut self, input: I) -> IResult<I, O, E>;
}
but I need 54 :( 21 is not enough, what can I do about it?
parse_ignored_table
is defined in way that it just skips the tables that do not have a parsing method yet
permutation_trait!(FnA A, FnB B, ..., FnT T, FnU U);
None
s for
match
is_some
is too crazy for 54 fields/typesparse_ignored_table
, so I assume you can skip a table even if you don't know its type yet... and you probably have a type code in the table header that lets you identify the specific table.
bspeice
Likely easier to read into memory, but using something like BufReader would make that easier. Most of the nom
functions are abstracted over various Input*
traits, so maybe have a concrete Read
er that implements those?
parse_radius_attribute
is called with an empty array, an example below:i: [20, 1f, 4d, 49, 57, 56, 42, 41, 42, 2d, 53, 57, 30, 31, 2d, 4d, 49, 54, 43, 48, 45, 4c, 4c, 2d, 39, 31, 35, 41, 2d, 57, 49]
i: []
i: [20, 1f, 4d, 49, 57, 56, 42, 41, 42, 2d, 53, 57, 30, 31, 2d, 4d, 49, 54, 43, 48, 45, 4c, 4c, 2d, 39, 31, 35, 41, 2d, 57, 49]
&[& [u8]]
, how could I make it working with nom?