Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up21.2.1 erroneous production? #819
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Feb 17, 2017
Contributor
At first sight, /a??/ is just the non-greedy version of/a?/, i.e., the latter is equivalent to /a|/ and the former to /|a/.
|
At first sight, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Feb 17, 2017
Contributor
That is to say, the two ?s have two completely different meanings: the first one modifies an Atom and means “optional”, and the second one modifies a Quantifier and means “non-greedy”.
|
That is to say, the two |
littledan
added
the
question
label
Feb 17, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Thanks for the answer, looks like the case is closed. |
isiahmeadows commentedFeb 17, 2017
•
edited
Based on the definition for Quantifier, a valid Quantifier would include
??, making things likea??a valid regular expression body, even though it's redundant. Is that an oversight?I'll note that
a???is not a valid production, though, so it's only limited to 1 or 2?s.