| // for error messages |
| #include <iostream> |
| |
| // for the brainfuck library |
| #include "Brainfuck.h" |
| |
| // this include is for the GNU AS brainfuck library |
| #include "bf.gnu.as.cpp" |
| |
| int main(int argc, char** argv) |
| { |
| // if the filename to parse is not passed |
| if (argc < 2) |
| { |
| // print usage details |
| printf("Usage: %s [source]\n", argv[0]); |
| |
| // quit execution |
| return EXIT_SUCCESS; |
| }; |
| |
| // parser object |
| Brainfuck::Parser<30000> parser; |
| |
| // generate the assembly code using the GNU AS writeInstruction |
| parser.parseFile(argv[1], GNU_AS::gen); |
| }; |