Closed extf33 closed 1 year ago
I've got two issues.
Code:
fn main() { let source = r" Foo ::= ['0'-'1']; "; let result = ebnf::get_grammar(source); println!("{:#?}", result); }
Output:
Ok( Grammar { expressions: [ Expression { lhs: "Foo", rhs: Optional( String( "0", ), ), }, ], }, )
fn main() { let source = r" Bar ::= '\''; "; let result = ebnf::get_grammar(source); println!("{:#?}", result); }
Err( Error( VerboseError { errors: [ ( "';\n ", Char( ';', ), ), ], }, ), )
I've got two issues.
1. The code below should print an error.
Code:
Output:
2. The code below should be parsed normally.
Code:
Output: