DSL / Python / New Language: How to build a CSS pre-processor (like SASS) from scratch (DotDot)

DSL / Python / New Language: How to build a CSS pre-processor (like SASS) from scratch (DotDot)

If you are in web development, maybe you’ve heard of Sass, Less, Pug, Stylus etc. All these are pre-processors. In this tutorial we’re going to build nothing less than a functional css pre-processor from scratch with variables and functions. This type of new language is called source-to-source compiled. If you are thrilled, i hope not… Continue Reading DSL / Python / New Language: How to build a CSS pre-processor (like SASS) from scratch (DotDot)

how to create your own DSL(Domain Specific Language) in python

how to create your own DSL(Domain Specific Language) in python

Sometimes you need more than a cli program. You need more flexibility and control. A Domain Specific Language (DSL) is the right fit for specialised tasks. This post shows how you can build your own. Some rough notes/planning : aim : calculate cost of houses input : num of houses price of house output :… Continue Reading how to create your own DSL(Domain Specific Language) in python

building an indentation lexer in python – a tutorial

scope by indentation is an alternative to curly braces and is used by languages like python and pug. it certainly is more human-friendly as experience gathered tends to produce more and more friendly syntaxes (like livecode). we’ll in this post build an indentation analyser that correctly tells us when we mixed indentation level; just like python… Continue Reading building an indentation lexer in python – a tutorial

building a lexer in python – a tutorial

knowing how to build a lexer allows you to extend your applications and opens up a whole new world. You can write your own DSLs or your own language or just better separate symbols: in other words, it allows you to have more control over a string what is a lexer? from user input to… Continue Reading building a lexer in python – a tutorial