@@ -32,8 +32,10 @@ def p_section(self, p):
32
32
p [0 ] = p [1 ]
33
33
34
34
def p_setting_section (self , p ):
35
- '''setting_section : SETTING_HEADER EOS settings'''
36
- p [0 ] = SettingSection (p [3 ])
35
+ '''setting_section : SETTING_HEADER EOS
36
+ | SETTING_HEADER EOS settings'''
37
+ if len (p ) == 4 :
38
+ p [0 ] = SettingSection (p [3 ])
37
39
38
40
def p_settings (self , p ):
39
41
'''settings : setting
@@ -152,8 +154,10 @@ def p_return(self, p):
152
154
p [0 ] = ReturnSetting (p [2 ])
153
155
154
156
def p_variable_section (self , p ):
155
- '''variable_section : VARIABLE_HEADER EOS variables'''
156
- p [0 ] = VariableSection (p [3 ])
157
+ '''variable_section : VARIABLE_HEADER EOS
158
+ | VARIABLE_HEADER EOS variables'''
159
+ if len (p ) == 4 :
160
+ p [0 ] = VariableSection (p [3 ])
157
161
158
162
def p_variables (self , p ):
159
163
'''variables : variable
@@ -167,12 +171,16 @@ def p_variable(self, p):
167
171
p [0 ] = Variable (p [1 ], arguments )
168
172
169
173
def p_testcase_section (self , p ):
170
- '''testcase_section : TESTCASE_HEADER EOS tests'''
171
- p [0 ] = TestCaseSection (p [3 ])
174
+ '''testcase_section : TESTCASE_HEADER EOS
175
+ | TESTCASE_HEADER EOS tests'''
176
+ if len (p ) == 4 :
177
+ p [0 ] = TestCaseSection (p [3 ])
172
178
173
179
def p_keyword_section (self , p ):
174
- '''keyword_section : KEYWORD_HEADER EOS keywords'''
175
- p [0 ] = KeywordSection (p [3 ])
180
+ '''keyword_section : KEYWORD_HEADER EOS
181
+ | KEYWORD_HEADER EOS keywords'''
182
+ if len (p ) == 4 :
183
+ p [0 ] = KeywordSection (p [3 ])
176
184
177
185
def p_tests (self , p ):
178
186
'''tests : test
0 commit comments