**** (c) 1998, University of Twente, Enschede, the Netherlands. **** **** **** **** This file contains information for installing the Student LAnguage **** **** Development Environment (SLADE) version 2.8 (formerly known as TCGS) **** **** developed at University of Twente. **** **** The ideas behind SLADE are described in: **** **** - H.Alblas, A.Nymeyer: Practice and Principles of Compiler Building **** **** with C, Prentice Hall 1996. **** **** - H.Alblas, H.Groen, A.Nymeyer, C.Slot: Student Language Development **** **** Environment, Twente University Press 1998. **** **** **** **** To report bugs, comments, or any suggestions: please contact **** **** Han Groen, tel: +31 53 4894617, e-mail: groen@cs.utwente.nl **** The Unix version of SLADE can be installed by uncompressing (using uncompress) and extracting (using tar) the downloaded compressed tarfile. During installation the following subdirectories are created: bin/ codgen Code generator, mkpars Compiler maker, scangen Scanner generator, parsgen Parser generator, v2c Converts VIM code to C, v2a Converts VIM code to Intel x86 assembler, v2s Converts VIM code to GNU Intel x86 assembler, vimint VIM code interpreter, sladepr Pretty printer of SLADE specifications, sladevw Pretty viewer of SLADE specifications, examples/ Example directories, each example contains: build Shell script to build a compiler, run Shell script to run/test the built compiler, XX_S.INP Scanner XX specification file, XX.INP Parser XX specification file, *.INP Test input file(s), include/ cgl.h Header file used by the built compiler, evalattr.h API module evalattr, header file, evalattr.inc parsgen include file, extmac.h Macro's for Intel x86 assembler generation, extmac.s Macro's for GNU Intel x86 assembler generation, idscope.h API module idscope, header file, idscope.inc parsgen include file, rts.h Code generation functions, header file, scanpars.h Scanner/parser interface, header file, scanpars.c Scanner/parser interface, source file, vimcode.h API module vimcode, header file, vimcode.inc parsgen include file, lessons/ Lessons directory, contains the initial scanner/parser specifications used in the lessons of the tutorial in [ANGS98], lib/ cgl.c Comiler generation routines, source file, cgl.o Comiler generation routines, object file, codgen.makefile Makefile used by codgen, evalattr.c API module evalattr, source file, evalattr.o API module evalattr, object file, idscope.c API module idscope, source file, idscope.o API module idscope, object file, makelibs Script to (re)build the SLADE objects, makelibs.makefile Makefile used by makelibs, mkpars.makefile Makefile used by mkpars, rts.c Code generation functions, source file, rts.o Code generation functions, object file, vgrindefs.slade Used by pretty printer sladepr, vimcode.c API module vimcode, source file, vimcode.o API module vimcode, object file, Note: Slade assumes the presence of the Gnu C compiler, if you're using another C compiler you need to change lib/mkpars.makefile, lib/makelibs.makefile and lib/codgen.makefile and invoke makelibs to (re)build the object files. Before you can use SLADE you should set the following environment variables: VERMAN= PATH=$VERMAN/bin:$PATH For example if you installed SLADE under /usr/local/slade and you're using a C-shell you should type in the following lines (and add them to your .login file, if you want to save them for later use): setenv VERMAN /usr/local/slade setenv PATH $VERMAN/bin:$PATH Building a compiler from a scanner and parser specification can be done with mkpars. Synopsis: mkpars [options] parser_name [ action.c ... ] For example, in directory examples/simple you can type: mkpars simple and make(1) will be invoked on lib/mkpars.mkf to build the parser 'simple'. Once you've build a compiler which generates VIM code you can convert this VIM code into an executable with codgen. Synopsis: codgen [options] file.vim For example, in directory examples/vim2c you can type: codgen simtest.vim and make(1) will be invoked on lib/codgen.mkf to build the executable 'simtest'.