diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-08 13:07:56 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-10 23:14:41 +0900 |
commit | 2438fa4435d6393168412574a3ef94396a4debe5 (patch) | |
tree | 390ea502d7472af78b68f7bfef928d48525d533e /README.md | |
parent | Change syntax for top-level directives (diff) | |
download | cotia-2438fa4435d6393168412574a3ef94396a4debe5.tar.gz cotia-2438fa4435d6393168412574a3ef94396a4debe5.tar.xz |
Add #assign directive
An #assign directive changes only precedence.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -501,6 +501,8 @@ foobar `#left` and `#right` directives allow you to define precedence and associativiry of symbols. `#left`/`#right` each assign the left/right associativity to symbols. +If you want to change precedence, `#assign` directive helps you. `#assign` directive changes only precedence, not associativity. + When the right-most terminal symbol of an alternative has precedence or associativity defined explicitly, the alternative inherits its precedence and associativity. `#prec` directive assigns the same precedence as a specified symbol to an alternative. |