diff --git a/builder.py b/builder.py index ae39d9800..8e0ddd775 100755 --- a/builder.py +++ b/builder.py @@ -19,6 +19,8 @@ import ply.yacc as yacc tokens = ['LPAREN', 'RPAREN', + 'LBRACKET', + 'RBRACKET', 'VARIABLE', 'COMMENT', 'EQUALS', @@ -32,6 +34,8 @@ tokens = ['LPAREN', t_EQUALS = '=' t_LPAREN = '\(' t_RPAREN = '\)' +t_LBRACKET = '\[' +t_RBRACKET = '\]' t_VARIABLE = '[a-zA-Z][_0-9a-zA-Z]*' t_COMMENT = '\#[^\n]*' t_COMMA = ',' @@ -48,6 +52,7 @@ def t_error(t): def test_lexer(): s = """hello = (something) # this = (that) + two = ['file1', 'file2'] function(h) obj.method(lll, \\ 'string')