An attempt at making a lexical + syntax analyzer in Rust
In its final form, this analyzer will be able to do the operations of addition, subtraction, multiplication, division, and modulus; this is in addition to being able to assign and compare variables.
Grammar: -> '$'<stmt_list>'?' <stmt_list -> ';' {';'}
stmt -> <int_declaration> -> "rst" <short_declaration -> "rort" -> "rong" -> <int_declaration> | <short_declaration> | <long_declaration> 'id' ';'
-> '{' { ;} '}' -> 'id' '=' <expr ';' -> {('/'|'*'|'%') } -> {('+'|'-') } factor -> 'id' | 'int_lit' | '('')'
-> {('<'|'>'|'~'|'^') } -> {('+'|'-') } <bfactor -> 'id' | 'int_lit' | '('')'