aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-06-12 00:40:28 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-06-12 09:44:00 +0900
commit2dd098d1e16bd0b8786ca97ccc7d3b06fa6bc3d1 (patch)
tree2e5a9ffa712ffe553d5ecafb35e27a7a3cd1fa11 /README.md
parentSupport the underscore symbol matching any symbols in vartan-test command (diff)
downloadcotia-2dd098d1e16bd0b8786ca97ccc7d3b06fa6bc3d1.tar.gz
cotia-2dd098d1e16bd0b8786ca97ccc7d3b06fa6bc3d1.tar.xz
Prohibit using a pattern in an alternative
When a syntax error occurs, the parser must provide a user with the names of expected tokens. However, if a pattern appears directly in an alternative, Vartan cannot assign an appropriate name to the pattern. Therefore, this commit prohibits alternatives from containing patterns.
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 3718437..9c8d649 100644
--- a/README.md
+++ b/README.md
@@ -302,7 +302,7 @@ Alternative:
<element-1> <element-2> ... <element-N>
```
-An element an alternative contains is a terminal symbol, a non-terminal symbol, a pattern, or a string literal.
+An element an alternative contains is a terminal symbol, a non-terminal symbol, or a string literal. Unlike string literals, patterns cannot be contained in alternatives.
You can define terminal symbols in the same grammar as non-terminal symbols.