aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-05-08 13:07:56 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-05-10 23:14:41 +0900
commit2438fa4435d6393168412574a3ef94396a4debe5 (patch)
tree390ea502d7472af78b68f7bfef928d48525d533e /README.md
parentChange syntax for top-level directives (diff)
downloadcotia-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.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/README.md b/README.md
index 92c270c..bf89c10 100644
--- a/README.md
+++ b/README.md
@@ -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.