RexxLA / NetRexx

Other
8 stars 0 forks source link

Unicode literal example fails to compile, interprets OK #55

Closed remesm closed 8 months ago

remesm commented 1 year ago

Example from nrl .pdf(pg 33), should display two backslashes Runs fine when interpreted, fails to compile

$ cat unicode.nrx say '\\u005C'

$ nrc -run unicode NetRexx portable processor 4.05-GA build 2,284-20230617-1758 Copyright (c) RexxLA, 2011,2023. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program unicode.nrx /unicode.java:2: error: unclosed string literal public static void main(java.lang.String $0s[]){netrexx.lang.RexxIO.Say("\\u005C");return;}private unicode(){return;}} ^ /unicode.java:2: error: reached end of file while parsing public static void main(java.lang.String $0s[]){netrexx.lang.RexxIO.Say("\\u005C");return;}private unicode(){return;}} ^ 2 errors Compilation of 'unicode.nrx' failed [javac failed]

$ nrc -exec unicode NetRexx portable processor 4.05-GA build 2,284-20230617-1758 Copyright (c) RexxLA, 2011,2023. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program unicode.nrx ===== Exec: unicode ===== \ Processing of 'unicode.nrx' complete

remesm commented 8 months ago

Fixed with commit 621f9ddfd262c37330c1ca368e166ddf94b59152.

(took me hours to debug ;