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

How do weights work on Lark rules / terminals? #1491

Open
FruitfulApproach opened this issue Nov 21, 2024 · 1 comment
Open

How do weights work on Lark rules / terminals? #1491

FruitfulApproach opened this issue Nov 21, 2024 · 1 comment
Labels

Comments

@FruitfulApproach
Copy link

FruitfulApproach commented Nov 21, 2024

I've googled around the docs and found no info on this and the issues forum posts about weights don't mention how they work.

So is .1 higher priority than .2 ?

I'm using Earley parser because the grammar is just too hard to disambiguate or remove collisions from when using LALR.

@FruitfulApproach
Copy link
Author

I was thinking of using weights on various math operators. E.g. * will always have higher priority than + because in math that's how things are done conventionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant