|
1 | 1 | token <- tribble( |
2 | | - ~text , ~class , ~token , |
3 | | - "&" , "logical" , "AND" , |
4 | | - "&&" , "logical" , "AND2" , |
5 | | - "|" , "logical" , "OR" , |
6 | | - "||" , "logical" , "OR2" , |
7 | | - ">" , "logical" , "GT" , |
8 | | - "<" , "logical" , "LT" , |
9 | | - "<=" , "logical" , "LE" , |
10 | | - ">=" , "logical" , "GE" , |
11 | | - "!=" , "logical" , "NE" , |
12 | | - "==" , "logical" , "EQ" , |
13 | | - "=" , "assign_left" , "EQ_SUB" , |
14 | | - "=" , "assign_left" , "EQ_ASSIGN" , |
15 | | - "<-" , "assign_left" , "LEFT_ASSIGN" , |
16 | | - "->" , "assign_right", "RIGHT_ASSIGN", |
17 | | - "+" , "math" , "'+'" , |
18 | | - "-" , "math" , "'-'" , |
19 | | - "*" , "math" , "'*'" , |
20 | | - "/" , "math" , "'/'" , |
21 | | - "^" , "math" , "'^'" , |
22 | | - "~" , "formula" , "'~'" , |
23 | | - "if" , "cond" , "IF" , |
24 | | - "else" , "cond" , "ELSE" , |
25 | | - "in" , "loop_cond" , "IN" , |
26 | | - "while", "loop_cond" , "WHILE" |
| 2 | + ~text, ~class, ~token, |
| 3 | + "&", "logical", "AND", |
| 4 | + "&&", "logical", "AND2", |
| 5 | + "|", "logical", "OR", |
| 6 | + "||", "logical", "OR2", |
| 7 | + ">", "logical", "GT", |
| 8 | + "<", "logical", "LT", |
| 9 | + "<=", "logical", "LE", |
| 10 | + ">=", "logical", "GE", |
| 11 | + "!=", "logical", "NE", |
| 12 | + "==", "logical", "EQ", |
| 13 | + "=", "assign_left", "EQ_SUB", |
| 14 | + "=", "assign_left", "EQ_ASSIGN", |
| 15 | + "<-", "assign_left", "LEFT_ASSIGN", |
| 16 | + "->", "assign_right", "RIGHT_ASSIGN", |
| 17 | + "+", "math", "'+'", |
| 18 | + "-", "math", "'-'", |
| 19 | + "*", "math", "'*'", |
| 20 | + "/", "math", "'/'", |
| 21 | + "^", "math", "'^'", |
| 22 | + "~", "formula", "'~'", |
| 23 | + "if", "cond", "IF", |
| 24 | + "else", "cond", "ELSE", |
| 25 | + "in", "loop_cond", "IN", |
| 26 | + "while", "loop_cond", "WHILE" |
27 | 27 | ) |
28 | 28 |
|
29 | 29 | math_token <- token$token[token$class == "math"] |
@@ -66,6 +66,3 @@ op_token <- c( |
66 | 66 | "EQ_SUB", "ELSE", "IN", |
67 | 67 | "EQ_FORMALS" |
68 | 68 | ) |
69 | | - |
70 | | - |
71 | | - |
0 commit comments