Made RulesLexer into a tokenize_rules() function
Made RulesParser into a function, parse_rules()