From 2dd098d1e16bd0b8786ca97ccc7d3b06fa6bc3d1 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sun, 12 Jun 2022 00:40:28 +0900 Subject: 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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3718437..9c8d649 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ Alternative: ... ``` -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. -- cgit v1.2.3