From 380a25eccf46487a2cdb91388dceaefaa9f608cd Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Mon, 10 Jul 2023 18:19:34 -0300 Subject: [PATCH] Makefile --- Makefile | 6 ++++++ shortcodes.c | 8 ++++---- shortcodes.rl | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..484dcb8 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +run: shortcodes + ./shortcodes +shortcodes.c: shortcodes.rl + ragel -G2 shortcodes.rl -o shortcodes.c +shortcodes: shortcodes.c + tcc shortcodes.c bstrlib/bstrlib.c -g -o shortcodes diff --git a/shortcodes.c b/shortcodes.c index 9391bb3..bb5ff8e 100644 --- a/shortcodes.c +++ b/shortcodes.c @@ -8,7 +8,7 @@ bstring grab_chunk(char *start, char *end) { } -#line 36 "shortcodes.rl" +#line 35 "shortcodes.rl" bstring parse(char *_input) { @@ -21,7 +21,7 @@ static const int shortcode_error = 0; static const int shortcode_en_main = 1; -#line 40 "shortcodes.rl" +#line 39 "shortcodes.rl" char *eof, *ts, *te = 0; int cs, act = 0; @@ -41,7 +41,7 @@ static const int shortcode_en_main = 1; cs = shortcode_start; } -#line 54 "shortcodes.rl" +#line 53 "shortcodes.rl" #line 47 "shortcodes.c" { @@ -337,7 +337,7 @@ case 14: _out: {} } -#line 55 "shortcodes.rl" +#line 54 "shortcodes.rl" printf("\nLabel is: '%s'\n", label->data); return output; diff --git a/shortcodes.rl b/shortcodes.rl index 9930828..9c37063 100644 --- a/shortcodes.rl +++ b/shortcodes.rl @@ -32,7 +32,6 @@ bstring grab_chunk(char *start, char *end) { end = '}}'; main := (start spc name (sep (arg | value))* spc end); - }%% bstring parse(char *_input) {