diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index 0686500d2..152b39624 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -787,7 +787,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2 max_dim_cova_group {return token::MAX_DIM_COVA_GROUP;} gsa_sample_file {return token::GSA_SAMPLE_FILE;} -[A-Za-z_\x80-\xf3][A-Za-z0-9_\x80-\xf3]* { +[A-Za-z_][A-Za-z0-9_]* { yylval->string_val = new string(yytext); return token::NAME; } @@ -849,7 +849,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2 element in initval (in which case Dynare recognizes the matrix name as an external function symbol), and may want to modify the matrix later with Matlab statements. */ -[A-Za-z_\x80-\xf3][A-Za-z0-9_\x80-\xf3]* { +[A-Za-z_][A-Za-z0-9_]* { if (driver.symbol_exists_and_is_not_modfile_local_or_external_function(yytext)) { BEGIN DYNARE_STATEMENT; @@ -867,7 +867,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2 /* For joint prior statement, match [symbol, symbol, ...] If no match, begin native and push everything back on stack */ -\[([[:space:]]*[A-Za-z_\x80-\xf3][A-Za-z0-9_\x80-\xf3]*[[:space:]]*,{1}[[:space:]]*)*([[:space:]]*[A-Za-z_\x80-\xf3][A-Za-z0-9_\x80-\xf3]*[[:space:]]*){1}\] { +\[([[:space:]]*[A-Za-z_][A-Za-z0-9_]*[[:space:]]*,{1}[[:space:]]*)*([[:space:]]*[A-Za-z_][A-Za-z0-9_]*[[:space:]]*){1}\] { string yytextcpy = string(yytext); yytextcpy.erase(remove(yytextcpy.begin(), yytextcpy.end(), '['), yytextcpy.end()); yytextcpy.erase(remove(yytextcpy.begin(), yytextcpy.end(), ']'), yytextcpy.end()); diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll index 9229b049d..9e694eb48 100644 --- a/preprocessor/macro/MacroFlex.ll +++ b/preprocessor/macro/MacroFlex.ll @@ -245,7 +245,7 @@ CONT \\\\ echo { return token::ECHO_DIR; } error { return token::ERROR; } -[A-Za-z_\x80-\xf3][A-Za-z0-9_\x80-\xf3]* { +[A-Za-z_][A-Za-z0-9_]* { yylval->string_val = new string(yytext); return token::NAME; }