diff --git a/chapi-ast-c/src/main/antlr/C.g4 b/chapi-ast-c/src/main/antlr/C.g4 index 03626900..8de6a1c7 100644 --- a/chapi-ast-c/src/main/antlr/C.g4 +++ b/chapi-ast-c/src/main/antlr/C.g4 @@ -475,10 +475,10 @@ macroStatement singleLineMacroDeclaration : include (StringLiteral | Identifier | ('<' includeIdentifier '>' )) #includeDeclaration - | macroKeywords Identifier? expression* '#' macroKeywords identifierList? #ifdefDeclaration // #define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } - | macroKeywords #defineDeclaration - | 'define' Identifier structOrUnionSpecifier #macroFunctionDeclaration + | macroKeywords Identifier? (structOrUnionSpecifier | expression)* + ('#' macroKeywords)? identifierList? #ifdefDeclaration +// | macroKeywords #defineDeclaration | '#'? Identifier #macroCastDeclaration // | 'define' expression* '#' 'undef' identifierList? #macroExpansionDeclaration // | macroKeywords expression* '#' macroKeywords identifierList? #macroExpansionDeclaration2