artlr_syntax 0.3.0

Another Rust tool for syntax analysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub struct ContextFreeGrammarProduction<TType> {
    pub input: TType,
    pub output: Vec<TType>,
}

impl<T: PartialEq<T>> ContextFreeGrammarProduction<T> {
    pub fn new(input: T, output: Vec<T>) -> Self {
        ContextFreeGrammarProduction { input, output }
    }
}

impl<TType: Clone + PartialEq> Clone for ContextFreeGrammarProduction<TType> {
    fn clone(&self) -> Self {
        Self::new(self.input.clone(), self.output.clone())
    }
}