From ce7fd7b5a26bdeeee7c8385fd7cabd5686e9af37 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 22 Jan 2018 10:49:55 +0100 Subject: [PATCH 1/2] fix(grammar) A range can contain an unescaped `[` symbol. `[\[]` is strictly equivalent to `[[]`. Both are valid. --- Source/Grammar.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Grammar.pp b/Source/Grammar.pp index a0e4108..9e365bf 100644 --- a/Source/Grammar.pp +++ b/Source/Grammar.pp @@ -165,7 +165,7 @@ ::negative_class_:: #negativeclass | ::class_:: ) - ( range() | literal() )+ + ( | range() | literal() )+ ::_class:: #range: From e770ada2e9f52b86c8c52f5eb12f3c4b3f9dbd0f Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 22 Jan 2018 10:54:53 +0100 Subject: [PATCH 2/2] fix(grammar) A class can end by a `-` symbol. The `-` symbol is the range operator. It must be escaped inside a class, except if it is the last symbol of the class. --- Source/Grammar.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Grammar.pp b/Source/Grammar.pp index 9e365bf..4176085 100644 --- a/Source/Grammar.pp +++ b/Source/Grammar.pp @@ -165,7 +165,7 @@ ::negative_class_:: #negativeclass | ::class_:: ) - ( | range() | literal() )+ + ( | range() | literal() )+ ? ::_class:: #range: