[examples] write examples directory

This commit is contained in:
Allen Webster
2021-10-08 11:08:51 -07:00
parent 0b27e69ec4
commit 8432125f55
10 changed files with 85 additions and 23 deletions
+5 -5
View File
@@ -1,13 +1,13 @@
/*
** Example: datadesk-like-template
** Example: data desk like template
**
** This example is setup as a copy-pastable template for creating metadesk
** based metaprograms that have the same structure as datadesk metaprograms.
**
** Datadesk was a precursor language to metadesk. This example is mostly meant
** to help datadesk users understand metadesk and migrate onto it.
** Data Desk was a precursor language to metadesk. This example is mostly meant
** to help Data Desk users understand metadesk and migrate onto it.
**
** A "datadesk-like" metaprogram is passed the input metacode files on the
** A "data-desk-like" metaprogram is passed the input metacode files on the
** command line. These files are parsed. Then a set of three user-defined
** functions that form the "custom layer" are called. The "custom layer"
** defines all the additional analysis and code generation.
@@ -24,7 +24,7 @@
static MD_Arena *arena = 0;
//~ Declare user defined functions (the datadesk "custom layer") //////////////
//~ Declare user defined functions (the data desk "custom layer") //////////////
static void Initialize(void); // Runs at the beginning of generation.
static void TopLevel(MD_Node *node); // Runs once for each top-level node from each file.
+1 -1
View File
@@ -1,5 +1,5 @@
/*
** Example: parse-check
** Example: parse check
**
** This example shows how to use the metadesk library to parse metadesk files,
** print errors, and dump verbose feedback on the resulting metadesk trees.