guix-devel
[Top][All Lists]
Advanced

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

Re: [GSoC] Bourne-shell compiler front-end for Guile


From: Ludovic Courtès
Subject: Re: [GSoC] Bourne-shell compiler front-end for Guile
Date: Mon, 21 Mar 2016 23:27:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi Efraim,

Thanks for your proposal!

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.

As I see it, the project covers mostly two areas:

  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
     ‘test’ and ‘[’.

     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.)

  2. Run-time support: redirections, pipes, background execution, C-c
     (SIGINT) and C-z (SIGTSTP), globbing, and so on.

     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.

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.)

How does that sound?

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.

Thoughts?

Thanks,
Ludo’.

PS: Would be nice to have a second mentor on this, either officially or
    unofficially (if you don’t want to have a to be known to Google…).
    Any takers?  :-)



reply via email to

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