From jolapache@free.fr Tue Nov 09 00:46:22 2004 Received: with ECARTIS (v1.0.0; list lojban-list); Tue, 09 Nov 2004 00:46:22 -0800 (PST) Received: from postfix3-2.free.fr ([213.228.0.169]) by chain.digitalkingdom.org with esmtp (Exim 4.34) id 1CRRde-0002gd-Og for lojban-list@lojban.org; Tue, 09 Nov 2004 00:46:07 -0800 Received: from imp3-q.free.fr (imp3-q.free.fr [212.27.42.3]) by postfix3-2.free.fr (Postfix) with ESMTP id 19B8DC092 for ; Tue, 9 Nov 2004 09:45:50 +0100 (CET) Received: by imp3-q.free.fr (Postfix, from userid 33) id 0AC347742; Tue, 9 Nov 2004 09:45:50 +0100 (MET) Received: from cacheserv.univ-lille1.fr (cacheserv.univ-lille1.fr [193.49.225.10]) by imp3-q.free.fr (IMP) with HTTP for ; Tue, 9 Nov 2004 09:45:49 +0100 Message-ID: <1099989949.419083bdf00a0@imp3-q.free.fr> Date: Tue, 9 Nov 2004 09:45:49 +0100 From: Jo l'apache To: lojban-list@lojban.org Subject: [lojban] Re: Computer grammar question: non-left recursive RPN? References: <20041107081848.GW18082@chain.digitalkingdom.org> In-Reply-To: <20041107081848.GW18082@chain.digitalkingdom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 193.49.225.10 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis X-archive-position: 8966 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: jolapache@free.fr Precedence: bulk Reply-to: lojban-list@lojban.org X-list: lojban-list rp-expression = rp-operand rp-operand operator rp-operand = operand / rp-expression here is the version without left-recursion rp-expression = rep-operand rp-operand operator rp-operand = rp-operand' rp-operand rp-operand' = () | rp-operand operator I think this version is correct, but i'm too busy to check it now. Regards, jo -- #include /**** ***/ #define r(o,t) ((c|040)>=o&&(c|040)<=o+014)?c+t: main(void){int c;while((c=getc(stdin))!=EOF){/**/ putchar(r('a',015)(r('n',-015)c));}}/** ebg13 **/