Skip to content
Snippets Groups Projects
Select Git revision
  • dfd79ce0996e48f823e6015eb357456d91b25e1e
  • master default protected
2 results

rtic_bare5.rs

Blame
  • Forked from Per Lindgren / e7020e_2021
    Source project has a limited visibility.
    parser.lalrpop 257 B
    use std::str::FromStr;
    
    grammar;
    
    pub NumOrId = {
        Num => <>.to_string(),
        Id,
    }
    
    pub Num: usize = {
        r"[0-9]+" => usize::from_str(<>).unwrap(),
    };
    
    pub Id: String = {
        r"([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|_)*" => String::from_str(<>).unwrap(),
    };