[racket] How to to make a program that will take a simple racket file, parse it with the reader in a way that I can expand it?

From: Andre Mayers (Andre.Mayers at USherbrooke.ca)
Date: Fri Jun 14 15:48:40 EDT 2013

I want to make a little program that will take a simple racket file, parse
it with the reader in a way that I can expand it. 

For example, I have the file programme.rkt that have the following line :

                #lang racket

                (define aa 7)

                (let ( [bb 3])

                  (+ aa bb))

                  

I would like to do something like               

                (define fichier-programme "C:\\fichier-programme.rkt")

                (define in (open-input-file fichier-programme))

                (expand (read-syntax fichier-programme in)) 

                (close-input-port in)

                

 

André Mayers, Ph.D., M. Ps.

professeur agrégé

Département d'informatique

Université de Sherbrooke

Sherbrooke (Québec) Canada J1K 2R1

tél: +1 819-821-8000 poste 62041

fax: +1 819-821-8200

andre.mayers at usherbrooke.ca

http://info.usherbrooke.ca/AndreMayers

 

 

De : users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org] De
la part de Matt Jadud
Envoyé : 14 juin 2013 14:38
À : Sam Tobin-Hochstadt
Cc : Racket
Objet : Re: [racket] Racket Blogging - How To??

 

I had no idea!

 

I take it this is my Jekyll replacement? Thank you!

 

Cheers,

Matt

 

 

On Fri, Jun 14, 2013 at 11:31 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>
wrote:

On Fri, Jun 14, 2013 at 11:24 AM, Ray Racine <ray.racine at gmail.com> wrote:
> So I'm thinking about blogging about some aspect (positive) of Racket
coding
> this weekend.  Not sure what the options are these days.
>
> A) Use a blogging site of choice + cut/paste into some online code
> formatter, enscriptem etc..
> B) Use Scribble to generate html -> host generated html on gitpages or
self
> host.
> C) I recall seeing at least 1 or 2 posts on the list about some Racket
> project(s) which facilitate Racket blogging.
>
> Recommendations?

Frog: https://github.com/greghendershott/frog

Sam
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130614/0b6ce234/attachment.html>

Posted on the users mailing list.