View Issue Details

IDProjectCategoryView StatusLast Update
0005278JEDI VCL00 JVCL Componentspublic2012-02-29 16:55
ReporterZENsanAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.45 
Summary0005278: JvInterpreter and #XX character codes..
DescriptionJvInterpreter does not handles 0000010, #XX character constants with string constants.

This does not work in JvInterpreter, but works in standard Delphi compiler since 1.0 version:
var
  s: String;
begin
  s := '';
  s := s + 0000013#10'Hello'0000013#10;
end;
TagsNo tags attached.

Activities

2010-07-14 15:58

 

JvInterpreter.zip (1,204 bytes)

obones

2010-10-08 16:02

administrator   ~0017810

It would be nice if anyone could write a patch

2010-11-23 14:05

 

Patch.diff (1,145 bytes)
--- C:/Comps/jvcl/run/JvInterpreter.pas	�� �� 23 15:00:23 2010
+++ C:/Users/U7/Documents/RAD Studio/Projects/JvInterpreter.pas	�� �� 23 14:59:10 2010
@@ -5151,7 +5151,8 @@
     while True do
     begin
       case TTyp of
-        ttInteger, ttDouble, ttString, ttFalse, ttTrue, ttIdentifier:
+        //ZENsan 23.11.2010
+        ttInteger, ttDouble, ttFalse, ttTrue, ttIdentifier:
           begin
             Result := Token;
             if TTyp = ttIdentifier then
@@ -5166,6 +5167,19 @@
             if Prior(TTyp) < Prior(OpTyp) then
               Exit;
           end;
+        ttString:
+          begin
+            Result := '';
+            repeat
+              Result := Result + Token;
+              NextToken;
+              if TTyp in [ttInteger, ttDouble, ttFalse, ttTrue, ttIdentifier] then
+                JvInterpreterError(ieMissingOperator, PosEnd {!!});
+            until TTyp <> ttString;
+            if Prior(TTyp) < Prior(OpTyp) then
+              Exit;
+          end;
+        //ZENsan 23.11.2010
 
         // [peter schraut: added ttShl case on 2005/08/14]
         ttShl:
Patch.diff (1,145 bytes)

ZENsan

2010-11-23 14:07

reporter   ~0018150

I uploaded patch file which fixes this issue. But I haven't tested that on all possible constructions, so i cant guarantee that this is 100% for sure correct.

But if we go from logic side, then it must work for everything. Patch is not big, so it will be easy to understand.

So no # 13'Hello'# 13 will be no problem to parse.

ZENsan

2010-11-23 14:08

reporter   ~0018151

I hope, Oliver, you will be able to check that. Or possible someone else.

AHUser

2010-11-28 10:54

developer   ~0018205

Fixed in svn revision 12925.

Issue History

Date Modified Username Field Change
2010-07-14 15:58 ZENsan New Issue
2010-07-14 15:58 ZENsan File Added: JvInterpreter.zip
2010-08-20 11:46 obones Status new => acknowledged
2010-10-08 16:02 obones Note Added: 0017810
2010-10-08 16:02 obones Status acknowledged => feedback
2010-11-23 14:05 ZENsan File Added: Patch.diff
2010-11-23 14:07 ZENsan Note Added: 0018150
2010-11-23 14:08 ZENsan Note Added: 0018151
2010-11-28 10:54 AHUser Note Added: 0018205
2010-11-28 10:54 AHUser Status feedback => resolved
2010-11-28 10:54 AHUser Fixed in Version => Daily / SVN
2010-11-28 10:54 AHUser Resolution open => fixed
2010-11-28 10:54 AHUser Assigned To => AHUser
2012-02-29 16:55 obones Fixed in Version Daily / SVN => 3.45