bintools/rcomp/src/rcomp.cpp
changeset 620 ad8ffc8e1982
parent 590 360bd6b35136
equal deleted inserted replaced
585:238f4cb8391f 620:ad8ffc8e1982
    88 #pragma warning( disable : 4102 ) // C4102: 'yyerrlab1' : unreferenced label
    88 #pragma warning( disable : 4102 ) // C4102: 'yyerrlab1' : unreferenced label
    89 #pragma warning( disable : 4127 ) // C4127: conditional expression is constant
    89 #pragma warning( disable : 4127 ) // C4127: conditional expression is constant
    90 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
    90 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
    91 #endif //__VC32__
    91 #endif //__VC32__
    92 
    92 
    93 #include "resource.h"
    93 #include "RESOURCE.H"
    94 #include "parser.h"
    94 #include "Parser.h"
    95 
    95 
    96 int yylex();
    96 int yylex();
    97 void yyerror(const char* string, ...);
    97 void yyerror(const char* string, ...);
    98 int yywrap();
    98 int yywrap();
    99 #define YYDEBUG 1
    99 #define YYDEBUG 1
   100 extern int yylineno;
   100 extern int yylineno;
   101 
   101 
   102 #include "rcomp.hpp"
   102 #include "rcomp.hpp"
   103 #include "datatype.h"
   103 #include "DATATYPE.H"
   104 #include "mem.h"
   104 #include "MEM.H"
   105 #include "rcbinstr.h"
   105 #include "RCBINSTR.H"
   106 #include "rcscan.h"
   106 #include "RCSCAN.H"
   107 #include "errorhan.h"
   107 #include "ERRORHAN.H"
   108 #include "fileacc.h"
   108 #include "FILEACC.H"
   109 #include "version.h"
   109 #include "VERSION.H"
   110 #include "ctable.h"
   110 #include "CTABLE.H"
   111 #include "localise.h"
   111 #include "localise.h"
   112 #include "main.h"
   112 #include "main.h"
   113 
   113 
   114 #if defined(__VC32__) && !defined(_DEBUG)
   114 #if defined(__VC32__) && !defined(_DEBUG)
   115 #pragma warning( disable : 4702 )	// unreachable code
   115 #pragma warning( disable : 4702 )	// unreachable code
  2547 		// whether label was declared
  2547 		// whether label was declared
  2548 		pG->UsedIdentifiers.Add(thisLabel);
  2548 		pG->UsedIdentifiers.Add(thisLabel);
  2549 
  2549 
  2550 	    if (pG->EnumValues.IsStored((yyvsp[(1) - (1)].Value)))
  2550 	    if (pG->EnumValues.IsStored((yyvsp[(1) - (1)].Value)))
  2551 			{
  2551 			{
  2552 			sprintf((yyval.Value), "%d", pG->EnumValues.FindId((yyvsp[(1) - (1)].Value)));
  2552 			sprintf((yyval.Value), "%d", (int)(pG->EnumValues.FindId((yyvsp[(1) - (1)].Value))));
  2553 			}
  2553 			}
  2554 		else if (pG->RlsNameIndex.count((yyvsp[(1) - (1)].Value))) // if rls item has already been defined
  2554 		else if (pG->RlsNameIndex.count((yyvsp[(1) - (1)].Value))) // if rls item has already been defined
  2555 			{
  2555 			{
  2556 			// Found a reference to an rls_string.
  2556 			// Found a reference to an rls_string.
  2557 			RlsValue &rv = pG->RlsValues[pG->RlsNameIndex[(yyvsp[(1) - (1)].Value)]];
  2557 			RlsValue &rv = pG->RlsValues[pG->RlsNameIndex[(yyvsp[(1) - (1)].Value)]];