]> www.git.momoyon.org Git - lang.git/commitdiff
[test.bat] Add test script for windows.
authormomoyon <ahmedsamyh10@gmail.com>
Sun, 30 Mar 2025 15:51:08 +0000 (20:51 +0500)
committermomoyon <ahmedsamyh10@gmail.com>
Sun, 30 Mar 2025 15:51:08 +0000 (20:51 +0500)
main.c
test.bat [new file with mode: 0644]

diff --git a/main.c b/main.c
index 8c63457f373177fa151bf1da4001db564930242e..926da61a7019b503e0e6166bae41d23393f186ed 100644 (file)
--- a/main.c
+++ b/main.c
@@ -310,6 +310,20 @@ void free_lexer(Lexer *l) {
     free(l->src.data);
 }
 
+
+/* Understanding BNF [Backus-Naur Form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form):
+*
+* Example Context-Free-Grammar (CFG):
+*
+* breakfast -> protein "with" breakfast "on the side" ;
+*/
+
+
+/* GRAMMAR
+*   EXPR -> TERM (
+*/
+
+
 Parser make_parser(Tokens tokens) {
     return (Parser) {
         .tokens = tokens,
diff --git a/test.bat b/test.bat
new file mode 100644 (file)
index 0000000..29ec2d8
--- /dev/null
+++ b/test.bat
@@ -0,0 +1,7 @@
+@echo off
+
+set TESTS_DIR=./tests/
+set BUILD_CMD=../lang.exe {test_name}.{src_suffix}
+set SRC_SUFFIX=.momo
+
+python .\test.py %*