aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-17 01:47:41 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-17 01:47:41 -0300
commit047e4e3753c597628024847a524d44ca67fa1382 (patch)
tree8c0d63ecd8d395815a4eee155c2ce6283e0e7fab /src/main.c
parentf5da9cc42acc79d7dda78e57fab8a1b8d7aa6a7d (diff)
downloadblogc-047e4e3753c597628024847a524d44ca67fa1382.tar.gz
blogc-047e4e3753c597628024847a524d44ca67fa1382.tar.bz2
blogc-047e4e3753c597628024847a524d44ca67fa1382.zip
replaced leg-based parser with handmade parser for source files
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 3dbf325..d05c8d6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -12,17 +12,19 @@
#include <stdio.h>
-#include "source-grammar.h"
+#include "source-parser.h"
+#include <string.h>
int
main(int argc, char **argv)
{
- blogc_source_t *t = blogc_source_parse(
- "\n \nBOLA: guda\n\t\n\n\n\n"
+ const char *a =
+ "\n \nBOLA : guda\n\t\n\n\n\n"
"CHUNDA: asd\n"
"----\n"
- "{% block single_source %}\nbola\n\nzas\n");
+ "{% block single_source %}\nbola\n\nzas\n";
+ blogc_source_t *t = blogc_source_parse(a, strlen(a));
printf("%s\n", t->content);
printf("Hello, World!\n");
return 0;