Homework 1: Implementing a Scripting Language via Macros

How to Design Programs: An Introduction to Programming and Computing

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
WPI CS536 (F07) Homework 1 (Scripting) CS 536 Homework 1: Implementing a Scripting Language via Macros Due: September 13, hardcopy in class and electronic via turnin (asgmt name hwk1 ) For this assignment, you will implement a small scripting language using Scheme's macro system. Like most Unix shells, we will use streams to represent the output of system processes; below, we provide Scheme primitives for streams . Do this assignment in the Pretty Big language level in DrScheme. Since this task relies heavily on support libraries (for systems calls, I/O, etc), you will need to learn some new features of PLT Scheme as you go. A good resource is the Help Desk, which contains extensive documentation on all of the libraries. Your language should include at least the following expressions: Directory listing (files re ) This expression produces a stream containing the names of all files in the current directory that match the regular expression re . The re argument should be a string, not a Scheme reg-exp object. File contents (lines re filename ) This expression produces a stream containing all lines in the file filename that match the regular expression re . The filename should be a string naming a file in the current directory. Command execution
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 02/06/2008 for the course CS 536 taught by Professor Fisler during the Fall '07 term at WPI.

Page1 / 4

Homework 1: Implementing a Scripting Language via Macros -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online