New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21.2.1 erroneous production? #819

Closed
isiahmeadows opened this Issue Feb 17, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@isiahmeadows

isiahmeadows commented Feb 17, 2017

Based on the definition for Quantifier, a valid Quantifier would include ??, making things like a?? 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.

@claudepache

This comment has been minimized.

Show comment
Hide comment
@claudepache

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/.

Contributor

claudepache commented Feb 17, 2017

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/.

@claudepache

This comment has been minimized.

Show comment
Hide comment
@claudepache

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”.

Contributor

claudepache commented Feb 17, 2017

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”.

@littledan littledan added the question label Feb 17, 2017

@littledan

This comment has been minimized.

Show comment
Hide comment
@littledan

littledan Feb 17, 2017

Member

Thanks for the answer, looks like the case is closed.

Member

littledan commented Feb 17, 2017

Thanks for the answer, looks like the case is closed.

@littledan littledan closed this Feb 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment