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

Unexpected difference between lexical and syntactic rule #42

Open
stlutz opened this issue Jul 11, 2019 · 0 comments
Open

Unexpected difference between lexical and syntactic rule #42

stlutz opened this issue Jul 11, 2019 · 0 comments

Comments

@stlutz
Copy link

stlutz commented Jul 11, 2019

I was using the following rules in Ohm-S:

Text {
  TextRule
    = text

  textCharacter
      = "\\\""
      | "\\\\"
      | ~"\\" ~"\"" any

  text
    = "\"" textCharacter+ "\""
}

When trying to match the input Hello World starting from text everything works as expected and the string is correctly matched. When starting from TextRule, however, the expression can not be matched.

I tried the very same setup in Ohm/JS, which was able to match with either rule as the starting rule.

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