From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Matt Wette <matt.wette@gmail.com>
Cc: Guile User Mailing List <guile-user@gnu.org>
Subject: fix for c99dev string escape char read
Date: Thu, 23 Nov 2017 03:11:56 +0100 [thread overview]
Message-ID: <87o9nthhg3.fsf_-_@gnu.org> (raw)
In-Reply-To: <8C89D411-ED03-4D86-A389-BD06153DB964@gmail.com> (Matt Wette's message of "Sat, 11 Nov 2017 14:03:34 -0800")
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
Hi Matt,
Working with guile-2.0.14 (soon 2.0.9) on your recent c99dev branch I
need attached patch.
So, guile-2.0 resurrected, yay!
Thanks,
janneke
[-- Attachment #2: 0001-resurrect-reading-of.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]
From 0bb330c0c5c6d9298884dfecd0185e2520bb3267 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 23 Nov 2017 03:05:45 +0100
Subject: [PATCH] resurrect reading of '\'' '\\' '\'' '\"' '\?' '\|'.
* module/nyacc/lex.scm (read-c-chlit): in read-esc-char, accept string
(#\\ #\' #\" #\? #\|) too.
---
module/nyacc/lex.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/module/nyacc/lex.scm b/module/nyacc/lex.scm
index c3e3e9b..17b8b03 100644
--- a/module/nyacc/lex.scm
+++ b/module/nyacc/lex.scm
@@ -290,7 +290,8 @@
((#\r) "\r") ; return U+000D
((#\0) (string (integer->char (read-oct)))) ; octal
((#\x) (string (integer->char (read-hex)))) ; hex
- (else (error "bad escape sequence")))))
+ ((#\\ #\' #\" #\? #\|) (string c2))
+ (else (error (format #f "bad escape sequence: ~s" c2))))))
(define (wchar t)
(case t ((#\L) '$chlit/L) ((#\u) '$chlit/u) ((#\U) '$chlit/U)))
(cond
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2017-11-23 2:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 17:19 [ANN] nyacc 0.82.2 is released Matt Wette
2017-11-11 18:37 ` [ANN] nyacc 0.82.3 " Matt Wette
2017-11-11 19:53 ` Jan Nieuwenhuizen
2017-11-11 19:59 ` Jan Nieuwenhuizen
2017-11-11 20:00 ` Matt Wette
2017-11-11 22:03 ` [ANN] nyacc 0.82.4 " Matt Wette
2017-11-23 2:11 ` Jan Nieuwenhuizen [this message]
2017-11-23 3:28 ` fix for c99dev string escape char read Matt Wette
2017-11-23 5:43 ` Jan Nieuwenhuizen
2017-11-23 7:02 ` Jan Nieuwenhuizen
2017-11-23 14:45 ` Matt Wette
2017-11-23 15:04 ` Matt Wette
2017-11-23 15:14 ` Jan Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9nthhg3.fsf_-_@gnu.org \
--to=janneke@gnu.org \
--cc=guile-user@gnu.org \
--cc=matt.wette@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).