A compiler from monicelli language to Common Lisp.

cage 9dc1b818d7 Added link to new repository. 2 months ago
examples 80590c18b6 - check funcalls after interning; 5 years ago
src 80590c18b6 - check funcalls after interning; 5 years ago
.gitignore d053e05dbd - added inference of type of a funcall; 5 years ago
Makefile.am bb9e321b62 - initial commit. 5 years ago
README.org 9dc1b818d7 Added link to new repository. 2 months ago
README.txt 26481c31da - fixed floating point regular expression; 5 years ago
TODO.org 31fabb26c4 - checking for missing return statement in a function (that does not return nil). 5 years ago
cazzilli.asd 9331a07cad - prevented crash when checking type of expression of a print 5 years ago
compare_version.awk bb9e321b62 - initial commit. 5 years ago
configure.ac bb9e321b62 - initial commit. 5 years ago
quick_quicklisp.sh.in bb9e321b62 - initial commit. 5 years ago

README.org

Introduction

moved to https://codeberg.org/cage/cazzilli/

Cazzilli is a compiler for Monicelli that targets Common Lisp. For information about Monicelli point the browser to the original implementation.

The name of this compiler is a reference of a typical dish of southern Italian cuisine symbolically offered to a great film director from (Center)Northern Italy: Mario Monicelli, come fosse trazione per due.

Status

This project is in a very early status, but nevertheless is able to compile a simple example.

Examples from Original Implementation

Use

For End Users

compile and generate an executable with:

#+BEGIN_SRC sh $ cazzilli "source-file" "executable-file" #+END_SRC

Note that if already exists on your file system "executable-file" will be overwritten. Please remember this and also that there is NO WARRANTY.

For Developers

| name | parameter | |---------------------+-----------------------| | parser:parse-stream | a stream | |---------------------+-----------------------| | parser:parse-file | a pathname designator |

both functions above will return 4 values:

  • the monicelli code compiled to lisp code (or nil if errors
  • occurred);
  • al list of the errors occurred during compilation (or nil if no
  • errors occurred);
  • a list of the warning occurred during compilation (if any);
  • the environment;
  • an AST (Abstract Syntax Tree) corresponding to the output of the
  • parser.

The last two are useful only for debugging purposes.

Notes

Differences in Grammars

  1. Because of my laziness :) the "bit shift" statements must appear on
  2. a single line.

#+BEGIN_SRC text con scappellamento a per #+END_SRC

is accepted but

#+BEGIN_SRC text con scappellamento a per #+END_SRC

is not. Note that:

#+BEGIN_SRC text con scappellamento a per #+END_SRC

is OK.

Of course patches are welcome.

  1. Iff a variable is prefixed with the article "=l'=" the first
  2. must precede the variable name without any spaces in between:

#+BEGIN_SRC text l'orologio #+END_SRC

is accepted but

#+BEGIN_SRC text l' orologio #+END_SRC

is not.

Also see BUGS.

Differences in Semantics

  • By default a type Mascetti is assigned to a literal integer e.g.

#+BEGIN_SRC text 42 a posterdati #+END_SRC

will print * (see: ascii(7)), not 42.

  • "a posterdati" statement does not print a newline by default.

BUGS

Known Bugs

Currently the compilation errors reported to the user are very poor. Hopefully this is going to be corrected soon; but do not hold your breath! ^_^;

Reporting

Please send bug report to cage-dev at twistfold dot it or point your browser to the notabug repository.

License

This program is released under GNU General Public license version 3 or later (see COPYING file).

Contributing

Any help is appreciated. If you intend to contribute please send a message to cage-dev at twistfold dot it or, alternatively, point your browser to the issue tracker.

NO WARRANTY

cazzilli a compiler from Monicelli language to common lisp. Copyright (C) 2018 cage

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Thanks

All the proper merits for the language goes to the people whom originally ideated it.