1
1
diff --git a/Grammar.pp b/Grammar.pp
2
- index 5157084..8384417 100644
2
+ index 5157084..48959cb 100644
3
3
--- a/Grammar.pp
4
4
+++ b/Grammar.pp
5
- @@ -73,7 +73,7 @@
5
+ @@ -50,6 +50,8 @@
6
+ %token class_ \[
7
+ %token _class \]
8
+ %token range \-
9
+ + %token class_literal [^\\\[\]-]
10
+ + %token posix_class \[^?:[a-z]+:\]
11
+
12
+ // Internal options.
13
+ %token internal_option \(\?[\-+]?[imsx]\)
14
+ @@ -73,7 +75,7 @@
6
15
%token co:comment .*?(?=(?<!\\)\))
7
16
8
17
// Capturing group.
@@ -11,7 +20,7 @@ index 5157084..8384417 100644
11
20
%token nc:_named_capturing > -> default
12
21
%token nc:capturing_name .+?(?=(?<!\\)>)
13
22
%token non_capturing_ \(\?:
14
- @@ -109,7 +109 ,7 @@
23
+ @@ -109,7 +111 ,7 @@
15
24
// Please, see PCRESYNTAX(3), General Category properties, PCRE special category
16
25
// properties and script names for \p{} and \P{}.
17
26
%token character_type \\([CdDhHNRsSvVwWX]|[pP]{[^}]+})
@@ -20,16 +29,16 @@ index 5157084..8384417 100644
20
29
%token match_point_reset \\K
21
30
%token literal \\.|.
22
31
23
- @@ -168,7 +168 ,7 @@ quantifier:
32
+ @@ -168,7 +170 ,7 @@ quantifier:
24
33
::negative_class_:: #negativeclass
25
34
| ::class_::
26
35
)
27
36
- ( range() | literal() )+
28
- + ( <class_> | range() | literal() )+
37
+ + ( <posix_class> | < class_> | range() | literal() | <class_literal> )+ <range>?
29
38
::_class::
30
39
31
40
#range:
32
- @@ -178,7 +178 ,7 @@ simple:
41
+ @@ -178,7 +180 ,7 @@ simple:
33
42
capturing()
34
43
| literal()
35
44
@@ -38,7 +47,7 @@ index 5157084..8384417 100644
38
47
::comment_:: <comment>? ::_comment:: #comment
39
48
| (
40
49
::named_capturing_:: <capturing_name> ::_named_capturing:: #namedcapturing
41
- @@ -191,6 +191 ,7 @@ capturing:
50
+ @@ -191,6 +193 ,7 @@ capturing:
42
51
43
52
literal:
44
53
<character>
0 commit comments