Skip to content

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

@stlutz

Description

@stlutz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions