fn register(input: &str) -> ParseResult<Register> {
    context(
        Error::REGISTER_NOT_DEFINED,
        cut(map_opt(identifier, |name| match name {
            "ACC" => Some(Register::Accumulator),
            "SPR" => Some(Register::StackPointer),
            other => Register::named(other),
        })),
    )(input)
}
/// register parses predefined registers and user defined registers using the Register
/// structure and the identifier parser.
register parses predefined registers and user defined registers using the Register
structure and the identifier parser.
register parses predefined registers and user defined registers using the Register structure and the identifier parser .
fn register(input: &str) -> ParseResult<Register> {
    context(
        Error::REGISTER_NOT_DEFINED,
        cut(map_opt(identifier, |name| match name {
            "ACC" => Some(Register::Accumulator),
            "SPR" => Some(Register::StackPointer),
            other => Register::named(other),
        })),
    )(input)
}
fn register ( input : & str ) -> ParseResult < Register > { context ( Error :: REGISTER_NOT_DEFINED , cut ( map_opt ( identifier , | name | match name { " " => Some ( Register :: Accumulator ) , " " => Some ( Register :: StackPointer ) , other => Register :: named ( other ) , } ) ) , ) ( input ) }
register parses predefined registers and user defined registers using the Register
structure and the identifier parser.
register parses predefined registers and user defined registers using the Register structure and the identifier parser .
input
&str
input
&str