arr-ai / wbnf

ωBNF implementation
Apache License 2.0
7 stars 4 forks source link

More flexible @ #85

Open marcelocantos opened 4 years ago

marcelocantos commented 4 years ago

@ currently refers to the next level down in the stack. Make it more flexible, so that it can refer to other levels.

The primary need is to support referring to the same level. Proposed syntax is @0. Further extensions might be:

  1. @n: n levels down
  2. @-n: n levels up
  3. rule.n: level n in rule.