ometa-js
ometa-js copied to clipboard
Implement foreign rules
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.
@CoderPuppy - I realize this is a long time ago, but do you recall how to use this?
@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
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.