diff --git a/src/lexer.py b/src/lexer.py index b180117..0eb0dad 100644 --- a/src/lexer.py +++ b/src/lexer.py @@ -126,7 +126,7 @@ def t_BOOL(t): def t_ID(t): - r"(([\w_]+)|(\"[\w_]+\"|\'[\w_]+\')\s*\.\s*([\w_]+|\"[\w_]+\"|\'[\w_]+\'))(\s*\.\s*([\w_]+|\"[\w_]+\"|\'[\w_]+\'))*" + r"(([\w_-]+)|(\"[\w_-]+\"|\'[\w_-]+\')\s*\.\s*([\w_-]+|\"[\w_-]+\"|\'[\w_-]+\'))(\s*\.\s*([\w_-]+|\"[\w_-]+\"|\'[\w_-]+\'))*" t.value = [s.strip(" \"'") for s in t.value.split('.')] return t