KindTran: Kind Transducer

Read Me


Install * Usage * Licence * Contact * Uninstall * Tips * FAQ

What are kind grammars and why yet another compiler compiler? Short description what are kind grammars and some hints where you can find theoretical background is in separate file.

The reason for using this tool is that it generates parsers with easy-to-understand source files - i.e. it is possible to reconstruct the original structure of the grammar and also to understand and therefore also be able to modify the sources.

Install

  1. Create a directory where you want the application to reside.
  2. Copy the archive with KindTran there
  3. Change current directory to the created one.
  4. Extract the files to this directory (e.g. using
    unzip KT020???.zip *
    where ??? stands for your platform - w32, os2, or emx)
  5. Copy the KindTran.exe file to any directory on your search path.
  6. Try the demos (optional):
    1. Type KindTran AriExp2.lng src2.def out.out and press Enter.
    2. Look into `src2.def' and `out.out' files: in the first there is an arithmetical expression in usual notation, in the second (should be) the same expression converted to postfix notation and evaluated.
    3. Type KindTran PascalPP.lng src2.pas src2.html and press Enter.
    4. Open the file src2.html in your www-browser, and in a usual editor and compare it with src2.pas.
    5. Type KindTran pl0pp.lng src.pl0 pl0.html and press Enter.
    6. Open the file pl0.html in your www-browser, and in a usual editor and compare it with pl0.html.

Usage

KindTran [-d][-q] <langfile> <source> <target> [-l<lstfile>]
where:
ParameterDescription
-qsupresses printing of banner
-denables dumping of quite all internal structures in somehow readable form; it is very useful for debugging the grammars
<langfile> language description file name
<source>input file in source language
<target>output file in target language;
Warning! If this file already exists, it is overwritten!
-l<lstfile>enables generation of a listing file and specifies its name (and optional path); it is useful for `debugging' of new language description files as it shows processed language description file lines.

Licence

Usage of this application is free of charge, but the users are kindly asked to note the use of this tool in the documentation of the created applications whenever the kind transducer is used as their subpart and to inform the author of kind transducer about its succesful use.

Disassembling and other reverse engineereng is prohibited: if you need to do some changes in the application, ask the author.

Author is not responsible of any damage made by the application and by their use.

Contact

Michal Zemlicka
KSI MFF UK
Malostranske nam. 25
118 00 Praha 1
Czech Republic
e-mails: Michal.Zemlicka@mff.cuni.cz or (if the first fails) Michal.Zemlicka@post.cz
Home page:
KindTran

The contact can also be used for sending some wonderful ideas how to improve the application. If you find some errors in the application send me an info about it - but distinguish please between errors in grammars that are written by you and errors really caused by the application.

Uninstall

Just remove the directory where the application were installed and (if the KindTran.exe file was copied to some other directory) also this copy.

Tips

FAQ

Q: Why I should set the limits for terminals, nonterminals, etc.?
A: The language description files (and most of the sources) are shared with another application: run-time extensible compiler that is still under development and that allows to extend the grammar in parse time -- therefore some limits are needed to control the extension process.

Q: Why do you ask for info about the use?
A: I need to show my boss that I do not spend my time with playing. As other scientists I need to publish and be cited ...

Q: Why the application is not open-source?
A: I want to keep the control about the application at least until the twin-app will be finished. And also, of course, I want to use this application - current trends in author rights seem to me very dangerous and I do not want to pay for the use of my own work in the future. If I decide to leave computers, I probably give the sources to the public.

Q: Will the semantic actions be better supported.
A: I hope so. But it needs some time and lots of work. The instruction set will grow.

Q: Is the product error-free?
A: I am afraid that there are some. Therefore it is released as beta to let others to help me in their detection.

Q: How can I "debug" my own language descriptions?
A: Enable generation of listing file (by the -l switch) that can show you where the learning process stopped. It is also helpful to redirect the output from screen to some file and use it as a log file.

Q: How can I guess the proper limits for terminals, nonterminals, edges, etc.?
A: Limits for number of terminals, nonterminals, semantic actions, output terminals, productions, keywords and instructions can be obtained easily: just count their definition lines. Limit of edges and views try to set to 10x(#terminals + #nonterminals), limit for node set to 25x(#terminals + #nonterminals), and limit for symbol nodes set a bit higher that is their number - it depends on their number and length. Using the -d switch adds to the (screen) output (that is good to redirect to some file) dump of the internal structures of the application. At the beginning of this dump are both limits and real allocations of given entities.