How Do I Start Building a Markup Language That Compiles to HTML?

0
8
Asked By CreativeCoder42 On

I'm interested in creating a markup language that converts to HTML. I know HTML is basic, but I think it could be an exciting project. I have some experience with Python, Java, and a bit of Rust. What skills or knowledge should I focus on to get started with this project?

5 Answers

Answered By SyntaxWizard On

Check out syntax trees and the basics of interpreters and compilers. Understanding how to evaluate expressions and turning them into code is key. Also, some knowledge of programming language design will really help you along the way.

Answered By CompilerNerd On

What you're aiming to create is more of a transpiler than a traditional compiler. Essentially, you're converting one form of markup into another, which might simplify your task but also limits its utility.

TechieDave -

Could you clarify why it's considered a transpiler? Thanks!

Answered By HTMLHacker On

You'll definitely need to know about parsing and lexing. Simpler implementations for just HTML should be straightforward, but if you want to incorporate scripting or CSS, it could get a bit tricky. CSS is quite complex and essential for web design.

CreativeCoder42 -

Thanks for the tip! I hadn't considered the complexity of CSS.

Answered By DevExplorer On

It sounds like an interesting project! I worked on something similar where I converted JSON into HTML for easy navigation. Maybe check out some existing tools or libraries that do similar things for inspiration.

Answered By TechGuru99 On

To kick off this project, you'll want to grasp the fundamentals of parsers. It's crucial for transforming your markup into HTML. You’re basically building a compiler, which can be done in any programming language you feel comfortable with.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.