A MikroTik script compiler for the NetForge framework.
NetForge is a compiler for MikroTik RouterOS scripts, designed to provide enhanced syntax, error checking, and optimizations over standard RouterOS scripting.
- C++17 compatible compiler (g++)
- Flex (Fast Lexical Analyzer)
- Bison (Parser Generator)
- Make
compiler-project/
├── bin/ # Compiled binaries
├── src/ # Source code
│ ├── *.cpp # C++ implementation files
│ ├── *.h # Header files
│ ├── scanner.flex # Flex lexical analyzer definition
│ ├── parser.bison # Bison parser definition
│ ├── main.c # Main compiler entry point
│ └── Makefile # Build script
├── examples/ # Example MikroTik scripts
└── README.md # This file
To build the compiler, navigate to the src directory and run make:
cd src
makeThis will:
- Generate the lexer and parser code from flex/bison definitions
- Compile all source files
- Create the executable at
../bin/mikrotik_compiler
Once compiled, you can run the compiler with:
./bin/mikrotik_compiler [input_file] [options]./bin/mikrotik_compiler input.script./bin/mikrotik_compiler examples/hello_world.scriptTo clean the build artifacts:
cd src
make clean[Add your license information here]
[Add contributor information here]