You are here:
(27 Nov 2007,
---++ Software * Start versions for the lab exercises. Updates will appear here, the version is indicated by the date inside the filename. See patches & fixes with the same date for a description of changes. * [[%ATTACHURL%/ipt-20041103-src.zip][ipt-20041103-src.zip]] * Parser combinators, AG system and pretty printing library are installed on the <nop>WinXX lab machines. The IPT startversion distribution contains scripts to start Hugs and GHCi. <br> Additional remarks: * The AG system can be used as follows (on Windows): P:\ipt\uuagc -a XXX.ag * If you want to install these libraries yourself (e.g. at home), download them at [[http://www.cs.uu.nl/wiki/HUT/Download the Haskell Utrecht Tools download site]]. File [[http://abaris.zoo.cs.uu.nl:8080/wiki/pub/HUT/Download/uulib-0.9.2-src.tar.gz uulib-0.9.2-src.tar.gz]] contains the libraries, whereas [[http://abaris.zoo.cs.uu.nl:8080/wiki/pub/HUT/Download/uuagc-0.9.1-src.tar.gz uuagc-0.9.1-src.tar.gz]] contains the sources for the AG system. The installation instructions can be found in the README files. * Simple Stack Machine (SSM) interpreter * In /praktikum/ipt/SSM (UNIX) or P:\ipt\SSM (<nop>WinXX) scripts can be found to start SSM. The .jar Java library for SSM can also be found there. This file will be (silently) updated when new releases for SSM are available. * There are syntax highlighting modes for UUAG files for the [[%ATTACHURL%/UUAG.chl][Context]] and [[%ATTACHURL%/ag.xml][JEdit]] programming editors. ---++ Patches & fixes * [Lab exercise 3] The file <nop>SLTypeInference for the third lab exercise has the operator "&&" in its initial environment 'initgamma'. However, this will confuse <nop>LaTeX, so you may want remove this entry. ---++ Tips and Tricks If you want to test your own (character) parser, you can copy-paste the following lines into your program. <verbatim> import UU.Parsing instance Symbol Char test :: Show a => Parser Char a -> String -> IO () test p input = do result <- parseIO p input putStrLn (show result) </verbatim> *Example:* The following parser consumes a single 'a' character. <verbatim> pA :: Parser Char Char pA = pSym 'a' </verbatim> Don't forget the type signature here, or the compiler will complain about unresolved top-level overloading. To test this parser: <verbatim> MyFile> test pA "abc" ?? Error : at 'b' ?? Expecting : end of file ?? Repaired by: deleting: 'b' ?? Error : at 'c' ?? Expecting : end of file ?? Repaired by: deleting: 'c' 'a' </verbatim> <!-- ---+++ Compiling uuagc from the source files First, follow the installation manual at http://cvs.cs.uu.nl/cgi-bin/cvsweb.cgi/uust/INSTALL.html (which can also be found [[%ATTACHURL%/INSTALL.html][here]]). If this doesn't work, you can try the following. * go to the tools/ag directory in the uust package * and call the GHC compiler with the following arguments <verbatim> ghc -package data --make -i../../lib/parsing -i../../lib/ddata -i../../lib/pretty -i../../lib/scanner -i../../lib/util -fglasgow-exts -o uuagc Ag.hs </verbatim> This should build the binary in your current directory. --> -- Main.WouterSwierstra - 11 Nov 2004
ore topic actions
Topic revision: r28 - 27 Nov 2007,
Tools & software
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UUCS?