I've been looking through creating markup languages similar to Markdown. I was wondering where to start with something like this. I've researched a bit on creating languages, and I've ended up with tutorials talking about lexers and ASTs - in the end, these languages are passed to something like LLVM.
From what I understand, languages like C are imperative languages, and languages like Markdown are declarative. What exactly does the toolchain look like for something that probably isn't going to touch anything like the LLVM?
I've seen other answers like how to tokenize a language in Python. However, how might I do this in C? I'd like to have something that can be used anywhere (e.g. integrated into a Ruby native extension, or in a C# project).
I can't seem to find a good direction to go with this. Does anybody have experience / tips on where to start? At what point and where would I build the "binary" (creating HTML from source code?)
Does Markdown even use a lexer? From the syntax, it looks like it could very well just use regular expressions.
Apologies if this is too broad, but I can't find very much info on the topic (perhaps I'm just looking in the wrong places!)