You want to use an "Optional Expression" (see about 60% down on this page ): 您想使用“可选表达式”(请参阅本页约60%):
grammar Sokmesa
rule line
"system" wsp+ marker wsp+ (category wsp+)? attributelist
end
rule category
"AAA1" # Or whatever
end
# Add rules for 'marker', 'wsp', and 'attributelist' here
end