123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <HR><H2>RIGAL manual page</H2>
- <UL>
- <UL>
- <UL>
- <A HREF="#HDR0">NAME</A>
- <BR>
- <A HREF="#HDR1">SYNOPSIS</A>
- <BR>
- <A HREF="#HDR2">COMPILATION TARGET (Pascal and C)</A>
- <BR>
- <A HREF="#HDR3">DESCRIPTION OF rc</A>
- <BR>
- <A HREF="#HDR4">OPTIONS</A>
- <BR>
- <A HREF="#HDR5">DESCRIPTION OF <I>executable</I> file (compilation result)</A>
- <BR>
- <A HREF="#HDR6">OPTION</A>
- <BR>
- <A HREF="#HDR7">DESCRIPTION OF ic</A>
- <BR>
- <A HREF="#HDR8">OPTIONS</A>
- <BR>
- <A HREF="#HDR9">DESCRIPTION of v</A>
- <BR>
- <A HREF="#HDR10">DESCRIPTION of rig_crf</A>
- <BR>
- <A HREF="#HDR11">DESCRIPTION of rig_lint</A>
- <BR>
- <A HREF="#HDR12">ERROR MESSAGES</A>
- <BR>
- <A HREF="#HDR13">ENVIRONMENT</A>
- <BR>
- <A HREF="#HDR14">INSTALLATION of RIGAL from sources</A>
- <BR>
- <A HREF="#HDR15">FILES</A>
- <BR>
- <A HREF="#HDR16">PRINTED DOCUMENTATION</A>
- <BR>
- <A HREF="#HDR17">AUTHORS</A>
- </UL>
- </UL>
- </UL>
- <HR><! - This file was created with the fm2html filter.The filter is copyright Norwegian Telecom Research and was programmed by Jon Stephenson von Tetzchner. -><H4><A NAME="HDR0">NAME</A></H4>
- <DT> <B>rc</B> - checks and compiles RIGAL file </DT><BR>
- <DT> <B>ic</B> - interprets intermediate RIGAL code </DT><BR>
- <DT><B>v</B> - viewer for RIGAL data saved in file </DT><BR>
- <DT><B>rig_crf</B> - RIGAL cross -referencer </DT><BR>
- <DT><B>rig_lint</B> - RIGAL Lint (data type checker) </DT><BR>
- <H4><A NAME="HDR1">SYNOPSIS</A></H4>
- <DT> <B>rc</B> <I>filename</I> <B> [-c] [ -D] [ -P </B> parameter]... </DT><BR>
- <DT> <B>ic</B> <I>codefilename</I> <B> [ -p</B> <I>printfilename</I>]<B> [ -d][</B> parameter...] </DT><BR>
- <DT> <B>v</B> <I>filename</I> </DT><BR>
- <DT><B>rig_crf</B> <I>filename</I> </DT><BR>
- <DT><B>rig_lint</B> <I>filename</I> <I>executable</I> <B> [ -p </B><I>printfilename</I>] [ parameter...] <B> </B></DT><BR>
- <DT><B>(!) </B> the options and parameters must be separated by one or more spaces. </DT><BR>
- <H4><A NAME="HDR2">COMPILATION TARGET (Pascal and C)</A></H4>
- <DT> There are two variants of RIGAL implementation: RIGAL/Pascal in UNIX Pascal and RIGAL/C in UNIX C. The differences between them are mentioned below. </DT><BR>
- <H4><A NAME="HDR3">DESCRIPTION OF rc</A></H4>
- <DT> <B>rc</B> <I>filename</I> <B> [ -c] [ -D] [ -P </B> parameter]... </DT><BR>
- <DT> <B>rc</B> - checks source file written in RIGAL language. The source code file must have suffix <B>.rig</B>, but in the command <I>filename</I> is specified without the suffix. <B>rc</B> reports error messages if any appear; file name, row, column and message text are reported to standard output. <B>rc</B> creates intermediate code <I>filename</I><B>.rsc</B> which can be used for interpretation. </DT><BR>
- <H4><A NAME="HDR4">OPTIONS</A></H4>
- <DT><B> -c</B> <BR>
- creates an executable file <I>filename</I> (without suffix). In RIGAL/Pascal variant an intermediate Pascal code is generated and then Pascal compiler (<B>pc</B>) and linker are invoked. In RIGAL/C variant an intermediate C code is generated and then C compiler (<B>cc</B>) and linker are invoked. Some intermediate files, among them script file <B>xd</B>, also appear. </DT><BR>
- <DT><B> -D</B> does not remove intermediate files after the compilation. </DT><BR>
- <DT><B> -P</B><I>parameter</I> <BR>
- passes option to Pascal or C compiler. You can use <B> -P</B> several times or use <B> -P </B><I> 'param1 param2' </I> syntax. Typically you may be need to compile with statically linked standard libraries, e.g. <B>$rig/rc rigcrf -c -P -Bstatic</B> </DT><BR>
- <H4><A NAME="HDR5">DESCRIPTION OF <I>executable</I> file (compilation result)</A></H4>
- <DT> <I>executable</I><B> [ -p</B> <I>printfilename</I>] [parameter...] </DT><BR>
- <DT> The parameters are passed to RIGAL program and can be received through #PARM built -in rule which returns list of parameters. The execution is identical to the interpreted program. </DT><BR>
- <H4><A NAME="HDR6">OPTION</A></H4>
- <DT> <B> -p</B> <I>printfilename</I> - name of file for statement PRINT output. By default output is written to standard output. </DT><BR>
- <H4><A NAME="HDR7">DESCRIPTION OF ic</A></H4>
- <DT> <B>ic</B> <I>codefilename</I> [<B> -p</B> <I>printfilename</I>] [<B> -d</B>] [parameter...] </DT><BR>
- <DT> <B>ic</B> - interprets the intermediate code, created by <B>rc</B>. The intermediate code must have suffix <B>.rsc</B>, but in the command it is specified without the suffix. Other parameters are passed to RIGAL program and can be received through #PARM built -in rule which returns list of parameters.The execution is identical to the compiled program. </DT><BR>
- <H4><A NAME="HDR8">OPTIONS</A></H4>
- <DT><B> -p</B><I>printfilename</I> <BR>
- name of file for statement PRINT output. By default output is written to standard output. </DT><BR>
- <DT><B> -d</B><I></I> tracing mode is turned on. Trace of rules and branches, rule arguments and success/unsuccess messages is written to file specified by <B> -p</B> option and is mixed with output from PRINT statements. If <B> -p</B> option is absent trace is written to standard output. </DT><BR>
- <H4><A NAME="HDR9">DESCRIPTION of v</A></H4>
- <DT> <B>v</B> <I>filename</I> </DT><BR>
- <DT><B>v</B> writes the contents of RIGAL code saved in file to standard output. The structure of code is written with indentation, in well -readable form. If the depth of some element of the structure is more than 15 levels, then characters '..' appear instead of the element. The <I>filename</I> must contain data saved by RIGAL statement SAVE $<I>var 'filename</I>' </DT><BR>
- <H4><A NAME="HDR10">DESCRIPTION of rig_crf</A></H4>
- <DT> <B>rig_crf</B> <I>filename</I> </DT><BR>
- <DT> <B>rig_crf</B> creates cross reference table for given RIGAL program <I>filename</I>. The program file must have suffix <B>.rig</B>, but in the command <I>filename</I> is specified without the suffix. The result is written to file <I>filename</I><B>.crf</B>. For every rule the following is reported: rules calling this one, rules called by this one, variables, use of global variables. </DT><BR>
- <H4><A NAME="HDR11">DESCRIPTION of rig_lint</A></H4>
- <DT> <B>rig_lint</B> <I>filename</I> </DT><BR>
- <DT><B>rig_lint</B> creates warning table for given RIGAL program <I>filename</I>. The program file must have suffix <B>.rig</B>, but in the command <I>filename</I> is specified without the suffix. The result is written to file <I>filename</I><B>.lnt</B>. <B>rig_lint</B> checks type compatibility and cases when values of different types can be assigned to the same variable. </DT><BR>
- <H4><A NAME="HDR12">ERROR MESSAGES</A></H4>
- <DT><B> Error in file</B> <I>filename</I> <B> Line=</B><I>nn</I><B> Message=</B><I>text</I><B> Column=</B><I>mm</I> - checker found syntax error in your RIGAL file. Intermediate code is not created, compilation failed. <B> </B></DT><BR>
- <DT><B> *** ERROR</B> <I> nn xxx</I> - runtime warnings about dangerous manipulations with RIGAL data structures or runtime input/output errors. <B> </B></DT><BR>
- <DT>rig:undefined variable </DT><BR>
- <DT><B>pc:command not found</B> - see ENVIRONMENT section of this manual <B> </B></DT><BR>
- <DT>ERROR:COMPILATION </DT><BR>
- <DT><B>ERROR IN RIGAL, rule #</B><I>name</I> - internal compilation message, normally does not appear; try to simplify this rule. <B> </B></DT><BR>
- <DT><B>ld() errors or warnings </B> - try command <B> ranlib $rig/lib/riglib.a</B> to remove errors. </DT><BR>
- <H4><A NAME="HDR13">ENVIRONMENT</A></H4>
- <DT> For running RIGAL/Pascal you must have Sun Pascal release 2.1 (or higher). Command <B>pc</B> (Pascal compiler) must be available. </DT><BR>
- <DT>For running RIGAL/C you must have a C compiler (command <B>cc</B>) available. You must have environment variable <B>rig</B> set to the name of directory where RIGAL system binary files are located. You can set it by command <B>setenv rig </B><I>full_path</I><B>/bin</B> in your <B>.login</B> file It is recommended to include this directory at the start of path list by command <B> set path=( $rig ... )</B> in your <B>.login</B> file. Then you can use RIGAL commands <B>rc</B>, <B>ic</B> etc. from any directory. </DT><BR>
- <H4><A NAME="HDR14">INSTALLATION of RIGAL from sources</A></H4>
- <DT> All files are packed and compressed in file <B>rigs</B><I>variant.system_version.</I><B>tar.Z</B> (e.g. rigsp.444.tar.Z). Here <B>rigsp</B> denotes Pascal sources, <B>rigsc</B> - C sources. <B>uncompress</B> file (without suffix <B>.Z</B>) <B>tar -xvf</B> file execute instructions in ENVIRONMENT section. </DT><BR>
- <DT> Go to RIGAL source directory (<B>/src</B>) and execute <B> make</B> ; it takes 3-5 minutes to compile all sources by Sun Pascal (or C) compiler and perform self-test. The result is in <B>/bin</B> </DT><BR>
- <H4><A NAME="HDR15">FILES</A></H4>
- <DT> <B> bin/rc, bin/ic, bin/rig_crf, bin/rig_lint, bin/v</B> basic RIGAL system executable files </DT><BR>
- <DT><B> lib/riglib.a</B> RIGAL compiler runtime library. If you move it from one directory to another, execute command <B>ranlib</B><I> new_directory</I><B>/riglib.a</B> </DT><BR>
- <DT> <B>include/</B><I>file</I>.<B>inc</B>, <B>include/</B><I>file</I>.<B>h</B> m include files for compilation </DT><BR>
- <DT><B> bin/anrig, bin/genrig</B> parts of RIGAL compiler <B> </B></DT><BR>
- <DT><B>doc/rigal.1 </B> this manual <B> </B></DT><BR>
- <DT><B>doc/langdesc.txt </B> RIGAL language description </DT><BR>
- <DT><B> doc/impl.txt </B> User's guide <I>file</I><B>.rig</B> source programs in RIGAL </DT><BR>
- <DT><I>file</I><B>.rsc</B> intermediate code for interpreter </DT><BR>
- <DT><B>xcrg*.pas,</B> <I>file</I>.<B>RC2</B>, <I>file</I>.<B>RC4</B>, <I>file</I>.<B>TMP</B> intermediate files, appear and by default are removed during compilation. </DT><BR>
- <H4><A NAME="HDR16">PRINTED DOCUMENTATION</A></H4>
- <DT> The documentation is in <B>doc</B> subdirectory. </DT><BR>
- <DT>Use <B>troff -man -t rigal.1 | lpr -h -t</B> to print manual page </DT><BR>
- <DT> <B>nroff -man -t rigal.1 > rigal.man</B> to prepare readable manual page file </DT><BR>
- <DT> <B>troff -ms -t langdesc.txt | lpr -h -t</B> to print language description </DT><BR>
- <DT> <B>troff -ms -t impl.txt | lpr -h -t</B> to print the programmer's guide </DT><BR>
- <H4><A NAME="HDR17">AUTHORS</A></H4>
- <DT> Mikhail Auguston and Vadim Engelson, Inst. of Math. and Comp.Sci, University of Latvia, Rainis blvd. 29, Riga, LV-1459, Latvia (Lettland). Currently (1994-1995) Vadim Engelson is at IDA, S-58183, Linkoping University, Linkoping, Sweden. e -mail: vadim@mii.lu.lv , vaden@ida.liu.se. </DT><BR>
- <DT>Some info and pointers to papers are available from <A HREF="http://www.ida.liu.se/labs/pelab/members/vaden/rigal.html"> Rigal home page </A> </DT><BR>
- <DT>Rigal and papers about it available by ftp from <A HREF="ftp://ftp.ida.liu.se/pub/labs/pelab/rigal"> RIGAL FTP directory </A> </DT><BR>
- <A NAME="ENDFILE"><PRE> </PRE></A>
|