diff options
author | Thomas White <taw@physics.org> | 2019-02-14 16:02:43 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-02-14 16:02:43 +0100 |
commit | c9456a1a73a8b781f4460d48c541a8977e249b91 (patch) | |
tree | 207f4c98184397a69c9e79fb7fb60511e3d31288 /src | |
parent | 7b9d04f56c0e22abaeec8dc779bd0800b0d93f79 (diff) |
Skeleton parser structure
Diffstat (limited to 'src')
-rw-r--r-- | src/sc2_test.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sc2_test.c b/src/sc2_test.c index 3279887..1dc4099 100644 --- a/src/sc2_test.c +++ b/src/sc2_test.c @@ -27,29 +27,23 @@ #include <glib/gstdio.h> #include <gio/gio.h> -#include "storycode.tab.h" #include "storycode.h" +#include "presentation.h" //int scdebug = 1; int main(int argc, char *argv[]) { - YY_BUFFER_STATE b; GFile *file; GBytes *bytes; const char *text; size_t len; + Presentation *p; file = g_file_new_for_uri("resource:///uk/me/bitwiz/Colloquium/demo.sc"); bytes = g_file_load_bytes(file, NULL, NULL, NULL); text = g_bytes_get_data(bytes, &len); - - printf("Here goes...\n"); - b = sc_scan_string(text); - scparse(); - sc_delete_buffer(b); - printf("Done.\n"); - + p = storycode_parse_presentation(text); g_bytes_unref(bytes); return 0; |