Skip to content

Commit

Permalink
Minor changes to allow braces inside macro definitions
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
tlusk committed Jan 7, 2022
1 parent 6f4a212 commit f83afc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/grammars/RpmSpecParser.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ private anything ::= (wordOrMacro|'?'|'!'|'('|')'|'<'|'>'|'{'|'}'|'\')
private anyWord ::= (IDENTIFIER|BOOL_LITERAL|FLOAT_LITERAL|INTEGER_LITERAL|CODE|':'|'%%'|'-')
private wordOrMacro ::= (macroParam|shellCommand|fullMacro|notMacro|anyWord)

private meta optionalBrackets ::= <<param>> | <<nestedBrackets <<param>>>>
private meta nestedBrackets ::= '{' (<<param>> | <<nestedBrackets <<param>>>>) '}'
private macroDefinitionBody ::= ('\' EOL|'%' CODE|wordOrMacro|'('|')'|'<'|'>')+
macroDefinition ::= (global|define) IDENTIFIER ('(' anyWord* ')')? <<optionalBrackets macroDefinitionBody>> {pin=1
private meta optionalBrackets ::= <<nestedBrackets <<param>>>> | <<param>>
private meta nestedBrackets ::= '{' (<<nestedBrackets <<param>>>> | <<param>>) '}'
private macroDefinitionBody ::= ('\' EOL|'%' CODE|wordOrMacro|'('|')'|'<'|'>')
macroDefinition ::= (global|define) IDENTIFIER ('(' anyWord* ')')? <<optionalBrackets macroDefinitionBody+>>+ {pin=1
implements="com.intellij.psi.PsiNameIdentifierOwner"
mixin="com.carbonblack.intellij.rpmspec.psi.RpmSpecMacroDefinitionElementImpl"}
macroUndefine ::= undefine macro {pin=1}
Expand Down

0 comments on commit f83afc0

Please sign in to comment.