https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102447
Ikarashi <s.ikarashi at fujitsu dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |s.ikarashi at fujitsu dot com
--- Comment #8 from Ikarashi <s.ikarashi at fujitsu dot com> ---
> The ClassAtom \w does not contain exactly one character, so I think it's a
> syntax error.
If you process '\w', '-', and 'a' in this order,
can the first \w be a ClassAtom anyway?
According to the definition of Atom,
it seems to be counted as a "\ AtomEscape" before the beginning of a
CharacterClass.
Atom[U, N] ::
PatternCharacter
.
\ AtomEscape[?U, ?N]
CharacterClass[?U]
( GroupSpecifier[?U] Disjunction[?U, ?N] )
( ? : Disjunction[?U, ?N] )
A \w is a "\ CharacterClassEscape", so can be a "\ AtomEscape".
I know it also can be a "\ ClassEscape" and a ClassAtomNoDash,
however, \w-a looks two Atoms to me, one Atom \w and one Atom -a.
Is there any rule defining the order of such interpretations?