From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k10g2000yqa.googlegroups.com!not-for-mail From: Natacha Kerensikova Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Thu, 12 Aug 2010 13:23:01 -0700 (PDT) Organization: http://groups.google.com Message-ID: <85fc256b-bb92-43f5-9de7-5148f5b23622@k10g2000yqa.googlegroups.com> References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <87aap6wcdx.fsf@ludovic-brenta.org> <87vd7jliyi.fsf@ludovic-brenta.org> <699464f5-7f04-4ced-bc09-6ffc42c5322a@w30g2000yqw.googlegroups.com> <87k4nylb8c.fsf@ludovic-brenta.org> <4c617774$0$6765$9b4e6d93@newsspool3.arcor-online.net> <2610d347-27cf-4c88-ac18-84f73c7da858@h32g2000yqm.googlegroups.com> <878w4blhzj.fsf@ludovic-brenta.org> NNTP-Posting-Host: 95.152.65.220 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1281644581 20925 127.0.0.1 (12 Aug 2010 20:23:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 12 Aug 2010 20:23:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k10g2000yqa.googlegroups.com; posting-host=95.152.65.220; posting-account=aMKgaAoAAAAoW4eaAiNFNP4PjiOifrN6 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.3) Gecko/20100524 Firefox/3.6.3,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13193 Date: 2010-08-12T13:23:01-07:00 List-Id: On Aug 12, 9:59=A0pm, Ludovic Brenta wrote: > In reality, an S-Expression (a "cons pair" in Lisp parlance) can indeed > not have three elements; the notation (a b c) is, really, shorthand for > (a (b c)); I was keen to implement that in my parser. =A0See > > http://en.wikipedia.org/wiki/S-expression#Definition According to that page, cons pairs are noted with an extra dot, like (x . y), right? So (a b c) would be (a . (b . (c . nil))), right? Then my example would be: (tcp-connect . ((host . (foo.example . nil)) . ((port . (80 . nil)) . nil))) For the record, I'm just discovering the concept of cons pairs, I based my previous S-expression work only on Rivest's proposed standard http://people.csail.mit.edu/rivest/Sexp.txt Hoping this helps, Natacha