grammar ,and I want to add a rule to skip blank line( line: 6)
a = 0
b = 2
sum = 0
if b > a:
i = b
sum += i
print(sum)
I have test this code ,but not work for me
WS:[ \t\r\n]+ -> skip;
line 8:4 : missing NEWLINE at 'sum'
Edit:
ss = 4
if 3>1:
ss = 3
#dddd
ss = 4
when i add above code ,it will report another error
line 4:9 : extraneous input '\n ' expecting {'break', 'continue', 'if', 'while', 'for', 'print', 'def', 'return', NAME, '(', DEDENT}