bintools/rcomp/src/RCOMP.YACC
changeset 629 541af5ee3ed9
parent 590 360bd6b35136
equal deleted inserted replaced
628:7c4a911dc066 629:541af5ee3ed9
    33 #pragma warning( disable : 4102 ) // C4102: 'yyerrlab1' : unreferenced label
    33 #pragma warning( disable : 4102 ) // C4102: 'yyerrlab1' : unreferenced label
    34 #pragma warning( disable : 4127 ) // C4127: conditional expression is constant
    34 #pragma warning( disable : 4127 ) // C4127: conditional expression is constant
    35 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
    35 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
    36 #endif //__VC32__
    36 #endif //__VC32__
    37 
    37 
    38 #include "resource.h"
    38 //#include "resource.h"
       
    39 //#include "parser.h"
       
    40 #include "RESOURCE.H"
    39 #include "parser.h"
    41 #include "parser.h"
    40 
    42 
    41 int yylex();
    43 int yylex();
    42 void yyerror(const char* string, ...);
    44 void yyerror(const char* string, ...);
    43 int yywrap();
    45 int yywrap();
   675 		// whether label was declared
   677 		// whether label was declared
   676 		pG->UsedIdentifiers.Add(thisLabel);
   678 		pG->UsedIdentifiers.Add(thisLabel);
   677 
   679 
   678 	    if (pG->EnumValues.IsStored($1))
   680 	    if (pG->EnumValues.IsStored($1))
   679 			{
   681 			{
   680 			sprintf($$, "%d", pG->EnumValues.FindId($1));
   682 			sprintf($$, "%d", (int)(pG->EnumValues.FindId($1)));
   681 			}
   683 			}
   682 		else if (pG->RlsNameIndex.count($1)) // if rls item has already been defined
   684 		else if (pG->RlsNameIndex.count($1)) // if rls item has already been defined
   683 			{
   685 			{
   684 			// Found a reference to an rls_string.
   686 			// Found a reference to an rls_string.
   685 			RlsValue &rv = pG->RlsValues[pG->RlsNameIndex[$1]];
   687 			RlsValue &rv = pG->RlsValues[pG->RlsNameIndex[$1]];