// Copyright 2018 Steven Bosnick // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms #![crate_type = "lib"] extern crate luther; #[macro_use] extern crate luther_derive; #[derive(Lexer, Debug)] pub enum Token { // These two regex's are ambiguous because "ab", "abb" // etc. will match both variants, but the priority_group // will resolve the ambiguity. #[luther(regex = "ab*", priority_group = "1")] Ab, #[luther(regex = "abb*", priority_group = "2")] Abb, }