
Hi there,
I believe the following snippet is ISO Prolog (I have checked it with several Prolog systems, just to make sure my reading of the standard was plausible), but YAP 4.3.22 seems to disagree:
p :- write('\ Something...\n\ ... and something else.\n').
If there is any workaround I would appreciated very much knowing about it. All the best
Roberto

Hi Roberto,
I don't have the manual with me, but it looks correct: Yap should ignore \ in ISO mode.
I'll send a fix in a moment.
Cheers,
Vitor

I don't have the manual with me, but it looks correct: Yap should ignore \ in ISO mode.
Fixed that in CVS.
BTW, does anyone know if 0'\ a is a legal number in the Standard? Or should I fail?
Cheers,
Vitor
Index: scanner.c =================================================================== RCS file: /cvsroot/yap/C/scanner.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- scanner.c 24 May 2002 05:14:46 -0000 1.8 +++ scanner.c 14 Jun 2002 22:04:40 -0000 1.9 @@ -257,6 +257,7 @@ } might_be_float = FALSE; *sp++ = ch; + restart: my_getch(); if (base == 0) { Int ascii = ch; @@ -266,6 +267,8 @@ /* escape sequence */ ch = my_get_quoted_ch(); switch (ch) { + case 10: + goto restart; case 'a': ascii = '\a'; break; @@ -570,6 +573,11 @@ /* escape sequence */ ch = my_get_quoted_ch(); switch (ch) { + case 10: + /* don't add characters */ + printf("I am here\n"); + my_get_quoted_ch(); + break; case 'a': *charp++ = '\a'; my_get_quoted_ch(); @@ -978,6 +986,7 @@ if (ch == ''') { might_be_float = FALSE; *sp++ = ch; + restart: my_fgetch(); if (base == 0) { Int ascii = ch; @@ -991,6 +1000,8 @@ /* escape sequence */ ch = my_fgetch(); switch (ch) { + case 10: + goto restart; case 'a': ascii = '\a'; break; @@ -1305,6 +1316,10 @@ /* escape sequence */ ch = my_fgetch(); switch (ch) { + case 10: + /* just skip */ + my_fgetch(); + break; case 'a': *charp++ = '\a'; my_fgetch();
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________ Yap-commits mailing list Yap-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/yap-commits
participants (2)
-
Roberto Bagnara
-
Vitor Santos Costa