You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C11 has introduced a rather unpleasant complication.
The keyword _Atomic is allowed to be used in two different contexts:
(1) as a type qualifier if it is not followed by a opening parenthesis
(2) as part of a type specifier if it is followed by ( type )
It is tricky to extend the happy spec to support both forms in a conflict-free way.
The text was updated successfully, but these errors were encountered:
One solution for LR parsers is implemented in https://github.com/jhjourdan/C11parser/blob/master/lexer.mll. They combine the tokens ATOMIC and LPAREN to ATOMIC_LPAREN, which allows to distinguish the type qualifier ATOMIC and the type specifier ATOMIC_LPAREN type RPAREN.
If the performance of the parser does not drop significantly, this seems like an acceptable solution.
C11 has introduced a rather unpleasant complication.
The keyword _Atomic is allowed to be used in two different contexts:
(1) as a type qualifier if it is not followed by a opening parenthesis
(2) as part of a type specifier if it is followed by ( type )
It is tricky to extend the happy spec to support both forms in a conflict-free way.
The text was updated successfully, but these errors were encountered: