mkvsynth/mkvsynth — pull request #9 by lukechampine (2014-01-19 03:32:52+00:00)
Title: Code reorganization

This change moves a lot of stuff around, hopefully into a more sane configuration.

- Core language functions (`print`, `assert`, etc.) have been moved from delbrot.y to corefunctions.c
- plugins.c moved to internalfilters.c. `go` is now defined here, instead of alongside the core functions.
- delbrot.c and corefunctions.c are now "suckless" style: includes, macros, function declarations, global variables, then function definitions, all alphabetized.
- The definition of `go_AST` has been moved back to spawn.c. A simple `#ifdef` has been added to delbrot.l that ensures `go` is called on EOF unless using `make delbrot`.

The new organizational scheme is as follows:

| file | contents |
|:-------------------|:--------------------------------------------------------------------------------|
| delbrot.l | Lexer definition. |
| delbrot.y | Parser definition, and functions for creating ASTnodes. main() is defined here. |
| delbrot.c | Functions for evaluating ASTnodes, implementing the skeleton of the language. |
| delbrot.h | Structs, macros, declarations, and global variables |
| corefunctions.c | Non-video-related functions callable by the user |
| internalfilters.c | Listing of filters callable by the user (no definitions) |

Any new filters that are written should be defined in the filters folder and declared + listed in internalfilters.c. Eventually we can add "externalfilters.c" or something akin to it when we get around to addressing the whole plugin issue.