Skip to content

Modifying Lark script parsing Excel formulas using Earley to LALR(1) #1241

Answered by MegaIng
onatyap asked this question in Q&A
Discussion options

You must be logged in to vote

You currently have an infinite recursion comp_sym -> conc_sym -> sym2 -> sym1 -> expr -> comp_sym. I think just removing the first branch of expr should fix this. You probably also want to avoid the empty branch of expr (i.e. the | | thing you have there), and you probably want comp_sym inside of parentheses.

expr: NUMBER | ESCAPED_STRING | CELL_RANGE | CELL_REF | _function | "(" comp_sym ")" |  "-" expr

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@onatyap
Comment options

@MegaIng
Comment options

@onatyap
Comment options

@MegaIng
Comment options

@onatyap
Comment options

Answer selected by onatyap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants