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

Implement foreign rules #19

Open
wants to merge 8 commits into
base: nodejs
Choose a base branch
from

Conversation

CoderPuppy
Copy link

Fixes #17

This adds a magic rule called foreign and adds it to the compiler.

I couldn't figure out what to do with super rules.

@aneilbaboo
Copy link

@CoderPuppy - I realize this is a long time ago, but do you recall how to use this?

@CoderPuppy
Copy link
Author

@aneilbaboo: I looked back through it and I'm pretty sure it works like this:

grammar A {
  a = "a"
}

grammar B {
  b = "b",
  ab = A.a | b
}

then B.ab would match a or b

@aneilbaboo
Copy link

Ah, just like the spec. Thanks @CoderPuppy.

For any future readers - it looks like https://github.com/Page-/ometa-js has foreign rule syntax working, and is still being maintained.

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

Successfully merging this pull request may close these issues.

foreign rules
2 participants