jainbasil.net

personal website of jain basil aliyas

Tag archive for ‘Python’

Lexical Analyzer for sla files

The post is dedicated to my friend, Alex Poovathingal, who developed a lexical analyzer for xml files as part of assignment for Compiler Design course. Our aim was to handcode a lexer for sla files ( Scribus file format), which will extract all the text embedded in Scribus Text Frames of the input document. The [...]

Build an abstract syntax tree using python.

This is a glimpse of my mini project, titled Compiler for C subset language with LLVM Backend. I’d explain what I did to create an abstract syntax tree for my subset language. See the class below : class ASTNode(object): def __init__(self, type, *children): self.node_type = type self.node_children = children ASTNode consist of two members, node_type [...]

Playing with python : A Command-line twitter client

Just for a change, I am now playing with Python Programming Language, and the first thing which I did was a tiny twitter client which will run from our console. I have no plans to explain what I did on this, rather I am just adding a small code. This code uses a twitter module, [...]