From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [GSoC] Bourne-shell compiler front-end for Guile Date: Wed, 23 Mar 2016 15:05:08 +0100 Message-ID: <87oaa5uw6j.fsf@gnu.org> References: <20160321142205.5949d36c@debian-netbook> <87fuvj5uwi.fsf@gnu.org> <20160322211801.595f63e7@debian-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aijPV-0004RM-W4 for guix-devel@gnu.org; Wed, 23 Mar 2016 10:05:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aijPL-0003JH-QM for guix-devel@gnu.org; Wed, 23 Mar 2016 10:05:17 -0400 In-Reply-To: <20160322211801.595f63e7@debian-netbook> (Efraim Flashner's message of "Tue, 22 Mar 2016 21:18:01 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner skribis: > On Mon, 21 Mar 2016 23:27:25 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> Hi Efraim, >>=20 >> Thanks for your proposal! >>=20 >> This project can be pretty fun, I think, and quite rewarding if it >> indeed allows us to get rid of a bunch of bootstrap binaries. >>=20 >> As I see it, the project covers mostly two areas: >>=20 >> 1. Lexing & parsing. This compiler front-end will need a real parser >> for the Bourne shell syntax, notably semicolon-separated command >> sequences, pipes, brace-delimited blocks, functions, variables, and >> =E2=80=98test=E2=80=99 and =E2=80=98[=E2=80=99. >>=20 >> The available tools could be SILex + (system base lalr) (the latter >> is part of Guile, the former is maintained separately; a copy can >> be found in Guile-RPC for instance.) >>=20 >> 2. Run-time support: redirections, pipes, background execution, C-c >> (SIGINT) and C-z (SIGTSTP), globbing, and so on. >>=20 >> Guile provides just the basic here, and a little more with (ice-9 >> popen). Scsh and its Guile port(s) provide a lot of that, so it >> might be a good idea to see what can be stolen from these. >>=20 >> It may be that some of your CS classes cover some of this ground (a >> fairly common programming project here at university is to implement a >> small shell precisely because it covers several areas.) >>=20 >> How does that sound? >>=20 >> Perhaps one way to get started would be by looking at the available >> tools for #1, and experimenting with hacks for #2, possibly borrowing >> code from Scsh. >>=20 >> Thoughts? > > Sounds like lots of fun, I'm really looking forward to it. And it sounds = like > I'll need to dive deeper into bash to see what I get to implement I guess a related question is how confident/familiar you feel with the two areas above. The agenda could be adjusted as a function of that. Thanks, Ludo=E2=80=99.