Browse Source

fcl-res: VERSIONINFO resources

Reintegrate fpcres-rc branch by Martok

git-svn-id: trunk@46378 -
svenbarth 5 years ago
parent
commit
8a10f1651d
4 changed files with 1291 additions and 456 deletions
  1. 617 204
      packages/fcl-res/src/rclex.inc
  2. 17 3
      packages/fcl-res/src/rclex.l
  3. 562 236
      packages/fcl-res/src/rcparser.pas
  4. 95 13
      packages/fcl-res/src/rcparser.y

+ 617 - 204
packages/fcl-res/src/rclex.inc

@@ -7,7 +7,7 @@ var
   strbuf: string;
   strbuf: string;
 
 
 const
 const
-  KeywordDefs: array [0..23] of TIdentMapEntry = (
+  KeywordDefs: array [0..33] of TIdentMapEntry = (
     // attribs
     // attribs
     (Value: _LANGUAGE;             Name: 'LANGUAGE'),
     (Value: _LANGUAGE;             Name: 'LANGUAGE'),
     (Value: _CHARACTERISTICS;      Name: 'CHARACTERISTICS'),
     (Value: _CHARACTERISTICS;      Name: 'CHARACTERISTICS'),
@@ -33,7 +33,18 @@ const
     (Value: _PLUGPLAY;             Name: 'PLUGPLAY'),
     (Value: _PLUGPLAY;             Name: 'PLUGPLAY'),
     (Value: _STRINGTABLE;          Name: 'STRINGTABLE'),
     (Value: _STRINGTABLE;          Name: 'STRINGTABLE'),
     (Value: _RCDATA;               Name: 'RCDATA'),
     (Value: _RCDATA;               Name: 'RCDATA'),
-    (Value: _VXD;                  Name: 'VXD')
+    (Value: _VERSIONINFO;          Name: 'VERSIONINFO'),
+    (Value: _VXD;                  Name: 'VXD'),
+    // file version fields names
+    (Value: _FILEVERSION;          Name: 'FILEVERSION'),
+    (Value: _PRODUCTVERSION;       Name: 'PRODUCTVERSION'),
+    (Value: _FILEFLAGSMASK;        Name: 'FILEFLAGSMASK'),
+    (Value: _FILEFLAGS;            Name: 'FILEFLAGS'),
+    (Value: _FILEOS;               Name: 'FILEOS'),
+    (Value: _FILETYPE;             Name: 'FILETYPE'),
+    (Value: _FILESUBTYPE;          Name: 'FILESUBTYPE'),
+    (Value: _BLOCK;                Name: 'BLOCK'),
+    (Value: _VALUE;                Name: 'VALUE')
   );
   );
 
 
 function KeywordToInt(k: string; out kw: integer): boolean;
 function KeywordToInt(k: string; out kw: integer): boolean;
@@ -100,12 +111,18 @@ begin
                         return(_ILLEGAL);
                         return(_ILLEGAL);
   15:
   15:
                         strbuf:= strbuf + yytext;
                         strbuf:= strbuf + yytext;
-
   16:
   16:
-                        return(_BEGIN);
+                        begin yytext:= 'StringFileInfo'; return(_STR_StringFileInfo); end;
   17:
   17:
-                        return(_END);
+                        begin yytext:= 'VarFileInfo'; return(_STR_VarFileInfo); end;
   18:
   18:
+                        begin yytext:= 'Translation'; return(_STR_Translation); end;
+
+  19:
+                        return(_BEGIN);
+  20:
+                        return(_END);
+  21:
                         begin
                         begin
                           if ypreproc.isdefine(yytext) then begin
                           if ypreproc.isdefine(yytext) then begin
                             unget_char(' ');
                             unget_char(' ');
@@ -116,11 +133,11 @@ begin
                             else
                             else
                               return(_ID);
                               return(_ID);
                          end;
                          end;
-  19:
+  22:
                         ;
                         ;
-  20:
-                        returnc(',');
-  21:
+  23:
+                        returnc(yytext[1]);
+  24:
                         return(_ILLEGAL);
                         return(_ILLEGAL);
   end;
   end;
 end(*yyaction*);
 end(*yyaction*);
@@ -134,10 +151,10 @@ type YYTRec = record
 
 
 const
 const
 
 
-yynmarks   = 56;
-yynmatches = 56;
-yyntrans   = 77;
-yynstates  = 49;
+yynmarks   = 59;
+yynmatches = 59;
+yyntrans   = 116;
+yynstates  = 88;
 
 
 yyk : array [1..yynmarks] of Integer = (
 yyk : array [1..yynmarks] of Integer = (
   { 0: }
   { 0: }
@@ -153,45 +170,45 @@ yyk : array [1..yynmarks] of Integer = (
   { 8: }
   { 8: }
   { 9: }
   { 9: }
   { 10: }
   { 10: }
-  21,
+  24,
   { 11: }
   { 11: }
   8,
   8,
-  21,
+  24,
   { 12: }
   { 12: }
   8,
   8,
-  18,
   21,
   21,
+  24,
   { 13: }
   { 13: }
   8,
   8,
-  21,
+  24,
   { 14: }
   { 14: }
   10,
   10,
-  21,
+  24,
   { 15: }
   { 15: }
-  18,
   21,
   21,
+  24,
   { 16: }
   { 16: }
-  16,
-  21,
+  19,
+  24,
   { 17: }
   { 17: }
-  18,
   21,
   21,
+  24,
   { 18: }
   { 18: }
-  17,
-  21,
+  20,
+  24,
   { 19: }
   { 19: }
-  18,
   21,
   21,
+  24,
   { 20: }
   { 20: }
-  19,
+  22,
   { 21: }
   { 21: }
-  20,
-  21,
+  23,
+  24,
   { 22: }
   { 22: }
-  19,
-  21,
+  22,
+  24,
   { 23: }
   { 23: }
-  21,
+  24,
   { 24: }
   { 24: }
   2,
   2,
   { 25: }
   { 25: }
@@ -220,31 +237,73 @@ yyk : array [1..yynmarks] of Integer = (
   { 36: }
   { 36: }
   8,
   8,
   { 37: }
   { 37: }
-  18,
+  21,
   { 38: }
   { 38: }
   9,
   9,
   { 39: }
   { 39: }
-  18,
   { 40: }
   { 40: }
-  18,
   { 41: }
   { 41: }
-  6,
   { 42: }
   { 42: }
-  11,
+  21,
   { 43: }
   { 43: }
-  13,
+  21,
   { 44: }
   { 44: }
-  9,
+  6,
   { 45: }
   { 45: }
-  18,
+  11,
   { 46: }
   { 46: }
-  17,
-  18,
+  13,
   { 47: }
   { 47: }
-  18,
+  9,
   { 48: }
   { 48: }
-  16,
-  18
+  { 49: }
+  21,
+  { 50: }
+  20,
+  21,
+  { 51: }
+  { 52: }
+  { 53: }
+  { 54: }
+  21,
+  { 55: }
+  { 56: }
+  19,
+  21,
+  { 57: }
+  { 58: }
+  { 59: }
+  { 60: }
+  { 61: }
+  { 62: }
+  { 63: }
+  { 64: }
+  { 65: }
+  { 66: }
+  17,
+  { 67: }
+  18,
+  { 68: }
+  16
+  { 69: }
+  { 70: }
+  { 71: }
+  { 72: }
+  { 73: }
+  { 74: }
+  { 75: }
+  { 76: }
+  { 77: }
+  { 78: }
+  { 79: }
+  { 80: }
+  { 81: }
+  { 82: }
+  { 83: }
+  { 84: }
+  { 85: }
+  { 86: }
+  { 87: }
 );
 );
 
 
 yym : array [1..yynmatches] of Integer = (
 yym : array [1..yynmatches] of Integer = (
@@ -261,45 +320,45 @@ yym : array [1..yynmatches] of Integer = (
 { 8: }
 { 8: }
 { 9: }
 { 9: }
 { 10: }
 { 10: }
-  21,
+  24,
 { 11: }
 { 11: }
   8,
   8,
-  21,
+  24,
 { 12: }
 { 12: }
   8,
   8,
-  18,
   21,
   21,
+  24,
 { 13: }
 { 13: }
   8,
   8,
-  21,
+  24,
 { 14: }
 { 14: }
   10,
   10,
-  21,
+  24,
 { 15: }
 { 15: }
-  18,
   21,
   21,
+  24,
 { 16: }
 { 16: }
-  16,
-  21,
+  19,
+  24,
 { 17: }
 { 17: }
-  18,
   21,
   21,
+  24,
 { 18: }
 { 18: }
-  17,
-  21,
+  20,
+  24,
 { 19: }
 { 19: }
-  18,
   21,
   21,
+  24,
 { 20: }
 { 20: }
-  19,
+  22,
 { 21: }
 { 21: }
-  20,
-  21,
+  23,
+  24,
 { 22: }
 { 22: }
-  19,
-  21,
+  22,
+  24,
 { 23: }
 { 23: }
-  21,
+  24,
 { 24: }
 { 24: }
   2,
   2,
 { 25: }
 { 25: }
@@ -328,41 +387,83 @@ yym : array [1..yynmatches] of Integer = (
 { 36: }
 { 36: }
   8,
   8,
 { 37: }
 { 37: }
-  18,
+  21,
 { 38: }
 { 38: }
   9,
   9,
 { 39: }
 { 39: }
-  18,
 { 40: }
 { 40: }
-  18,
 { 41: }
 { 41: }
-  6,
 { 42: }
 { 42: }
-  11,
+  21,
 { 43: }
 { 43: }
-  13,
+  21,
 { 44: }
 { 44: }
-  9,
+  6,
 { 45: }
 { 45: }
-  18,
+  11,
 { 46: }
 { 46: }
-  17,
-  18,
+  13,
 { 47: }
 { 47: }
-  18,
+  9,
 { 48: }
 { 48: }
-  16,
-  18
+{ 49: }
+  21,
+{ 50: }
+  20,
+  21,
+{ 51: }
+{ 52: }
+{ 53: }
+{ 54: }
+  21,
+{ 55: }
+{ 56: }
+  19,
+  21,
+{ 57: }
+{ 58: }
+{ 59: }
+{ 60: }
+{ 61: }
+{ 62: }
+{ 63: }
+{ 64: }
+{ 65: }
+{ 66: }
+  17,
+{ 67: }
+  18,
+{ 68: }
+  16
+{ 69: }
+{ 70: }
+{ 71: }
+{ 72: }
+{ 73: }
+{ 74: }
+{ 75: }
+{ 76: }
+{ 77: }
+{ 78: }
+{ 79: }
+{ 80: }
+{ 81: }
+{ 82: }
+{ 83: }
+{ 84: }
+{ 85: }
+{ 86: }
+{ 87: }
 );
 );
 
 
 yyt : array [1..yyntrans] of YYTrec = (
 yyt : array [1..yyntrans] of YYTrec = (
 { 0: }
 { 0: }
-  ( cc: [ #1..#8,#11,#13..#31,'!','#'..'+','-','.',
-            ':'..'@','['..'^','`','|','~'..#255 ]; s: 23),
+  ( cc: [ #1..#8,#11,#13..#31,'!','#'..'''','*','+',
+            '-','.',':'..'@','['..'^','`','|','~'..#255 ]; s: 23),
   ( cc: [ #9,#12,' ' ]; s: 22),
   ( cc: [ #9,#12,' ' ]; s: 22),
   ( cc: [ #10 ]; s: 20),
   ( cc: [ #10 ]; s: 20),
   ( cc: [ '"' ]; s: 14),
   ( cc: [ '"' ]; s: 14),
-  ( cc: [ ',' ]; s: 21),
+  ( cc: [ '(',')',',' ]; s: 21),
   ( cc: [ '/' ]; s: 10),
   ( cc: [ '/' ]; s: 10),
   ( cc: [ '0' ]; s: 13),
   ( cc: [ '0' ]; s: 13),
   ( cc: [ '1'..'9' ]; s: 11),
   ( cc: [ '1'..'9' ]; s: 11),
@@ -373,12 +474,12 @@ yyt : array [1..yyntrans] of YYTrec = (
   ( cc: [ '{' ]; s: 16),
   ( cc: [ '{' ]; s: 16),
   ( cc: [ '}' ]; s: 18),
   ( cc: [ '}' ]; s: 18),
 { 1: }
 { 1: }
-  ( cc: [ #1..#8,#11,#13..#31,'!','#'..'+','-','.',
-            ':'..'@','['..'^','`','|','~'..#255 ]; s: 23),
+  ( cc: [ #1..#8,#11,#13..#31,'!','#'..'''','*','+',
+            '-','.',':'..'@','['..'^','`','|','~'..#255 ]; s: 23),
   ( cc: [ #9,#12,' ' ]; s: 22),
   ( cc: [ #9,#12,' ' ]; s: 22),
   ( cc: [ #10 ]; s: 20),
   ( cc: [ #10 ]; s: 20),
   ( cc: [ '"' ]; s: 14),
   ( cc: [ '"' ]; s: 14),
-  ( cc: [ ',' ]; s: 21),
+  ( cc: [ '(',')',',' ]; s: 21),
   ( cc: [ '/' ]; s: 10),
   ( cc: [ '/' ]; s: 10),
   ( cc: [ '0' ]; s: 13),
   ( cc: [ '0' ]; s: 13),
   ( cc: [ '1'..'9' ]; s: 11),
   ( cc: [ '1'..'9' ]; s: 11),
@@ -427,13 +528,16 @@ yyt : array [1..yyntrans] of YYTrec = (
   ( cc: [ 'L' ]; s: 36),
   ( cc: [ 'L' ]; s: 36),
   ( cc: [ 'x' ]; s: 38),
   ( cc: [ 'x' ]; s: 38),
 { 14: }
 { 14: }
+  ( cc: [ 'S' ]; s: 39),
+  ( cc: [ 'T' ]; s: 41),
+  ( cc: [ 'V' ]; s: 40),
 { 15: }
 { 15: }
   ( cc: [ '0'..'9','A'..'D','F'..'Z','_','a'..'z' ]; s: 37),
   ( cc: [ '0'..'9','A'..'D','F'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'E' ]; s: 39),
+  ( cc: [ 'E' ]; s: 42),
 { 16: }
 { 16: }
 { 17: }
 { 17: }
   ( cc: [ '0'..'9','A'..'M','O'..'Z','_','a'..'z' ]; s: 37),
   ( cc: [ '0'..'9','A'..'M','O'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'N' ]; s: 40),
+  ( cc: [ 'N' ]; s: 43),
 { 18: }
 { 18: }
 { 19: }
 { 19: }
   ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
   ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
@@ -445,12 +549,12 @@ yyt : array [1..yyntrans] of YYTrec = (
 { 25: }
 { 25: }
 { 26: }
 { 26: }
 { 27: }
 { 27: }
-  ( cc: [ '/' ]; s: 41),
+  ( cc: [ '/' ]; s: 44),
 { 28: }
 { 28: }
 { 29: }
 { 29: }
-  ( cc: [ '"' ]; s: 42),
+  ( cc: [ '"' ]; s: 45),
 { 30: }
 { 30: }
-  ( cc: [ #10 ]; s: 43),
+  ( cc: [ #10 ]; s: 46),
 { 31: }
 { 31: }
 { 32: }
 { 32: }
 { 33: }
 { 33: }
@@ -463,27 +567,102 @@ yyt : array [1..yyntrans] of YYTrec = (
   ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
   ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
 { 38: }
 { 38: }
   ( cc: [ '0'..'9','A'..'F','a'..'f' ]; s: 38),
   ( cc: [ '0'..'9','A'..'F','a'..'f' ]; s: 38),
-  ( cc: [ 'L' ]; s: 44),
+  ( cc: [ 'L' ]; s: 47),
 { 39: }
 { 39: }
-  ( cc: [ '0'..'9','A'..'F','H'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'G' ]; s: 45),
+  ( cc: [ 't' ]; s: 48),
 { 40: }
 { 40: }
-  ( cc: [ '0'..'9','A'..'C','E'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'D' ]; s: 46),
+  ( cc: [ 'a' ]; s: 71),
 { 41: }
 { 41: }
+  ( cc: [ 'r' ]; s: 70),
 { 42: }
 { 42: }
+  ( cc: [ '0'..'9','A'..'F','H'..'Z','_','a'..'z' ]; s: 37),
+  ( cc: [ 'G' ]; s: 49),
 { 43: }
 { 43: }
+  ( cc: [ '0'..'9','A'..'C','E'..'Z','_','a'..'z' ]; s: 37),
+  ( cc: [ 'D' ]; s: 50),
 { 44: }
 { 44: }
 { 45: }
 { 45: }
-  ( cc: [ '0'..'9','A'..'H','J'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'I' ]; s: 47),
 { 46: }
 { 46: }
-  ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
 { 47: }
 { 47: }
-  ( cc: [ '0'..'9','A'..'M','O'..'Z','_','a'..'z' ]; s: 37),
-  ( cc: [ 'N' ]; s: 48),
 { 48: }
 { 48: }
-  ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37)
+  ( cc: [ 'r' ]; s: 51),
+{ 49: }
+  ( cc: [ '0'..'9','A'..'H','J'..'Z','_','a'..'z' ]; s: 37),
+  ( cc: [ 'I' ]; s: 54),
+{ 50: }
+  ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
+{ 51: }
+  ( cc: [ 'i' ]; s: 73),
+{ 52: }
+  ( cc: [ 'F' ]; s: 72),
+{ 53: }
+  ( cc: [ 'n' ]; s: 55),
+{ 54: }
+  ( cc: [ '0'..'9','A'..'M','O'..'Z','_','a'..'z' ]; s: 37),
+  ( cc: [ 'N' ]; s: 56),
+{ 55: }
+  ( cc: [ 's' ]; s: 74),
+{ 56: }
+  ( cc: [ '0'..'9','A'..'Z','_','a'..'z' ]; s: 37),
+{ 57: }
+  ( cc: [ 'g' ]; s: 87),
+{ 58: }
+  ( cc: [ 'l' ]; s: 59),
+{ 59: }
+  ( cc: [ 'e' ]; s: 61),
+{ 60: }
+  ( cc: [ 'a' ]; s: 69),
+{ 61: }
+  ( cc: [ 'I' ]; s: 77),
+{ 62: }
+  ( cc: [ 'f' ]; s: 64),
+{ 63: }
+  ( cc: [ 'o' ]; s: 79),
+{ 64: }
+  ( cc: [ 'o' ]; s: 65),
+{ 65: }
+  ( cc: [ '"' ]; s: 66),
+{ 66: }
+{ 67: }
+{ 68: }
+{ 69: }
+  ( cc: [ 't' ]; s: 76),
+{ 70: }
+  ( cc: [ 'a' ]; s: 53),
+{ 71: }
+  ( cc: [ 'r' ]; s: 52),
+{ 72: }
+  ( cc: [ 'i' ]; s: 58),
+{ 73: }
+  ( cc: [ 'n' ]; s: 57),
+{ 74: }
+  ( cc: [ 'l' ]; s: 60),
+{ 75: }
+  ( cc: [ '"' ]; s: 67),
+{ 76: }
+  ( cc: [ 'i' ]; s: 63),
+{ 77: }
+  ( cc: [ 'n' ]; s: 62),
+{ 78: }
+  ( cc: [ '"' ]; s: 68),
+{ 79: }
+  ( cc: [ 'n' ]; s: 75),
+{ 80: }
+  ( cc: [ 'o' ]; s: 78),
+{ 81: }
+  ( cc: [ 'f' ]; s: 80),
+{ 82: }
+  ( cc: [ 'n' ]; s: 81),
+{ 83: }
+  ( cc: [ 'I' ]; s: 82),
+{ 84: }
+  ( cc: [ 'e' ]; s: 83),
+{ 85: }
+  ( cc: [ 'l' ]; s: 84),
+{ 86: }
+  ( cc: [ 'i' ]; s: 85),
+{ 87: }
+  ( cc: [ 'F' ]; s: 86)
 );
 );
 
 
 yykl : array [0..yynstates-1] of Integer = (
 yykl : array [0..yynstates-1] of Integer = (
@@ -527,15 +706,54 @@ yykl : array [0..yynstates-1] of Integer = (
 { 37: } 43,
 { 37: } 43,
 { 38: } 44,
 { 38: } 44,
 { 39: } 45,
 { 39: } 45,
-{ 40: } 46,
-{ 41: } 47,
-{ 42: } 48,
-{ 43: } 49,
-{ 44: } 50,
-{ 45: } 51,
-{ 46: } 52,
-{ 47: } 54,
-{ 48: } 55
+{ 40: } 45,
+{ 41: } 45,
+{ 42: } 45,
+{ 43: } 46,
+{ 44: } 47,
+{ 45: } 48,
+{ 46: } 49,
+{ 47: } 50,
+{ 48: } 51,
+{ 49: } 51,
+{ 50: } 52,
+{ 51: } 54,
+{ 52: } 54,
+{ 53: } 54,
+{ 54: } 54,
+{ 55: } 55,
+{ 56: } 55,
+{ 57: } 57,
+{ 58: } 57,
+{ 59: } 57,
+{ 60: } 57,
+{ 61: } 57,
+{ 62: } 57,
+{ 63: } 57,
+{ 64: } 57,
+{ 65: } 57,
+{ 66: } 57,
+{ 67: } 58,
+{ 68: } 59,
+{ 69: } 60,
+{ 70: } 60,
+{ 71: } 60,
+{ 72: } 60,
+{ 73: } 60,
+{ 74: } 60,
+{ 75: } 60,
+{ 76: } 60,
+{ 77: } 60,
+{ 78: } 60,
+{ 79: } 60,
+{ 80: } 60,
+{ 81: } 60,
+{ 82: } 60,
+{ 83: } 60,
+{ 84: } 60,
+{ 85: } 60,
+{ 86: } 60,
+{ 87: } 60
 );
 );
 
 
 yykh : array [0..yynstates-1] of Integer = (
 yykh : array [0..yynstates-1] of Integer = (
@@ -578,16 +796,55 @@ yykh : array [0..yynstates-1] of Integer = (
 { 36: } 42,
 { 36: } 42,
 { 37: } 43,
 { 37: } 43,
 { 38: } 44,
 { 38: } 44,
-{ 39: } 45,
-{ 40: } 46,
-{ 41: } 47,
-{ 42: } 48,
-{ 43: } 49,
-{ 44: } 50,
-{ 45: } 51,
-{ 46: } 53,
-{ 47: } 54,
-{ 48: } 56
+{ 39: } 44,
+{ 40: } 44,
+{ 41: } 44,
+{ 42: } 45,
+{ 43: } 46,
+{ 44: } 47,
+{ 45: } 48,
+{ 46: } 49,
+{ 47: } 50,
+{ 48: } 50,
+{ 49: } 51,
+{ 50: } 53,
+{ 51: } 53,
+{ 52: } 53,
+{ 53: } 53,
+{ 54: } 54,
+{ 55: } 54,
+{ 56: } 56,
+{ 57: } 56,
+{ 58: } 56,
+{ 59: } 56,
+{ 60: } 56,
+{ 61: } 56,
+{ 62: } 56,
+{ 63: } 56,
+{ 64: } 56,
+{ 65: } 56,
+{ 66: } 57,
+{ 67: } 58,
+{ 68: } 59,
+{ 69: } 59,
+{ 70: } 59,
+{ 71: } 59,
+{ 72: } 59,
+{ 73: } 59,
+{ 74: } 59,
+{ 75: } 59,
+{ 76: } 59,
+{ 77: } 59,
+{ 78: } 59,
+{ 79: } 59,
+{ 80: } 59,
+{ 81: } 59,
+{ 82: } 59,
+{ 83: } 59,
+{ 84: } 59,
+{ 85: } 59,
+{ 86: } 59,
+{ 87: } 59
 );
 );
 
 
 yyml : array [0..yynstates-1] of Integer = (
 yyml : array [0..yynstates-1] of Integer = (
@@ -631,15 +888,54 @@ yyml : array [0..yynstates-1] of Integer = (
 { 37: } 43,
 { 37: } 43,
 { 38: } 44,
 { 38: } 44,
 { 39: } 45,
 { 39: } 45,
-{ 40: } 46,
-{ 41: } 47,
-{ 42: } 48,
-{ 43: } 49,
-{ 44: } 50,
-{ 45: } 51,
-{ 46: } 52,
-{ 47: } 54,
-{ 48: } 55
+{ 40: } 45,
+{ 41: } 45,
+{ 42: } 45,
+{ 43: } 46,
+{ 44: } 47,
+{ 45: } 48,
+{ 46: } 49,
+{ 47: } 50,
+{ 48: } 51,
+{ 49: } 51,
+{ 50: } 52,
+{ 51: } 54,
+{ 52: } 54,
+{ 53: } 54,
+{ 54: } 54,
+{ 55: } 55,
+{ 56: } 55,
+{ 57: } 57,
+{ 58: } 57,
+{ 59: } 57,
+{ 60: } 57,
+{ 61: } 57,
+{ 62: } 57,
+{ 63: } 57,
+{ 64: } 57,
+{ 65: } 57,
+{ 66: } 57,
+{ 67: } 58,
+{ 68: } 59,
+{ 69: } 60,
+{ 70: } 60,
+{ 71: } 60,
+{ 72: } 60,
+{ 73: } 60,
+{ 74: } 60,
+{ 75: } 60,
+{ 76: } 60,
+{ 77: } 60,
+{ 78: } 60,
+{ 79: } 60,
+{ 80: } 60,
+{ 81: } 60,
+{ 82: } 60,
+{ 83: } 60,
+{ 84: } 60,
+{ 85: } 60,
+{ 86: } 60,
+{ 87: } 60
 );
 );
 
 
 yymh : array [0..yynstates-1] of Integer = (
 yymh : array [0..yynstates-1] of Integer = (
@@ -682,16 +978,55 @@ yymh : array [0..yynstates-1] of Integer = (
 { 36: } 42,
 { 36: } 42,
 { 37: } 43,
 { 37: } 43,
 { 38: } 44,
 { 38: } 44,
-{ 39: } 45,
-{ 40: } 46,
-{ 41: } 47,
-{ 42: } 48,
-{ 43: } 49,
-{ 44: } 50,
-{ 45: } 51,
-{ 46: } 53,
-{ 47: } 54,
-{ 48: } 56
+{ 39: } 44,
+{ 40: } 44,
+{ 41: } 44,
+{ 42: } 45,
+{ 43: } 46,
+{ 44: } 47,
+{ 45: } 48,
+{ 46: } 49,
+{ 47: } 50,
+{ 48: } 50,
+{ 49: } 51,
+{ 50: } 53,
+{ 51: } 53,
+{ 52: } 53,
+{ 53: } 53,
+{ 54: } 54,
+{ 55: } 54,
+{ 56: } 56,
+{ 57: } 56,
+{ 58: } 56,
+{ 59: } 56,
+{ 60: } 56,
+{ 61: } 56,
+{ 62: } 56,
+{ 63: } 56,
+{ 64: } 56,
+{ 65: } 56,
+{ 66: } 57,
+{ 67: } 58,
+{ 68: } 59,
+{ 69: } 59,
+{ 70: } 59,
+{ 71: } 59,
+{ 72: } 59,
+{ 73: } 59,
+{ 74: } 59,
+{ 75: } 59,
+{ 76: } 59,
+{ 77: } 59,
+{ 78: } 59,
+{ 79: } 59,
+{ 80: } 59,
+{ 81: } 59,
+{ 82: } 59,
+{ 83: } 59,
+{ 84: } 59,
+{ 85: } 59,
+{ 86: } 59,
+{ 87: } 59
 );
 );
 
 
 yytl : array [0..yynstates-1] of Integer = (
 yytl : array [0..yynstates-1] of Integer = (
@@ -710,40 +1045,79 @@ yytl : array [0..yynstates-1] of Integer = (
 { 12: } 51,
 { 12: } 51,
 { 13: } 52,
 { 13: } 52,
 { 14: } 55,
 { 14: } 55,
-{ 15: } 55,
-{ 16: } 57,
-{ 17: } 57,
-{ 18: } 59,
-{ 19: } 59,
-{ 20: } 60,
-{ 21: } 60,
-{ 22: } 60,
-{ 23: } 60,
-{ 24: } 60,
-{ 25: } 60,
-{ 26: } 60,
-{ 27: } 60,
-{ 28: } 61,
-{ 29: } 61,
-{ 30: } 62,
-{ 31: } 63,
-{ 32: } 63,
-{ 33: } 63,
-{ 34: } 63,
-{ 35: } 63,
-{ 36: } 65,
-{ 37: } 65,
-{ 38: } 66,
-{ 39: } 68,
-{ 40: } 70,
-{ 41: } 72,
-{ 42: } 72,
-{ 43: } 72,
-{ 44: } 72,
-{ 45: } 72,
-{ 46: } 74,
-{ 47: } 75,
-{ 48: } 77
+{ 15: } 58,
+{ 16: } 60,
+{ 17: } 60,
+{ 18: } 62,
+{ 19: } 62,
+{ 20: } 63,
+{ 21: } 63,
+{ 22: } 63,
+{ 23: } 63,
+{ 24: } 63,
+{ 25: } 63,
+{ 26: } 63,
+{ 27: } 63,
+{ 28: } 64,
+{ 29: } 64,
+{ 30: } 65,
+{ 31: } 66,
+{ 32: } 66,
+{ 33: } 66,
+{ 34: } 66,
+{ 35: } 66,
+{ 36: } 68,
+{ 37: } 68,
+{ 38: } 69,
+{ 39: } 71,
+{ 40: } 72,
+{ 41: } 73,
+{ 42: } 74,
+{ 43: } 76,
+{ 44: } 78,
+{ 45: } 78,
+{ 46: } 78,
+{ 47: } 78,
+{ 48: } 78,
+{ 49: } 79,
+{ 50: } 81,
+{ 51: } 82,
+{ 52: } 83,
+{ 53: } 84,
+{ 54: } 85,
+{ 55: } 87,
+{ 56: } 88,
+{ 57: } 89,
+{ 58: } 90,
+{ 59: } 91,
+{ 60: } 92,
+{ 61: } 93,
+{ 62: } 94,
+{ 63: } 95,
+{ 64: } 96,
+{ 65: } 97,
+{ 66: } 98,
+{ 67: } 98,
+{ 68: } 98,
+{ 69: } 98,
+{ 70: } 99,
+{ 71: } 100,
+{ 72: } 101,
+{ 73: } 102,
+{ 74: } 103,
+{ 75: } 104,
+{ 76: } 105,
+{ 77: } 106,
+{ 78: } 107,
+{ 79: } 108,
+{ 80: } 109,
+{ 81: } 110,
+{ 82: } 111,
+{ 83: } 112,
+{ 84: } 113,
+{ 85: } 114,
+{ 86: } 115,
+{ 87: } 116
 );
 );
 
 
 yyth : array [0..yynstates-1] of Integer = (
 yyth : array [0..yynstates-1] of Integer = (
@@ -761,41 +1135,80 @@ yyth : array [0..yynstates-1] of Integer = (
 { 11: } 50,
 { 11: } 50,
 { 12: } 51,
 { 12: } 51,
 { 13: } 54,
 { 13: } 54,
-{ 14: } 54,
-{ 15: } 56,
-{ 16: } 56,
-{ 17: } 58,
-{ 18: } 58,
-{ 19: } 59,
-{ 20: } 59,
-{ 21: } 59,
-{ 22: } 59,
-{ 23: } 59,
-{ 24: } 59,
-{ 25: } 59,
-{ 26: } 59,
-{ 27: } 60,
-{ 28: } 60,
-{ 29: } 61,
-{ 30: } 62,
-{ 31: } 62,
-{ 32: } 62,
-{ 33: } 62,
-{ 34: } 62,
-{ 35: } 64,
-{ 36: } 64,
-{ 37: } 65,
-{ 38: } 67,
-{ 39: } 69,
-{ 40: } 71,
-{ 41: } 71,
-{ 42: } 71,
-{ 43: } 71,
-{ 44: } 71,
-{ 45: } 73,
-{ 46: } 74,
-{ 47: } 76,
-{ 48: } 77
+{ 14: } 57,
+{ 15: } 59,
+{ 16: } 59,
+{ 17: } 61,
+{ 18: } 61,
+{ 19: } 62,
+{ 20: } 62,
+{ 21: } 62,
+{ 22: } 62,
+{ 23: } 62,
+{ 24: } 62,
+{ 25: } 62,
+{ 26: } 62,
+{ 27: } 63,
+{ 28: } 63,
+{ 29: } 64,
+{ 30: } 65,
+{ 31: } 65,
+{ 32: } 65,
+{ 33: } 65,
+{ 34: } 65,
+{ 35: } 67,
+{ 36: } 67,
+{ 37: } 68,
+{ 38: } 70,
+{ 39: } 71,
+{ 40: } 72,
+{ 41: } 73,
+{ 42: } 75,
+{ 43: } 77,
+{ 44: } 77,
+{ 45: } 77,
+{ 46: } 77,
+{ 47: } 77,
+{ 48: } 78,
+{ 49: } 80,
+{ 50: } 81,
+{ 51: } 82,
+{ 52: } 83,
+{ 53: } 84,
+{ 54: } 86,
+{ 55: } 87,
+{ 56: } 88,
+{ 57: } 89,
+{ 58: } 90,
+{ 59: } 91,
+{ 60: } 92,
+{ 61: } 93,
+{ 62: } 94,
+{ 63: } 95,
+{ 64: } 96,
+{ 65: } 97,
+{ 66: } 97,
+{ 67: } 97,
+{ 68: } 97,
+{ 69: } 98,
+{ 70: } 99,
+{ 71: } 100,
+{ 72: } 101,
+{ 73: } 102,
+{ 74: } 103,
+{ 75: } 104,
+{ 76: } 105,
+{ 77: } 106,
+{ 78: } 107,
+{ 79: } 108,
+{ 80: } 109,
+{ 81: } 110,
+{ 82: } 111,
+{ 83: } 112,
+{ 84: } 113,
+{ 85: } 114,
+{ 86: } 115,
+{ 87: } 116
 );
 );
 
 
 
 

+ 17 - 3
packages/fcl-res/src/rclex.l

@@ -4,7 +4,7 @@ var
   strbuf: string;
   strbuf: string;
 
 
 const
 const
-  KeywordDefs: array [0..23] of TIdentMapEntry = (
+  KeywordDefs: array [0..33] of TIdentMapEntry = (
     // attribs
     // attribs
     (Value: _LANGUAGE;             Name: 'LANGUAGE'),
     (Value: _LANGUAGE;             Name: 'LANGUAGE'),
     (Value: _CHARACTERISTICS;      Name: 'CHARACTERISTICS'),
     (Value: _CHARACTERISTICS;      Name: 'CHARACTERISTICS'),
@@ -30,7 +30,18 @@ const
     (Value: _PLUGPLAY;             Name: 'PLUGPLAY'),
     (Value: _PLUGPLAY;             Name: 'PLUGPLAY'),
     (Value: _STRINGTABLE;          Name: 'STRINGTABLE'),
     (Value: _STRINGTABLE;          Name: 'STRINGTABLE'),
     (Value: _RCDATA;               Name: 'RCDATA'),
     (Value: _RCDATA;               Name: 'RCDATA'),
-    (Value: _VXD;                  Name: 'VXD')
+    (Value: _VERSIONINFO;          Name: 'VERSIONINFO'),
+    (Value: _VXD;                  Name: 'VXD'),
+    // file version fields names
+    (Value: _FILEVERSION;          Name: 'FILEVERSION'),
+    (Value: _PRODUCTVERSION;       Name: 'PRODUCTVERSION'),
+    (Value: _FILEFLAGSMASK;        Name: 'FILEFLAGSMASK'),
+    (Value: _FILEFLAGS;            Name: 'FILEFLAGS'),
+    (Value: _FILEOS;               Name: 'FILEOS'),
+    (Value: _FILETYPE;             Name: 'FILETYPE'),
+    (Value: _FILESUBTYPE;          Name: 'FILESUBTYPE'),
+    (Value: _BLOCK;                Name: 'BLOCK'),
+    (Value: _VALUE;                Name: 'VALUE')
   );
   );
 
 
 function KeywordToInt(k: string; out kw: integer): boolean;
 function KeywordToInt(k: string; out kw: integer): boolean;
@@ -76,6 +87,9 @@ IDENT [a-zA-Z_]([a-zA-Z0-9_])*
 <INSTRING>\\\n          ;
 <INSTRING>\\\n          ;
 <INSTRING>\n            return(_ILLEGAL);
 <INSTRING>\n            return(_ILLEGAL);
 <INSTRING>.             strbuf:= strbuf + yytext;
 <INSTRING>.             strbuf:= strbuf + yytext;
+\"StringFileInfo\"      begin yytext:= 'StringFileInfo'; return(_STR_StringFileInfo); end;
+\"VarFileInfo\"         begin yytext:= 'VarFileInfo'; return(_STR_VarFileInfo); end;
+\"Translation\"         begin yytext:= 'Translation'; return(_STR_Translation); end;
 
 
 BEGIN|{                 return(_BEGIN);
 BEGIN|{                 return(_BEGIN);
 END|}                   return(_END);
 END|}                   return(_END);
@@ -90,7 +104,7 @@ END|}                   return(_END);
                               return(_ID);
                               return(_ID);
                          end;
                          end;
 [ \t\n\f]               ;
 [ \t\n\f]               ;
-","                     returnc(',');
+[,()]                   returnc(yytext[1]);
 .                       return(_ILLEGAL);
 .                       return(_ILLEGAL);
 %%
 %%
 
 

File diff suppressed because it is too large
+ 562 - 236
packages/fcl-res/src/rcparser.pas


+ 95 - 13
packages/fcl-res/src/rcparser.y

@@ -12,7 +12,7 @@ interface
 uses
 uses
   SysUtils, Classes, StrUtils, lexlib, yacclib, resource,
   SysUtils, Classes, StrUtils, lexlib, yacclib, resource,
   acceleratorsresource, groupiconresource, stringtableresource,
   acceleratorsresource, groupiconresource, stringtableresource,
-  bitmapresource, versionresource, groupcursorresource;
+  bitmapresource, versionresource, versiontypes, groupcursorresource;
 
 
 function yyparse : Integer;
 function yyparse : Integer;
 
 
@@ -33,8 +33,9 @@ implementation
 
 
 procedure yyerror ( msg : String );
 procedure yyerror ( msg : String );
 begin
 begin
-  writeln(ErrOutput, yyfilename, '(',yylineno,':',yycolno,'): at "',yytext,'"');
-  WriteLn(ErrOutput, '  ',msg);
+  writeln(ErrOutput, yyfilename, '(',yylineno,':',yycolno,'): at "',yytext,'": ', msg);
+  WriteLn(ErrOutput, yyline);
+  WriteLn(ErrOutput, '^':yycolno);
 end(*yyerrmsg*);
 end(*yyerrmsg*);
 
 
 {$I yyinclude.pp}
 {$I yyinclude.pp}
@@ -117,10 +118,10 @@ function str_to_num(s:string): rcnumtype;
 begin
 begin
   // this does not handle empty strings - should never get them from the lexer
   // this does not handle empty strings - should never get them from the lexer
   Result.long:= s[Length(s)] = 'L';
   Result.long:= s[Length(s)] = 'L';
-  if Result.Long then
+  if Result.long then
     setlength(s, Length(s) - 1);
     setlength(s, Length(s) - 1);
   if Copy(s, 1, 2) = '0x' then
   if Copy(s, 1, 2) = '0x' then
-    Result.v:= StrToInt('$' + Copy(s, 2, Maxint))
+    Result.v:= StrToInt('$' + Copy(s, 3, Maxint))
   else
   else
     Result.v:= StrToInt(s);
     Result.v:= StrToInt(s);
 end;
 end;
@@ -153,6 +154,7 @@ begin
     RT_BITMAP: cls:= TBitmapResource;
     RT_BITMAP: cls:= TBitmapResource;
     RT_ICON: cls:= TGroupIconResource;
     RT_ICON: cls:= TGroupIconResource;
     RT_CURSOR: cls:= TGroupCursorResource;
     RT_CURSOR: cls:= TGroupCursorResource;
+    RT_VERSION: cls:= TVersionResource;
   else
   else
     raise EResourceDescTypeException.CreateFmt('Resource type not supported: %d', [aType]);
     raise EResourceDescTypeException.CreateFmt('Resource type not supported: %d', [aType]);
   end;
   end;
@@ -189,25 +191,56 @@ begin
   r.Strings[ident]:= str;
   r.Strings[ident]:= str;
 end;
 end;
 
 
-
 procedure stringtable_end();
 procedure stringtable_end();
 begin
 begin
   FreeAndNil(aktresource);
   FreeAndNil(aktresource);
 end;
 end;
 
 
+function make_version(a, b, c, d: Word): TFileProductVersion;
+begin
+  Result[0]:= a;
+  Result[1]:= b;
+  Result[2]:= c;
+  Result[3]:= d;
+end;
+
+procedure version_string_tab_begin(lcs: string);
+var
+  vst: TVersionStringTable;
+begin
+  vst:= TVersionStringTable.Create(lcs);
+  TVersionResource(aktresource).StringFileInfo.Add(vst);
+end;
+
+procedure version_string_tab_add(key, value: string);
+begin
+  TVersionResource(aktresource).StringFileInfo.Items[TVersionResource(aktresource).StringFileInfo.Count-1].Add(key, value);
+end;
+
+procedure version_var_translation_add(langid, cpid: word);
+var
+  ti: TVerTranslationInfo;
+begin
+  ti.language:= langid;
+  ti.codepage:= cpid;
+  TVersionResource(aktresource).VarFileInfo.Add(ti);
+end;
+
 var
 var
   yycapture: AnsiString;
   yycapture: AnsiString;
 %}
 %}
 
 
 %token _ILLEGAL
 %token _ILLEGAL
 %token _NUMDECIMAL _NUMHEX _QUOTEDSTR
 %token _NUMDECIMAL _NUMHEX _QUOTEDSTR
+%token _STR_StringFileInfo _STR_VarFileInfo _STR_Translation
 %token _BEGIN _END _ID
 %token _BEGIN _END _ID
 %token _LANGUAGE _CHARACTERISTICS _VERSION _MOVEABLE _FIXED _PURE _IMPURE _PRELOAD _LOADONCALL _DISCARDABLE
 %token _LANGUAGE _CHARACTERISTICS _VERSION _MOVEABLE _FIXED _PURE _IMPURE _PRELOAD _LOADONCALL _DISCARDABLE
-%token _BITMAP _CURSOR _ICON
+%token _BITMAP _CURSOR _ICON _STRINGTABLE _VERSIONINFO
 %token _ANICURSOR _ANIICON _DLGINCLUDE _DLGINIT _HTML _MANIFEST _MESSAGETABLE _PLUGPLAY _RCDATA _VXD
 %token _ANICURSOR _ANIICON _DLGINCLUDE _DLGINIT _HTML _MANIFEST _MESSAGETABLE _PLUGPLAY _RCDATA _VXD
-%token _ACCELERATORS _DIALOG _DIALOGEX _MENU _MENUEX _STRINGTABLE _VERSIONINFO
+%token _FILEVERSION _PRODUCTVERSION _FILEFLAGSMASK _FILEFLAGS _FILEOS _FILETYPE _FILESUBTYPE _BLOCK _VALUE
+%token _ACCELERATORS _DIALOG _DIALOGEX _MENU _MENUEX
 
 
-%type <rcnumtype> numpos numeral
+%type <rcnumtype> numpos numexpr numeral
 %type <String> ident_string filename_string long_string
 %type <String> ident_string filename_string long_string
 %type <TResourceDesc> resid rcdataid
 %type <TResourceDesc> resid rcdataid
 %type <TMemoryStream> raw_data raw_item
 %type <TMemoryStream> raw_data raw_item
@@ -230,6 +263,7 @@ resourcedef
     | res_bitmap
     | res_bitmap
     | res_cursor
     | res_cursor
     | res_icon
     | res_icon
+    | res_version
     | res_rcdata
     | res_rcdata
     ;
     ;
 
 
@@ -242,6 +276,46 @@ res_cursor
 res_icon
 res_icon
     : resid _ICON { create_resource($1, RT_ICON); } suboptions filename_string                { TGroupIconResource(aktresource).SetCustomItemDataStream($5); }
     : resid _ICON { create_resource($1, RT_ICON); } suboptions filename_string                { TGroupIconResource(aktresource).SetCustomItemDataStream($5); }
 
 
+res_version
+    : resid _VERSIONINFO { create_resource($1, RT_VERSION); } version_fixed _BEGIN version_blocks _END
+
+version_fixed
+    : /* empty */
+    | version_fixed _FILEVERSION numeral ',' numeral ',' numeral ',' numeral                  { TVersionResource(aktresource).FixedInfo.FileVersion:= make_version($3.v, $5.v, $7.v, $9.v); }
+    | version_fixed _PRODUCTVERSION numeral ',' numeral ',' numeral ',' numeral               { TVersionResource(aktresource).FixedInfo.ProductVersion:= make_version($3.v, $5.v, $7.v, $9.v); }
+    | version_fixed _FILEFLAGSMASK numpos                                                     { TVersionResource(aktresource).FixedInfo.FileFlagsMask:= $3.v; }
+    | version_fixed _FILEFLAGS numpos                                                         { TVersionResource(aktresource).FixedInfo.FileFlags:= $3.v; }
+    | version_fixed _FILEOS numpos                                                            { TVersionResource(aktresource).FixedInfo.FileOS:= $3.v; }
+    | version_fixed _FILETYPE numpos                                                          { TVersionResource(aktresource).FixedInfo.FileType:= $3.v; }
+    | version_fixed _FILESUBTYPE numpos                                                       { TVersionResource(aktresource).FixedInfo.FileSubType:= $3.v; }
+    ;
+
+version_blocks
+    : /* empty */
+    | version_blocks _BLOCK _STR_StringFileInfo _BEGIN ver_strings_lang _END
+    | version_blocks _BLOCK _STR_VarFileInfo _BEGIN ver_translation_data _END
+    ;
+
+ver_strings_lang
+    : /* empty */
+    | ver_strings_lang _BLOCK long_string _BEGIN                                              { version_string_tab_begin($3); }
+                                          ver_strings_data _END
+    ;
+
+ver_strings_data
+    : /* empty */
+    | ver_strings_data _VALUE long_string ',' long_string                                     { version_string_tab_add($3, $5); }
+    ;
+
+ver_translation_data
+    : _VALUE _STR_Translation ',' ver_translation_pair
+    ;
+
+ver_translation_pair
+    : numeral ',' numeral                                                                     { version_var_translation_add($1.v, $3.v); }
+    | ver_translation_pair ',' numeral ',' numeral                                            { version_var_translation_add($3.v, $5.v); }
+    ;
+
 res_rcdata
 res_rcdata
     : resid rcdataid { create_resource($1, $2); } suboptions filename_string                  { aktresource.SetCustomRawDataStream($5); }
     : resid rcdataid { create_resource($1, $2); } suboptions filename_string                  { aktresource.SetCustomRawDataStream($5); }
     | resid rcdataid { create_resource($1, $2); } suboptions _BEGIN raw_data _END             { aktresource.SetCustomRawDataStream($6); }
     | resid rcdataid { create_resource($1, $2); } suboptions _BEGIN raw_data _END             { aktresource.SetCustomRawDataStream($6); }
@@ -275,7 +349,7 @@ rcdataid
     ;
     ;
 
 
 resid
 resid
-    : numeral                                      { $$:= TResourceDesc.Create($1.v); }
+    : numpos                                       { $$:= TResourceDesc.Create($1.v); }
     | ident_string                                 { $$:= TResourceDesc.Create($1); }
     | ident_string                                 { $$:= TResourceDesc.Create($1); }
     ;
     ;
 
 
@@ -301,7 +375,7 @@ languagedef
     : _LANGUAGE numpos ',' numpos                  { language:= MakeLangID($2.v, $4.v); }
     : _LANGUAGE numpos ',' numpos                  { language:= MakeLangID($2.v, $4.v); }
 
 
 numpos
 numpos
-    : numeral
+    : numexpr
     ;
     ;
 
 
 numeral
 numeral
@@ -309,17 +383,25 @@ numeral
     | _NUMHEX                                      { $$:= str_to_num(yytext); }
     | _NUMHEX                                      { $$:= str_to_num(yytext); }
     ;
     ;
 
 
+numexpr
+    : numeral
+    | '(' numexpr ')'                              { $$:= $2; }
+    ;
+
 ident_string
 ident_string
     : _ID                                          { $$:= yytext; }
     : _ID                                          { $$:= yytext; }
-    | _QUOTEDSTR                                   { $$:= yytext; }
+    | long_string
     ;
     ;
 
 
 filename_string
 filename_string
-    : _QUOTEDSTR                                   { $$:= TFileStream.Create(yytext, fmOpenRead or fmShareDenyWrite); }
+    : long_string                                   { $$:= TFileStream.Create(yytext, fmOpenRead or fmShareDenyWrite); }
     ;
     ;
 
 
 long_string
 long_string
     : _QUOTEDSTR                                   { $$:= yytext; }
     : _QUOTEDSTR                                   { $$:= yytext; }
+    | _STR_StringFileInfo                          { $$:= yytext; }
+    | _STR_VarFileInfo                             { $$:= yytext; }
+    | _STR_Translation                             { $$:= yytext; }
     ;
     ;
 
 
 raw_data
 raw_data

Some files were not shown because too many files changed in this diff