guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix for c99dev string escape char read


From: Matt Wette
Subject: Re: fix for c99dev string escape char read
Date: Thu, 23 Nov 2017 07:04:30 -0800

> On Nov 23, 2017, at 6:45 AM, Matt Wette <address@hidden> wrote:
> 
> 
>> On Nov 22, 2017, at 11:02 PM, Jan Nieuwenhuizen <address@hidden> wrote:
>> 
>> Jan Nieuwenhuizen writes:
>> 
>>> For now I'm happy; we'll see.
>> 
>> Still happy, found a bug though; on c99dev plus my previous patch this 
>> happens
>> 
>> --8<---------------cut here---------------start------------->8---
>> (use-modules (nyacc lang c99 parser) (ice-9 pretty-print))
>> (pretty-print (with-input-from-string "#define ELF \"\\177ELF\"\nchar *a = 
>> ELF;" parse-c99))
>> 
>> =>
>> 
>> (trans-unit
>> (decl (decl-spec-list (type-spec (fixed-type "char")))
>>       (init-declr-list
>>         (init-declr
>>           (ptr-declr (pointer) (ident "a"))
>>           (initzer (p-expr (string "177ELF")))))))
>> --8<---------------cut here---------------end--------------->8---
>> 
>> master (correctly) gives
>> 
>>  ... (p-expr (string "\x7fELF"))
>> 
>> janneke
>> 
>> -- 
>> Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
>> Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com
>> 
> 
> 
> Right.  I thought octals had to start with 0.  I will fix.

Or I though so yesterday when I changed the code.  I believe I have a fix, but 
I'm going to 
add and execute more lex tests before pushing.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]