sbnf icon indicating copy to clipboard operation
sbnf copied to clipboard

Allow unquoted CLAUSES as scope names

Open eugenesvk opened this issue 2 years ago • 1 comments

Given the mandate of UPPERCASE for the vars, these should add more benefits - like allowing using them within{scope} without having to {#[INTERPOLATE]}

main : ( ~( foo
          | bar
       )  )*
     ;
FOO='meFOO'
BAR='meBAR'
foo : 'foo'{FOO} ; # ← this should work the same as
bar : 'bar'{#[BAR]} ;     # ← this

eugenesvk avatar Jun 05 '23 16:06 eugenesvk

Unfortunately this doesn't quite work because variables are required to be ASCII uppercase, but not unicode uppercase. (This is due to case not actually being meaningful in some languages) So something like 'a'{CLAUSé} would be ambiguous as to whether it's interpolating like 'a'{#[CLAUS]é} or 'a'{#[CLAUSé]}.

BenjaminSchaaf avatar Sep 26 '23 14:09 BenjaminSchaaf