aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh51
1 files changed, 32 insertions, 19 deletions
diff --git a/build.sh b/build.sh
index 91c7fdc..9f1899b 100755
--- a/build.sh
+++ b/build.sh
@@ -27,40 +27,53 @@ function leak
log valgrind --leak-check=full --show-leak-kinds=all -s bin/$1 $2
}
-cc dict -D_DICT_STANDALONE
-cc lexer -D_LEXER_STANDALONE
-# cc recursive/recursive-ascent
-# cc recursive/recursive-ascent-descent
-# cc util-tables -D_UTIL_TABLES_STANDALONE
-# cc slr-table -D_SLR_TABLE_STANDALONE
-# cc clr-table -D_CLR_TABLE_STANDALONE
-# cc clr-table "-D_CLR_TABLE_STANDALONE -D_LAZY_LALR" lalr-table
-# cc lr-parser -D_LR_PARSER_STANDALONE
-# cc demos/instant-parser
+# cc dict -D_DICT_STANDALONE
+# leak dict
+# cc demos/lexer -D_LEXER_STANDALONE
+# leak lexer
-leak lexer
-leak dict
# leak recursive-ascent
+# cc recursive/recursive-ascent
+
# leak recursive-ascent-descent
+# cc recursive/recursive-ascent-descent
+
+# cc util-tables -D_UTIL_TABLES_STANDALONE
# leak util-tables
+
+# cc slr-table -D_SLR_TABLE_STANDALONE
# leak slr-table
+
+# cc clr-table -D_CLR_TABLE_STANDALONE
# leak clr-table
+
+# cc clr-table "-D_CLR_TABLE_STANDALONE -D_LAZY_LALR" lalr-table
# leak lalr-table
+
+# cc lr-parser -D_LR_PARSER_STANDALONE
# leak lr-parser
-# leak instant-parser
+
+# cc demos/instant-parser # not working
+# leak instant-parser # not working
#--------------------------------------------------------------------------------------------------#
cc demos/generate-parser "-rdynamic"
-shared demos/sample-files/lalr-defs
-shared demos/sample-files/arithmetic-defs
-
shared slr-table
shared clr-table
shared clr-table -D_LAZY_LALR lalr-table
+shared demos/sample-files/lalr-defs
+
+# --- Arithemitc example ---
+# shared demos/sample-files/arithmetic-defs
+# leak "generate-parser -t lalr-table bin/arithmetic-defs.so"
+# cc demos/sample-files/arithmetic-skeleton "" parser
+# leak parser "0-1+(1+0)-1+0"
-leak "generate-parser -t lalr-table bin/arithmetic-defs.so"
-cc demos/sample-files/parser-skeleton "" parser # this includes bin/generated.c
-leak parser "0-1+(1+0)-1+0"
+# --- Calc example ---
+shared demos/sample-files/calc-defs
+leak "generate-parser -t lalr-table bin/calc-defs.so"
+cc demos/sample-files/calc-skeleton "" parser
+leak parser "4237-100+(17498+70)-1321+82910"