Skip to content

Commit 94101a5

Browse files
committed
Added some comments.
1 parent 04c8430 commit 94101a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

core/src/main/antlr4/org/evomaster/core/parser/RegexJava.g4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ classAtomNoDash
233233
| COMMA | CARET | DOLLAR | DOT | STAR | PLUS | QUESTION
234234
| PAREN_open | PAREN_close | BRACKET_open | BRACE_open | BRACE_close | OR | E | Q
235235
| COLON
236+
// should be interpreted literally:
237+
// As they are lexer tokens, these character sequences are captured as such. In particular these require some extra
238+
// steps to interpret them correctly given the context.
239+
// [(?iu)] -> FLAG_SCOPE_OPEN, each letter of the token should be interpreted literally.
236240
| FLAG_SCOPE_OPEN | FLAG_GROUP_OPEN
237241
| NAMED_CAPTURE_GROUP_OPEN
238242
;
@@ -328,7 +332,7 @@ fragment OctalDigit:
328332
: SLASH [1-9] DecimalDigit*
329333
;
330334

331-
// \k<name>
335+
// \k<name>, first character must be letter, following characters may be letters or digits
332336
NamedBackReference
333337
: SLASH 'k<' [a-zA-Z] [a-zA-Z0-9]* '>'
334338
;

0 commit comments

Comments
 (0)