constr: Misuse iterators to parse tokens

This commit is contained in:
2023-10-20 15:33:02 -05:00
parent 7f7393d2c6
commit a26a01fc17
9 changed files with 333 additions and 67 deletions

View File

@@ -5,10 +5,11 @@ Start = Expr ;
Literal = STRING | CHARACTER | FLOAT | INTEGER | Bool ;
Bool = "true" | "false" ;
Identifier = IDENTIFIER ;
(* # Expressions *)
(* expression *)
Expr = Ignore
Block = '{' Expr? '}' ;
Expr = Ignore ;
Group = '(' Expr? ')' ;
Primary = Item | Identifier | Literal
| Block | Group | Branch ;
@@ -26,9 +27,9 @@ Unary = (UnaryOp)* Primary ;
(* expression::math::operator *)
IgnoreOp = ';' ;
CompareOp = '<' | "<=" | "==" | "!=" | ">=" | '>' ;
AssignOp = '=' | "+=" | "-=" | "*=" | "/=" |
"&=" | "|=" | "^=" |"<<=" |">>=" ;
CompareOp = '<' | "<=" | "==" | "!=" | ">=" | '>' ;
LogicOp = "&&" | "||" | "^^" ;
BitwiseOp = '&' | '|' | '^' ;