[PPL-devel] Re: [Yap-users] Parser bug?

Vitor Santos Costa vitor at biostat.wisc.edu
Sat Jun 15 00:04:21 CEST 2002


> 
> 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 at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yap-commits




More information about the PPL-devel mailing list