-
I am trying to parse formulas written in Excel using LALR(1) I did:
I would appreciate any suggestions to make it faster as well. Here is the MWE lark script I have: An example formula I want to parse: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You currently have an infinite recursion expr: NUMBER | ESCAPED_STRING | CELL_RANGE | CELL_REF | _function | "(" comp_sym ")" | "-" expr |
Beta Was this translation helpful? Give feedback.
You currently have an infinite recursion
comp_sym -> conc_sym -> sym2 -> sym1 -> expr -> comp_sym
. I think just removing the first branch ofexpr
should fix this. You probably also want to avoid the empty branch ofexpr
(i.e. the| |
thing you have there), and you probably wantcomp_sym
inside of parentheses.