From 7c39331fe56a877bafefb81a2c6fcfe69ce02fd0 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Sun, 28 May 2023 22:43:04 +0100 Subject: [PATCH] fix id para incluir dashes --- src/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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