NetworkedBlogs.com (beta) is an extension of the Facebook app NetworkedBlogs.

Programming Tidbits

You're new here, aren't you?

Click Connect with Facebook to join NetworkedBlogs. NetworkedBlogs is a community of bloggers and blog lovers. Join the fun, add your blog, and connect with others who read and write about subjects you like.
 

Information

Blog Name: Programming Tidbits
Url: http://programming-tidbits.blogspot.com/
Language: English
Topics: Python, Haskell, Programming
Description:
Popularity: 2 Followers

Blog Feed

A simple lexical analyzer demo in Haskell
Do get some better Haskell practice, I developed a small lexical analyzer in Haskell. This uses basic Haskell functionality and doesn't use sophisticated libraries like Parsec. Here is the output of this effort:{-This script implements a simple lexical analysis programbased on the example in Modern Compiler Design Book Section 2.1Tokens--------The lexical analyzer supports following tokens.Operators: +, -, * and /Separators: ; , {} ( and )Integers (a string of digits)Identifiers: first character must be a letter other characters can be letter or digit or u
AST annotations
AST (Abstract Syntax Trees) annotation is an important step in compilation process. I have been trying to figure out how these would be implemented in Haskell. By studying a paper on SPARK (The design and implementation of SPARK, A Toolkit for Implementing Domain Specific Languages), I sort of developed a general intuitive understanding of this process. You need to traverse over the AST in either pre-order or post-order or a mix of pre and post order. And you need to add extra data to each node in the AST during this traversal. Additionally, you can conduct an extensive set of semantic tests during this traversal process. So how does it map to Haskell? Here are my gues
Hope Lexical analyzer is working
I wrote quite a significant part of lexical analyzer for Hope (http://kenai.com/projects/hope) (Haskell Oriented Python Environment). Its primarily based on Parsec library. Currently the code is organized as follows. Interpreter/src directory contains a folder PyLex. PyLex package contains various files which implement the lexical analysis for Hope. The main module is PyLex.Lexer. You can start with the function pyLexer which a Parsec based parser and returns a list of tokens. Each token is a pair of (SourcePos, PyToken). PyToken data-type represents various types of tokens supported in Hope's lexical analyzer. The tokens have been define
PyCon India 2009 My impressions
I attended 1st day (26 September 2009) of the PyCon India 2009 conference. It was first Python Conference in India and I felt inclined enough to go all over to Bangalore from my home place Noida and attend the conference.The conference was organized at IISc Bangalore. From the main gate to reach the conference area was easy as proper directions had been placed all over. Registration was a bit chaotic. There were not enough desks to handle the huge crowd waiting to be registered. I guess it was still quite satisfactory process considering the fact that it was first such event in India and there were not enough funds (I guess) to manage the event professionally. Since I had pre-re
Hope Project at Kenai
Today I started an attempt to write an implementation of Python in Haskell. I have no idea whether I would really succeed in this. But I really want to give it a good try.The site is hosted at http://kenai.com/projects/hope. I will continue to blog about this from this blog.HOPE stands for Haskell Oriented Python Environment. At the moment, its just a dream for me and a very very big dream at that. But I hope that I will be able to bring out HOPE sometime !

Followers

This blog has 2 followers. Visit the blog page on Facebook to see who's following this blog.
Follow

Popular in:

Not enough data.
Calculated for blogs with 20+ followers.

Related Blogs

This site uses BitPixels previews
Questions? contact: networkedblogs@ninua.com
Copyright (C) 2008, Ninua, Inc.