Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ident based parser #3

Open
jahav opened this issue Aug 27, 2023 · 1 comment
Open

Use ident based parser #3

jahav opened this issue Aug 27, 2023 · 1 comment

Comments

@jahav
Copy link
Member

jahav commented Aug 27, 2023

The tokens currently detect a piece of a formula and also a type of a formula, e.g. it detects prefix through exclamation mark at the end of a token (e.g. SomeName!) and that way it is differentiated from a name token that doesn't have the exclamation mark at the end.

It works in most cases, but there are likely some edge cases, where name and other types are aliased and tokens are not what we expect.

The only case I have seen so far is a 3D reference, where A5:Sheet5!A1:A5 is recognized as a 3D reference instead of A1_CELL RANGE SHEET_PREFIX A1_AREA and I made a workaround for it, but there likely are others.

Instead, move to ident based parser, where token doesn't necessary mean specific type and it is handled in the parser and token is responsible only for tokens.

Instead, use IDENT token for sheet name or a name and separate exclamation mark.

@jahav
Copy link
Member Author

jahav commented Oct 22, 2023

More problems are things like
A1:A1B2:D1 where A1B2 is a name
Due to greed, there are two tokens A1:A1 and B2:D1

jahav added a commit that referenced this issue Oct 22, 2023
This will remove greedy consumption of formulas like A1:B2C4, that would eat A1:B2, leaving C4  there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant