From ee438f11f18c8c49311d4fa5a6f80b523a99702c Mon Sep 17 00:00:00 2001 From: Adam Knapp <adam.knapp@ericsson.com> Date: Wed, 28 Jul 2021 16:16:06 +0200 Subject: [PATCH] Custom encoding name with spaces (issue #563) Signed-off-by: Adam Knapp <adam.knapp@ericsson.com> --- compiler2/ttcn3/coding_attrib_la.l | 3 ++- function_test/Semantic_Analyser/TTCN3_SA_10_TD.script | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler2/ttcn3/coding_attrib_la.l b/compiler2/ttcn3/coding_attrib_la.l index a1087a9f9..8f1a42383 100644 --- a/compiler2/ttcn3/coding_attrib_la.l +++ b/compiler2/ttcn3/coding_attrib_la.l @@ -72,6 +72,7 @@ LINECOMMENT "//"[^\r\n]* WHITESPACE [ \t\v\f] NEWLINE \r|\n|\r\n IDENTIFIER [A-Za-z][A-Za-z0-9_]* +IDENTIFIER2 [A-Za-z][A-Za-z0-9_ ]* NUMBER 0|[1-9][0-9]* %s SC_start @@ -231,7 +232,7 @@ verdicttype RETURN(VerdictTypeKeyword); yylval.encoding_type = Type::CT_OER; RETURN(EncodingType); } - {IDENTIFIER} { + {IDENTIFIER2} { yylval.str = new string(yyleng, yytext); RETURN(CustomEncoding); } diff --git a/function_test/Semantic_Analyser/TTCN3_SA_10_TD.script b/function_test/Semantic_Analyser/TTCN3_SA_10_TD.script index c9f348766..ca0b96c7b 100644 --- a/function_test/Semantic_Analyser/TTCN3_SA_10_TD.script +++ b/function_test/Semantic_Analyser/TTCN3_SA_10_TD.script @@ -314,7 +314,7 @@ with { } } <END_MODULE> -<RESULT IF_PASS COUNT 7> +<RESULT IF_PASS COUNT 8> (?is)\berror: <END_RESULT> <RESULT IF_PASS POSITIVE> -- GitLab