@@ -273,8 +273,8 @@ static void new_module(YYSTYPE &module)
273
273
%token ADD_Token
274
274
%token SUB_Token
275
275
276
- %token STRING_Token " string "
277
- %token QSTRING_Token " quoted string "
276
+ %token IDENTIFIER_Token " identifier "
277
+ %token QIDENTIFIER_Token " quoted identifier "
278
278
%token QUOTE_Token " '"
279
279
%token NUMBER_Token " number"
280
280
@@ -310,7 +310,7 @@ modules : module
310
310
module : module_head module_body
311
311
;
312
312
313
- module_name : STRING_Token
313
+ module_name : IDENTIFIER_Token
314
314
| QUOTE_Token
315
315
;
316
316
@@ -532,7 +532,7 @@ enum_list : enum_element
532
532
}
533
533
;
534
534
535
- enum_element: STRING_Token
535
+ enum_element: IDENTIFIER_Token
536
536
{
537
537
$$=$1 ;
538
538
PARSER.module ->enum_set .insert (stack_expr ($1 ).id_string ());
@@ -783,7 +783,12 @@ formula_list:
783
783
| formula_list ' ,' formula { $$=$1 ; mto ($$, $3 ); }
784
784
;
785
785
786
- identifier : STRING_Token
786
+ identifier : IDENTIFIER_Token
787
+ | QIDENTIFIER_Token
788
+ {
789
+ // not supported by NuSMV
790
+ init ($$, std::string (stack_expr ($1 ).id_string (), 1 )); // remove backslash
791
+ }
787
792
;
788
793
789
794
variable_identifier: complex_identifier
@@ -826,19 +831,15 @@ variable_identifier: complex_identifier
826
831
}
827
832
;
828
833
829
- complex_identifier: QSTRING_Token
830
- {
831
- init ($$, std::string (stack_expr ($1 ).id_string (), 1 )); // remove backslash
832
- }
833
- | STRING_Token
834
- | complex_identifier DOT_Token QSTRING_Token
834
+ complex_identifier: identifier
835
+ | complex_identifier DOT_Token QIDENTIFIER_Token
835
836
{
836
837
std::string id (stack_expr ($1 ).id_string ());
837
838
id+=" ." ;
838
839
id+=std::string (stack_expr ($3 ).id_string (), 1 ); // remove backslash
839
840
init ($$, id);
840
841
}
841
- | complex_identifier DOT_Token STRING_Token
842
+ | complex_identifier DOT_Token IDENTIFIER_Token
842
843
{
843
844
std::string id (stack_expr ($1 ).id_string ());
844
845
id+=" ." ;
0 commit comments