
Code your own html language in C and apply these techniques to any language; Alexa transforms code to tokens, then the html parser interprets the language under a defined grammar.
Create a custom HTML language in C by defining token types (text, tag start, tag end, self closed), building constructors and show functions, and parsing token streams for a parser.
Define and implement a simple garbage collector in C by building a dynamic array, managing allocations with malloc and realloc, and freeing token contents.
Prepare the HTML parser by designing a stack-based token workflow, using push and alternative pop to handle nested tags, and wire a parser module in C with parser.c and parser.h.
Today we begin developing our own HTML language in C.
About the course
We will eventually use it to create console based graphical user interfaces for C applications and we'll also write our own CSS eventually. In the first episode we'll focus on getting everything prepared for the HTML parser and we're going to take influences from the functional style of writing code and also from our compiler episode.
The techniques taught in this course is not only useful for HTML. Everything is applicable no matter what kind of programming language you wish to create, or any existing language you want to parse. For instance, you can write your own C compiler or invent your own programming language. All you need is some basic C programming skills and the contents of this course.
You will learn how to code a lexer, which will turn the code into tokens, the smallest atomic part of any programming language. Then you will define the grammar according to the format taught in this course (bnf). The third step is to parse the tokens according to the language, by writing a recursive functional parser. And the final step is using your code, like rendering web pages (html), emitting assembly or machine code (c compiler) etc.
About the author
Dr. Jonas is an experienced instructor who's been coding C for 25 years and teaching it for 7 years. His popular Youtube channel has 35 000 subscribers and he's also running his own TV channel with programming content. He's an appreciated teacher with stunning reviews and several C programming courses of different kind.
Enroll Today! Or check out the free previews.