@@ -1381,7 +1381,8 @@ void Parser::Read_Symbol()
13811381 {
13821382 case ARRAY_ID_TOKEN:
13831383 {
1384- dictIndex = NULL ;
1384+ if (dictIndex)
1385+ POV_FREE (dictIndex);
13851386
13861387 Skip_Spaces ();
13871388 c = Echo_getc ();
@@ -1442,7 +1443,8 @@ void Parser::Read_Symbol()
14421443
14431444 case DICTIONARY_ID_TOKEN:
14441445 {
1445- dictIndex = NULL ;
1446+ if (dictIndex)
1447+ POV_FREE (dictIndex);
14461448
14471449 Skip_Spaces ();
14481450 c = Echo_getc ();
@@ -3664,6 +3666,7 @@ Parser::SYM_TABLE *Parser::Parse_Dictionary_Declare()
36643666 SYM_TABLE *newDictionary;
36653667 SYM_ENTRY *newEntry;
36663668 bool oldParseRawIdentifiers;
3669+ char *dictIndex;
36673670
36683671 newDictionary = Create_Sym_Table (true );
36693672
@@ -3682,7 +3685,22 @@ Parser::SYM_TABLE *Parser::Parse_Dictionary_Declare()
36823685 Expectation_Error (" dictionary element identifier" );
36833686 newEntry = Add_Symbol (newDictionary, Token.Token_String , IDENTIFIER_TOKEN);
36843687
3685- GET (EQUALS_TOKEN);
3688+ GET (COLON_TOKEN);
3689+
3690+ if (!Parse_RValue (IDENTIFIER_TOKEN, &(newEntry->Token_Number ), &(newEntry->Data ), newEntry, false , false , true , true , false , MAX_NUMBER_OF_TABLES))
3691+ Expectation_Error (" RValue" );
3692+
3693+ Parse_Comma ();
3694+ END_CASE
3695+
3696+ CASE (LEFT_SQUARE_TOKEN)
3697+ dictIndex = Parse_C_String ();
3698+ newEntry = Add_Symbol (newDictionary, dictIndex, IDENTIFIER_TOKEN);
3699+ POV_PARSER_ASSERT (newDictionary->namesAreCopies );
3700+ POV_FREE (dictIndex);
3701+
3702+ GET (RIGHT_SQUARE_TOKEN);
3703+ GET (COLON_TOKEN);
36863704
36873705 if (!Parse_RValue (IDENTIFIER_TOKEN, &(newEntry->Token_Number ), &(newEntry->Data ), newEntry, false , false , true , true , false , MAX_NUMBER_OF_TABLES))
36883706 Expectation_Error (" RValue" );
0 commit comments