diff --git a/src/schala_lang/autoparser.rs b/src/schala_lang/autoparser.rs index 30b546f..b71ea17 100644 --- a/src/schala_lang/autoparser.rs +++ b/src/schala_lang/autoparser.rs @@ -9,6 +9,18 @@ struct AutoParser { tokens: Vec, } +/* BNF + * all terminals in this BNF refer to TokenType values + + literal := Kw::True | Kw::False | StrLiteral | number_literal + number_literal := int_literal | float_literal + float_literal := digits float_continued + float_continued := ε | Period digits + int_literal := HexLiteral | nonhex_int + nonhex_int := BinNumberSigil+ digits + digits := (DigitGroup Underscore)+ + */ + impl AutoParser { fn new(tokens: Vec) -> AutoParser { AutoParser { tokens: tokens.into_iter().rev().collect() }