Welcome to COSC230 Home Page

Download Version 1 to the file "pl0.c" in your directory, and Sample program 1 to the file "sample1". Then type "gcc pl0.c" and "cp a.out pl0". Finally type "pl0 sample1".

Instructions for other versions are similar. In version 3, you will be prompted to give the file name of the sample program.

  • course outline
  • Parser
  • Version 1
  • Sample program 1
  • Version 2
  • Sample program 2
  • Version 3
  • Sample program 3
  • Version 4 for graphic manipulations
  • Sample program 4
  • Sample program 5
  • Script for compiling version 4
  • Snapshot version simpler / Snapshot version detailed
  • Sample program from tut2
  • Sample program 7
  • Sample program of factorial of 4
  • Implementation note
  • Lecture note
  • Micro Compiler Project
  • Array implementation
  • Assignment No. 2, 2006
  • Tutorial No. 1
  • Tutorial No. 2
  • parse tracer
  • Assignment 2007 in pdf
  • Assignment 2007 in doc
  • Assignment 2008 in doc
  • Assignment 2009 in doc
  • Assignment 2010 in doc
  • test1
  • test2 A guide for examination
    Since 2000, there have been two questions each year
    One is a trace type for a syntax chart
    For this problem, download "trace parser" above, and edit it for each question. See solution for exam06 below.
    The second question is to analyze an object code for a sample program. For this problem, download "snap.c" above, and trace it with the PL0 program in the examination.
  • exam in 2000
  • exam in 2001
  • Answers 2001
  • Answers 2001, Doc file
  • exam in 2002
  • exam in 2006
  • Annotated object code for exam 2006
  • solution for exam 2006, instruction at 17 is executed for the third time
  • solution for exam 2006, trace for parenthesis strings,
    Atfer compiling, give (())!
  • exam in 2007
  • Parse tracer S-->aTS, T-->bST, S-->c, T-->c
    Prof. Takaoka's address, CS Dept., Univ. of Canterbury, Christchurch, New Zealand tad@cosc.canterbury.ac.nz