Update line numbers.

pull/15/head
Jussi Pakkanen 12 years ago
parent 99298c8f72
commit 3bdaceac35
  1. 11
      builder.py

@ -45,11 +45,18 @@ t_COMMENT = '\#[^\n]*'
t_COMMA = ','
t_DOT = '\.'
t_STRING = "'[^']*'"
t_EOL_CONTINUE = r'\\[ \t]*\n'
t_EOL = r'\n'
t_ignore = ' \t'
def t_EOL(t):
r'\n'
t.lexer.lineno += 1
return t
def t_EOL_CONTINUE(t):
r'\\[ \t]*\n'
t.lexer.lineno += 1
def t_error(t):
print("Illegal character '%s'" % t.value[0])
t.lexer.skip(1)

Loading…
Cancel
Save