Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Project: Coding your own HTML language in C
Rating: 5.0 out of 5(3 ratings)
218 students

Project: Coding your own HTML language in C

A real-world project for mid-level C coders who want to reach the next level and learn how to create your own language.
Last updated 3/2026
English

What you'll learn

  • Learn how to write a lexer/tokenizer, transforming the source language into your own datastructures (tokens).
  • Learn how to structure the grammar of the source language in Backus/Naur form.
  • Learn how to use the lexer and the grammar to parse the source language tokens into a suitable datastructure.
  • Learn how to write your own garbage collector to clean up memory allocations.
  • Learn how to use this project in your own portfolio (you're allowed to!) in order to get a developer job.

Course content

1 section10 lectures15h 58m total length
  • Introduction0:41

    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.

  • Episode one: Preparing the project1:12:25
  • Episode two: Writing some useful utility functions2:05:04

    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.

  • Episode three: Writing your own Garbage Collector (GC)52:43

    Define and implement a simple garbage collector in C by building a dynamic array, managing allocations with malloc and realloc, and freeing token contents.

  • Episode four: Preparing for the lexer1:44:37
  • Episode five: Writing a lexer/tokenizer for HTML3:25:34
  • Episode six: Preparing for the parser2:49:46

    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.

  • Episode seven: Coding a functional HTML parser in C2:18:39
  • Episode eight: Defining the language grammar in BNF (Backus/Nauer form)6:40
  • Episode Nine: Writing the parsing function1:21:54

Requirements

  • You need to have a basic understanding of C. So first do the beginner course and then this one.

Description

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.

Who this course is for:

  • Mid-level C programmers, who's done the beginner stuff and wishes to take the next step by coding a real project.