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

Parsing based on left-recursive rules differs from Ohm/JS #63

Open
10 of 12 tasks
stlutz opened this issue Mar 31, 2021 · 0 comments
Open
10 of 12 tasks

Parsing based on left-recursive rules differs from Ohm/JS #63

stlutz opened this issue Mar 31, 2021 · 0 comments

Comments

@stlutz
Copy link

stlutz commented Mar 31, 2021

Given the following grammar:

MyGrammar {
	Expression
		= Expression "(" ")" -- functionCall
		| Expression "." letter+ -- fieldAccess
		| letter+ -- reference
}

In the Ohm/JS editor the following strings are all parsed successfully:

  • var
  • var.field
  • var.field.field.field.field
  • func()
  • var.method()
  • var.field.field.method()

In Ohm/S, some of them are not:

  • var
  • var.field
  • var.field.field.field.field
  • func()
  • var.method()
  • var.field.field.method()

It looks to me like left-recursive rules are not handled correctly in the Smalltalk implementation.

@stlutz stlutz changed the title Ohm/S parsing differs from Ohm/JS Parsing based on left-recursive rules differs from Ohm/JS Mar 31, 2021
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