gdritter repos rust-examples / master regexp / src / re / instruction.rs
master

Tree @master (Download .tar.gz)

instruction.rs @masterraw · history · blame

1
2
3
4
5
6
7
8
/* A single instruction as used in the VM-based matcher */
#[derive(Clone,Debug)]
pub enum Instr {
    Char(char),        /* match a character or fail */
    Match,             /* match anything successfully */
    Jmp(usize),          /* jump to instr i */
    Split(usize, usize),   /* try both instrs i and j */
}