From c9456a1a73a8b781f4460d48c541a8977e249b91 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 14 Feb 2019 16:02:43 +0100 Subject: Skeleton parser structure --- src/sc2_test.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') 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 #include -#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; -- cgit v1.2.3