chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] -no-parentheses-synonyms broken?


From: Peter Bex
Subject: Re: [Chicken-users] -no-parentheses-synonyms broken?
Date: Fri, 30 Aug 2013 09:39:19 +0200
User-agent: Mutt/1.4.2.3i

On Fri, Aug 30, 2013 at 01:17:40AM -0600, Matt Gushee wrote:
> Hello, list--
> 
> Well, in the course of trying to figure out why my sxpath expressions
> aren't working, I think I've discovered a bug in Chicken.
> 
> I hypothesize that filter expressions in the native sxpath syntax
> don't work because they are delimited with []

That makes absolutely no sense; the "native" sxpath surface syntax is
unrelated to the textual path syntax; they're plain s-expressions, in
which [] is disallowed in regular R5RS syntax.

> and Chicken by default
> treats square brackets as equivalent to parentheses. So I wanted to
> see what would happen if I used csi -no-parentheses-synonyms. But it
> seems that option has no effect. To wit:

It looks like you've indeed found a bug.  I've done some tests, and
passing -r5rs-syntax seems to disable the paren synonyms correctly.
I don't see why a lone -no-parentheses-synonyms shouldn't do the
job; they access the same parameter behind the scenes.  Anyway, I'll
look into the code behind this later.  Thanks for reporting it!

> Similarly, if I compile this code with csc ... I note comparing
> executables with 'cmp' shows some difference when the program is
> compiled with vs. without -no-parentheses-synonyms, but as with csi
> there is no apparent difference in behavior.

The diff in the generated C is probably due to differing gensyms or so;
the program probably is semantically identical (but there's no way to
verify that with a C compiler, AFAIK).

> I also note that the manual says "-no-parentheses-synonyms STYLE", but
> it is not clear what, if anything, is an appropriate value for the
> STYLE argument.

That looks like a documentation malfunction; probably a copy/paste from
the -keyword-style line.  I'll fix that along with the option handling.
Thanks again for reporting these bugs!

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

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