├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cli ├── alca.cpp ├── alca.fb.hpp ├── alca.fbs ├── conn.cpp ├── conn.hpp ├── modules.cpp ├── modules.hpp └── utils.cpp ├── docs ├── MODULES.md ├── OVERVIEW.md ├── RULES.md ├── SENSORS.md ├── SEQUENCES.md └── images │ └── sensor.png ├── libalca ├── arena.c ├── bytecode.c ├── checker.c ├── compiler.c ├── context.c ├── expr.c ├── hashmap.c ├── hashmap.h ├── include │ ├── alca.h │ └── alca │ │ ├── arena.h │ │ ├── bytecode.h │ │ ├── checker.h │ │ ├── compiler.h │ │ ├── context.h │ │ ├── defaults.h │ │ ├── errors.h │ │ ├── expr.h │ │ ├── lexer.h │ │ ├── module.h │ │ ├── packet.h │ │ ├── parser.h │ │ ├── types.h │ │ ├── utils.h │ │ └── vm.h ├── lexer.c ├── module.c ├── modules │ ├── file.c │ ├── network.c │ ├── process.c │ └── registry.c ├── packet.c ├── parser.c ├── utils.c └── vm.c ├── libs └── include │ └── pcre2.h ├── licenses ├── CLI11.license ├── flatcc.license ├── hashmap.license └── pcre2.license └── tests ├── data ├── chk_badImport.alca ├── chk_complexEval.alca ├── chk_dupRule.alca ├── chk_invalidOps.alca ├── chk_invalidSeqRule.alca ├── chk_invalidSequence.alca ├── chk_noBool.alca ├── chk_validRule.alca ├── cpl_arithmetic.alca ├── cpl_logicAnd.alca ├── cpl_module.alca ├── psr_complexRule.alca ├── psr_indexCall.alca ├── psr_simpleRule.alca └── vm_complex.alca ├── test.c ├── test.h ├── test_checker.c ├── test_compiler.c ├── test_lexer.c ├── test_parser.c └── test_vm.c /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/.gitmodules -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/README.md -------------------------------------------------------------------------------- /cli/alca.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/alca.cpp -------------------------------------------------------------------------------- /cli/alca.fb.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/alca.fb.hpp -------------------------------------------------------------------------------- /cli/alca.fbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/alca.fbs -------------------------------------------------------------------------------- /cli/conn.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/conn.cpp -------------------------------------------------------------------------------- /cli/conn.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/conn.hpp -------------------------------------------------------------------------------- /cli/modules.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/modules.cpp -------------------------------------------------------------------------------- /cli/modules.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/modules.hpp -------------------------------------------------------------------------------- /cli/utils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/cli/utils.cpp -------------------------------------------------------------------------------- /docs/MODULES.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/MODULES.md -------------------------------------------------------------------------------- /docs/OVERVIEW.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/OVERVIEW.md -------------------------------------------------------------------------------- /docs/RULES.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/RULES.md -------------------------------------------------------------------------------- /docs/SENSORS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/SENSORS.md -------------------------------------------------------------------------------- /docs/SEQUENCES.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/SEQUENCES.md -------------------------------------------------------------------------------- /docs/images/sensor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/docs/images/sensor.png -------------------------------------------------------------------------------- /libalca/arena.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/arena.c -------------------------------------------------------------------------------- /libalca/bytecode.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/bytecode.c -------------------------------------------------------------------------------- /libalca/checker.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/checker.c -------------------------------------------------------------------------------- /libalca/compiler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/compiler.c -------------------------------------------------------------------------------- /libalca/context.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/context.c -------------------------------------------------------------------------------- /libalca/expr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/expr.c -------------------------------------------------------------------------------- /libalca/hashmap.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/hashmap.c -------------------------------------------------------------------------------- /libalca/hashmap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/hashmap.h -------------------------------------------------------------------------------- /libalca/include/alca.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca.h -------------------------------------------------------------------------------- /libalca/include/alca/arena.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/arena.h -------------------------------------------------------------------------------- /libalca/include/alca/bytecode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/bytecode.h -------------------------------------------------------------------------------- /libalca/include/alca/checker.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/checker.h -------------------------------------------------------------------------------- /libalca/include/alca/compiler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/compiler.h -------------------------------------------------------------------------------- /libalca/include/alca/context.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/context.h -------------------------------------------------------------------------------- /libalca/include/alca/defaults.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/defaults.h -------------------------------------------------------------------------------- /libalca/include/alca/errors.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/errors.h -------------------------------------------------------------------------------- /libalca/include/alca/expr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/expr.h -------------------------------------------------------------------------------- /libalca/include/alca/lexer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/lexer.h -------------------------------------------------------------------------------- /libalca/include/alca/module.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/module.h -------------------------------------------------------------------------------- /libalca/include/alca/packet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/packet.h -------------------------------------------------------------------------------- /libalca/include/alca/parser.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/parser.h -------------------------------------------------------------------------------- /libalca/include/alca/types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/types.h -------------------------------------------------------------------------------- /libalca/include/alca/utils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/utils.h -------------------------------------------------------------------------------- /libalca/include/alca/vm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/include/alca/vm.h -------------------------------------------------------------------------------- /libalca/lexer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/lexer.c -------------------------------------------------------------------------------- /libalca/module.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/module.c -------------------------------------------------------------------------------- /libalca/modules/file.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/modules/file.c -------------------------------------------------------------------------------- /libalca/modules/network.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/modules/network.c -------------------------------------------------------------------------------- /libalca/modules/process.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/modules/process.c -------------------------------------------------------------------------------- /libalca/modules/registry.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/modules/registry.c -------------------------------------------------------------------------------- /libalca/packet.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/packet.c -------------------------------------------------------------------------------- /libalca/parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/parser.c -------------------------------------------------------------------------------- /libalca/utils.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/utils.c -------------------------------------------------------------------------------- /libalca/vm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libalca/vm.c -------------------------------------------------------------------------------- /libs/include/pcre2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/libs/include/pcre2.h -------------------------------------------------------------------------------- /licenses/CLI11.license: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/licenses/CLI11.license -------------------------------------------------------------------------------- /licenses/flatcc.license: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/licenses/flatcc.license -------------------------------------------------------------------------------- /licenses/hashmap.license: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/licenses/hashmap.license -------------------------------------------------------------------------------- /licenses/pcre2.license: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/licenses/pcre2.license -------------------------------------------------------------------------------- /tests/data/chk_badImport.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_badImport.alca -------------------------------------------------------------------------------- /tests/data/chk_complexEval.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_complexEval.alca -------------------------------------------------------------------------------- /tests/data/chk_dupRule.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_dupRule.alca -------------------------------------------------------------------------------- /tests/data/chk_invalidOps.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_invalidOps.alca -------------------------------------------------------------------------------- /tests/data/chk_invalidSeqRule.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_invalidSeqRule.alca -------------------------------------------------------------------------------- /tests/data/chk_invalidSequence.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_invalidSequence.alca -------------------------------------------------------------------------------- /tests/data/chk_noBool.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_noBool.alca -------------------------------------------------------------------------------- /tests/data/chk_validRule.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/chk_validRule.alca -------------------------------------------------------------------------------- /tests/data/cpl_arithmetic.alca: -------------------------------------------------------------------------------- 1 | rule arithmetic { 2 | 2 + 5 * 3 < 47 3 | } -------------------------------------------------------------------------------- /tests/data/cpl_logicAnd.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/cpl_logicAnd.alca -------------------------------------------------------------------------------- /tests/data/cpl_module.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/cpl_module.alca -------------------------------------------------------------------------------- /tests/data/psr_complexRule.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/psr_complexRule.alca -------------------------------------------------------------------------------- /tests/data/psr_indexCall.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/psr_indexCall.alca -------------------------------------------------------------------------------- /tests/data/psr_simpleRule.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/psr_simpleRule.alca -------------------------------------------------------------------------------- /tests/data/vm_complex.alca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/data/vm_complex.alca -------------------------------------------------------------------------------- /tests/test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test.c -------------------------------------------------------------------------------- /tests/test.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test.h -------------------------------------------------------------------------------- /tests/test_checker.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test_checker.c -------------------------------------------------------------------------------- /tests/test_compiler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test_compiler.c -------------------------------------------------------------------------------- /tests/test_lexer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test_lexer.c -------------------------------------------------------------------------------- /tests/test_parser.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test_parser.c -------------------------------------------------------------------------------- /tests/test_vm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/badhive/alca/HEAD/tests/test_vm.c --------------------------------------------------------------------------------