Skip to content

Python to the rescue (part 2)

January 29, 2006

For our <a href=”http://www.student.cs.uwaterloo.ca/~cs444″>compilers project</a> we needed to implement a tool that would read in a CFG and output a set of tables that our LR parser can use. The problem was we only had a few days to do it in and we were working with C++. After analyzing our situation, I volunteered to do the task only if I can do it using Python. Two days (and two nights) later, I was outputting a header file for use with the rest of the parser.

I ported an earlier cfg_parser written in C++ over night and by noon next morning I had nullable, first and follow sets partially calculated. Time required to add/fix features was measured in hours/minutes instead of days! I found fixing bugs much faster to do because I could focus on the logic instead of worrying about some obscure template problem or whether to use pointers or refernces.

Dynamic languages is the way of the future!

Advertisements

From → Python

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: