From d86b664b2853a110a13f14fd29faa26a6437bc04 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Tue, 25 Dec 2012 19:23:33 +0200 Subject: [PATCH] Remove quotation from strings. --- builder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builder.py b/builder.py index d0c3b9d97..accc8fc32 100755 --- a/builder.py +++ b/builder.py @@ -44,10 +44,14 @@ t_ATOM = '[a-zA-Z][_0-9a-zA-Z]*' t_COMMENT = '\#[^\n]*' t_COMMA = ',' t_DOT = '\.' -t_STRING = "'[^']*'" t_ignore = ' \t' +def t_STRING(t): + "'[^']*'" + t.value = t.value[1:-1] + return t + def t_EOL(t): r'\n' t.lexer.lineno += 1