[examples] setting up the last two integration examples and slots in the examples directory

This commit is contained in:
Allen Webster
2021-10-09 23:45:02 -07:00
parent b67dc566c6
commit 8ee69f0124
6 changed files with 58 additions and 5 deletions
+6 -3
View File
@@ -11,6 +11,9 @@ bin/bld_core.sh show_ctx
examps="examples"
bin/bld_core.sh unit memory_management $examps/integration/memory_management.c
bin/bld_core.sh unit multi_threaded $examps/integration/multi_threaded.c
bin/bld_core.sh unit hello_world $examps/intro/hello_world.c
bin/bld_core.sh unit parse_check $examps/intro/parse_check.c
bin/bld_core.sh unit data_desk_like $examps/intro/data_desk_like_template.c
@@ -21,10 +24,10 @@ if [ -d $examps/type_metadata/generated/type_info_meta.h ]; then
bin/bld_core.sh unit type_info $examps/type_metadata/type_info_final_program.c
fi
bin/bld_core.sh unit expr_intro $examps/expr/expr_intro.c
bin/bld_core.sh unit expr_c_like $examps/expr/expr_c_like.c
bin/bld_core.sh unit expr_intro $examps/expr/expr_intro.c
bin/bld_core.sh unit expr_c_like $examps/expr/expr_c_like.c
bin/bld_core.sh unit overrides $examps/integration/overrides.c
bin/bld_core.sh unit overrides $examps/integration/overrides.c
echo
+9
View File
@@ -8,6 +8,14 @@ root_path=$PWD
build_path=$root_path/build
examps=$root_path/examples
echo ~~~ Running Memory Management Example ~~~
$build_path/memory_management.exe $examps/intro/hello_world.mdesk $examps/intro/labels.mdesk $examps/intro/sets.mdesk
echo
echo ~~~ Running Multi-Threaded Parse Example ~~~
$build_path/multi_threaded.exe $examps/intro/hello_world.mdesk $examps/intro/labels.mdesk $examps/intro/sets.mdesk
echo
echo ~~~ Running Type Metadata Generator Example ~~~
cd $examps/type_metadata/generated
$build_path/type_metadata.exe $examps/type_metadata/types.mdesk
@@ -15,6 +23,7 @@ echo
echo ~~~ Running Error Generation Example ~~~
$build_path/user_errors.exe $examps/user_errors/user_errors.mdesk
echo
echo ~~~ Running Expression Intro ~~~
$build_path/expr_intro.exe $examps/expr/expr_intro.mdesk
+6 -1
View File
@@ -53,12 +53,17 @@ EXAMPLES:
Commentary in this example focuses on strategies for setting up an effective
metaprogram.
7. TODO
8. TODO
7. "overrides" integration/overrides.c
9. "overrides" integration/overrides.c
When including the Metadesk library into an existing codebase, the overrides
system in the library will let you plug in existing implementations you have
for many of the basic requirements of the library. This can also be useful if
you want to make your program CRT-free, or direct metadesk allocations to your
own custom allocator.
10. TODO
11. TODO
+18
View File
@@ -0,0 +1,18 @@
/*
** Example: memory management
**
** TODO
*/
//~ includes and globals //////////////////////////////////////////////////////
#include "md.h"
#include "md.c"
//~ main //////////////////////////////////////////////////////////////////////
int
main(int argc, char **argv)
{
// TODO(allen)
}
+18
View File
@@ -0,0 +1,18 @@
/*
** Example: multi threaded parse
**
** TODO
*/
//~ includes and globals //////////////////////////////////////////////////////
#include "md.h"
#include "md.c"
//~ main //////////////////////////////////////////////////////////////////////
int
main(int argc, char **argv)
{
// TODO(allen)
}
+1 -1
View File
@@ -24,4 +24,4 @@ main(int argc, char **argv)
// print the results
MD_PrintDebugDumpFromNode(stdout, parse.node, MD_GenerateFlags_All);
}
}