University of Leicester – Department of Computer Science
CO7206 - Fall 2003 - Lab 9: Program Restructuring Using TXL
4 Dec. / 2003
Congratulations J: You made it through the hard times in this course and you
are close to the end.
Objective: To
further practice programming in TXL
In lab 7 we had our first hands on
experience using TXL. In lab 8 we used TXL for a small restructuring task. In
this lab we will further experiment with TXL by writing another small
restructuring program.
Task:
<![if !supportLists]>2-
<![endif]>Examine this example of a program written in this command
language.
<![if !supportLists]>3-
<![endif]>Download,
compile and run this if-to-case
TXL converter on the
example above.
<![if !supportLists]>4-
<![endif]>Read and
comprehend the if-to-case
TXL converter program.
<![if !supportLists]>5-
<![endif]>Write a TXL
program to transform a case-statement in a list of contiguous if-statements.
<![if !supportLists]>6-
<![endif]>Write your
own programs with if and case statements that follow the given grammar and run
the two converters (case-to-if and if-to-case) on them.
Resources:
<![if !supportLists]>q
<![endif]>An example case-to-if
transformer
<![if !supportLists]>q
<![endif]>Amble Resources are found on the TXL page
<![if !supportLists]>q
<![endif]>TXL
Documentation
<![if !supportLists]>q
<![endif]>A brief guide on how to
write a TXL program
<![if !supportLists]>q
<![endif]>More TXL
examples